Browse Source

修改生产退料

wms3.0_pda
lijuncheng 1 year ago
parent
commit
92d5d09e18
  1. 6
      pages.json
  2. 2
      pages/inventoryMove/coms/comMoveRecord.vue
  3. 14
      pages/inventoryMove/coms/comMoveRecordCard.vue
  4. 31
      pages/issue/record/issueRecord.vue
  5. 35
      pages/productionReturn/coms/comReturnRequestCreator.vue
  6. 6
      pages/productionReturn/record/returnToHold.vue
  7. 7
      pages/productionReturn/record/returnToStore.vue

6
pages.json

@ -466,7 +466,7 @@
{ {
"path": "pages/issue/record/issueRecord", "path": "pages/issue/record/issueRecord",
"style": { "style": {
"navigationBarTitleText": "直接发料", "navigationBarTitleText": "直接发料记录",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"titleNView": { "titleNView": {
"autoBackButton": "true" "autoBackButton": "true"
@ -561,14 +561,14 @@
{ {
"path": "pages/productionReturn/record/returnToStore", "path": "pages/productionReturn/record/returnToStore",
"style": { "style": {
"navigationBarTitleText": "合格退料", "navigationBarTitleText": "合格退料记录",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/productionReturn/record/returnToHold", "path": "pages/productionReturn/record/returnToHold",
"style": { "style": {
"navigationBarTitleText": "隔离退料", "navigationBarTitleText": "隔离退料记录",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },

2
pages/inventoryMove/coms/comMoveRecord.vue

@ -247,7 +247,7 @@
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch && r.batch == balance.batch &&
r.fromLocationCode == balance.locationCode && r.fromLocationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus && r.toInventoryStatus == balance.inventoryStatus &&
r.scaned == true) { r.scaned == true) {
return r; return r;
} }

14
pages/inventoryMove/coms/comMoveRecordCard.vue

@ -86,7 +86,19 @@
}, },
watch: { watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
}, },
data() { data() {

31
pages/issue/record/issueRecord.vue

@ -58,6 +58,9 @@
import { import {
getBusinessType, getBusinessType,
} from '@/common/record.js'; } from '@/common/record.js';
import {
calc
} from '@/common/calc.js';
import { import {
getManagementPrecisions getManagementPrecisions
@ -209,7 +212,7 @@
caclcQty() { caclcQty() {
var totalQty = 0; var totalQty = 0;
this.detailSource.subList.forEach(res => { this.detailSource.subList.forEach(res => {
totalQty += res.qty totalQty = calc.add(totalQty,res.qty);
}) })
this.detailSource.totalQty = totalQty; this.detailSource.totalQty = totalQty;
}, },
@ -241,10 +244,10 @@
let handleQty = 0; let handleQty = 0;
if (batch != undefined) { if (batch != undefined) {
batch.Records.forEach(res => { batch.Records.forEach(res => {
handleQty += Number(res.qty) handleQty = calc.add(handleQty,res.qty);
}) })
batch.handleQty = handleQty; batch.handleQty = handleQty;
itemHandleQty += handleQty; itemHandleQty = calc.add(itemHandleQty,handleQty)
} }
}) })
} }
@ -338,17 +341,17 @@
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(params).then(res => { // issueRecordSubmit(params).then(res => {
uni.hideLoading() // uni.hideLoading()
if (res.data) { // if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data) // this.showCommitSuccessMessage("<br><br>" + res.data)
} else { // } else {
this.showErrorMessage("提交失败:" + res.msg) // this.showErrorMessage(":" + res.msg)
} // }
}).catch(error => { // }).catch(error => {
uni.hideLoading() // uni.hideLoading()
this.showErrorMessage(error) // this.showErrorMessage(error)
}) // })
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {

35
pages/productionReturn/coms/comReturnRequestCreator.vue

@ -5,7 +5,7 @@
</comReturnRequestInfo> </comReturnRequestInfo>
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataContent.subList" :key="index"> <view v-for="(item, index) in dataContent.subList" :key="index">
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="detailOptions"> <uni-swipe-action-item @click="swipeClick($event,item,index)" :right-options="options">
<item-qty :dataContent="item" :isShowStdPack="false"> <item-qty :dataContent="item" :isShowStdPack="false">
</item-qty> </item-qty>
<!-- <view v-if="item.batch!=''" style="margin-left: 10rpx;"> <!-- <view v-if="item.batch!=''" style="margin-left: 10rpx;">
@ -36,7 +36,7 @@
import { import {
getDetailOption, getDetailOption,
getDetailEditRemoveOption, getDetailEditRemoveOption,
getDetailRemoveOption getDetailRemoveOption,
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
@ -79,7 +79,6 @@
}, },
watch: { watch: {
dataContent(newVal) { dataContent(newVal) {
this.requestItem = newVal.subList[0];
}, },
}, },
@ -92,9 +91,9 @@
} }
}, },
requestItem: {},
detailOptions: [], detailOptions: [],
scanOptions: [] scanOptions: [],
options:[]
} }
}, },
@ -103,26 +102,30 @@
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
} }
if (this.scanOptions.length == 0) { if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption(); this.scanOptions = getDetailRemoveOption();
// if (this.dataContent.allowModifyQty == 1) { // if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption(); // this.scanOptions = getDetailEditRemoveOption();
// } else { // } else {
// this.scanOptions = getDetailRemoveOption(); // this.scanOptions = getDetailRemoveOption();
// } // }
} }
if(!this.isSwipe){
this.detailOptions=[] this.options =this.scanOptions
} // if(!this.isSwipe){
// this.options=[]
// }else {
// this.options =this.scanOptions
// }
}, },
methods: { methods: {
swipeClick(e, item) { swipeClick(e, item,index) {
if (e.content.text == "详情") { if (e.content.text == "详情") {
this.detail(item) this.detail(item)
} else if (e.content.text == "编辑") { } else if (e.content.text == "编辑") {
this.edit(item) this.edit(item)
} else if (e.content.text == "移除") { } else if (e.content.text == "移除") {
this.remove(item) this.remove(item,index)
} }
}, },
edit(item) { edit(item) {
@ -136,17 +139,13 @@
// // this.showItem = item; // // this.showItem = item;
// // this.$refs.jobDetailPopup.openPopup(item) // // this.$refs.jobDetailPopup.openPopup(item)
}, },
remove(item) { remove(item,index) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?", this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => { res => {
if (res) { if (res) {
item.scaned = false this.dataContent.subList.splice(index, 1)
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0;
this.$forceUpdate() this.$forceUpdate()
this.$emit('remove', item) // this.$emit('remove', item)
} }
}); });
}, },

6
pages/productionReturn/record/returnToHold.vue

@ -61,6 +61,10 @@
getPackingNumberAndBatchByList, getPackingNumberAndBatchByList,
deepCopyData deepCopyData
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import { import {
getDirectoryItemArray getDirectoryItemArray
@ -246,7 +250,7 @@
item.qty = 0; item.qty = 0;
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined) { if (detail != undefined) {
item.qty += Number(detail.qty) item.qty = calc.add(item.qty,detail.qty)
} }
} }
} }

7
pages/productionReturn/record/returnToStore.vue

@ -56,6 +56,10 @@
import { import {
getDirectoryItemArray getDirectoryItemArray
} from '@/common/directory.js'; } from '@/common/directory.js';
import {
calc
} from '@/common/calc.js';
import { import {
getBusinessType, getBusinessType,
@ -247,7 +251,8 @@
item.qty = 0; item.qty = 0;
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined) { if (detail != undefined) {
item.qty += Number(detail.qty) item.qty = calc.add(item.qty,detail.qty)
} }
} }
} }

Loading…
Cancel
Save