niexiting 1 year ago
parent
commit
540f47ad92
  1. 4
      api/request2.js
  2. 4
      common/detail.js
  3. 2
      common/style/uni.css
  4. 1
      mycomponents/qty/RecommendQty.vue
  5. 1
      mycomponents/qty/stdPackQty.vue
  6. 34
      pages/inspect/coms/inspectComDetailCard.vue
  7. 2
      pages/inspect/coms/inspectEdit.vue
  8. 40
      pages/inspect/job/inspectDetail.vue
  9. 12
      pages/inspect/job/inspectResult.vue
  10. 6
      pages/purchaseReceipt/coms/comReceiptDetailCard.vue
  11. 2
      pages/putaway/record/putawayRecord.vue

4
api/request2.js

@ -2014,8 +2014,8 @@ export function getPutawayRequestDetail(id) {
*/ */
export function putawayRequestSubmit(params) { export function putawayRequestSubmit(params) {
return request({ return request({
url: baseApi + "/wms/purchasereturn-request-main/submit", url: baseApi + "/putaway-request-main/create",
method: "put", method: "post",
data: params, data: params,
}); });
} }

4
common/detail.js

@ -55,10 +55,10 @@ export function createRecordInfo(detail, balance) {
//计算实际数量 //计算实际数量
export function calcHandleQty(detailSource) { export function calcHandleQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {
item.handleTotalQty = 0; item.handleQty = 0;
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail != undefined && detail.scaned) {
item.handleTotalQty += Number(detail.handleQty) item.handleQty += Number(detail.handleQty)
} }
} }
} }

2
common/style/uni.css

@ -61,6 +61,8 @@ form {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
/* justify-content: center; */
/* background-color: #888888; */
} }
/* .uni-inline-item text { /* .uni-inline-item text {

1
mycomponents/qty/RecommendQty.vue

@ -1,5 +1,6 @@
<template> <template>
<view> <view>
推荐
<view class="uni-flex uni-row center"> <view class="uni-flex uni-row center">
<status v-if="isShowStatus" :status='dataContent.inventoryStatus'></status> <status v-if="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="text_recommend "> <view class="text_recommend ">

1
mycomponents/qty/stdPackQty.vue

@ -26,7 +26,6 @@
methods: { methods: {
getStdPackUnit(stdPackUnit) { getStdPackUnit(stdPackUnit) {
let std = getUnitInfo(stdPackUnit); let std = getUnitInfo(stdPackUnit);
console.log("单位",std.label)
return std == "" ? stdPackUnit : std.label; return std == "" ? stdPackUnit : std.label;
} }
} }

34
pages/inspect/coms/inspectComDetailCard.vue

@ -1,13 +1,31 @@
<template> <template>
<view class="" style="background-color: #fff;"> <view class="" style="background-color: #fff;">
<view class="">
<view class="" style="font-size: 32rpx;margin-left: 20rpx;">
<view class="">
收货数量 : {{jobContent.receiveQty}}{{getUnitInfo(jobContent.uom)}}
</view>
<view class="">
检验数量 : {{jobContent.sampleQty}}{{getUnitInfo(jobContent.uom)}}
</view>
<view class="">
不合格数量 : {{jobContent.failedQty}}{{getUnitInfo(jobContent.uom)}}
</view>
<view class="">
报废数量 : {{jobContent.crackQty}}{{getUnitInfo(jobContent.uom)}}
</view>
</view>
</view>
<u-line />
<uni-collapse ref="collapse1" @change=""> <uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)"> <item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)">
</item-compare-qty> </item-compare-qty>
<view class="" style="margin-left: 20rpx; "> <view class="" style="margin-left: 20rpx; ">
<batch :batch="settingParam.batch"></batch> <batch :batch="jobContent.batch"></batch>
</view> </view>
</template> </template>
<u-line /> <u-line />
<view class="" v-for="(item,index) in dataContent.subList"> <view class="" v-for="(item,index) in dataContent.subList">
@ -23,6 +41,9 @@
<view class="" > <view class="" >
报废数量 {{item.crackQty}} 报废数量 {{item.crackQty}}
</view> </view>
<view class="" >
合格数量 {{item.goodQty}}
</view>
</view> </view>
</uni-swipe-action-item> </uni-swipe-action-item>
@ -53,6 +74,10 @@
getDetailRemoveOption getDetailRemoveOption
} from '@/common/array.js'; } from '@/common/array.js';
import {
getUnitInfo
} from '@/common/directory.js';
export default { export default {
components: { components: {
itemCompareQty, itemCompareQty,
@ -67,7 +92,7 @@
type: Object, type: Object,
default: {} default: {}
}, },
settingParam: { jobContent: {
type: Object, type: Object,
default: {} default: {}
}, },
@ -166,7 +191,10 @@
}) })
} }
this.$emit('updateData',) this.$emit('updateData',)
} },
getUnitInfo(value) {
return getUnitInfo(value).label
},
} }
} }

2
pages/inspect/coms/inspectEdit.vue

@ -137,7 +137,7 @@
} }
this.dataContent.failedQty = failedQty; this.dataContent.failedQty = failedQty;
this.dataContent.crackQty = crackQty this.dataContent.crackQty = crackQty
this.dataContent.goodQty = this.dataContent.handleQty -failedQty-crackQty
this.afterSave() this.afterSave()

40
pages/inspect/job/inspectDetail.vue

@ -4,7 +4,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<inspectComDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData" <inspectComDetailCard :dataContent="item" :jobContent="jobContent" @remove="updateData"
:isShowBatch="false" @updateData='updateData'> :isShowBatch="false" @updateData='updateData'>
</inspectComDetailCard> </inspectComDetailCard>
</view> </view>
@ -44,7 +44,8 @@
getPackingNumberAndBatch, getPackingNumberAndBatch,
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getInventoryStatusName getInventoryStatusName,
} from '@/common/directory.js'; } from '@/common/directory.js';
import { import {
@ -87,11 +88,16 @@
businessTypeInfo: {}, businessTypeInfo: {},
locationTypeList: [], locationTypeList: [],
managementList: [], managementList: [],
selectedItem: {} selectedItem: {},
failedQty:0,
crackQty:0
}; };
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.failedQty = option.failedQty;
this.crackQty = option.crackQty;
if (this.id != undefined) { if (this.id != undefined) {
// // // //
// if (option.status == "1") { // if (option.status == "1") {
@ -172,6 +178,8 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.jobContent.failedQty= this.failedQty
that.jobContent.crackQty = this.crackQty;
that.subList = res.data.subList; that.subList = res.data.subList;
that.subList.forEach(res => { that.subList.forEach(res => {
res.batch = that.jobContent.batch res.batch = that.jobContent.batch
@ -417,11 +425,11 @@
detail.failedQty = detail.failedQty; detail.failedQty = detail.failedQty;
detail.crackQty = detail.crackQty; detail.crackQty = detail.crackQty;
detail.notPassedQty = detail.notPassedQty; detail.notPassedQty = detail.notPassedQty;
detail.goodQty = detail.qty - detail.failedQty - detail.crackQty; // detail.goodQty = detail.handleQty - detail.failedQty - detail.crackQty;
detail.inspectUser = this.$store.state.user.id detail.inspectUser = this.$store.state.user.id
//== //==
if (detail.goodQty == detail.qty) { if (detail.goodQty == detail.handleQty) {
detail.toInventoryStatus = "OK" detail.toInventoryStatus = "OK"
} else { } else {
//= //=
@ -432,15 +440,24 @@
detail.toInventoryStatus = "NOK" detail.toInventoryStatus = "NOK"
} }
} }
// detail.singlePrice = detail.balance.singlePrice;
// detail.amount = detail.balance.singlePrice * detail.handleQty;
detail.singlePrice = detail.balance.singlePrice; // detail.arriveDate = detail.balance.arriveDate;
detail.amount = detail.balance.singlePrice * detail.handleQty; // detail.produceDate = detail.balance.produceDate;
// detail.expireDate = detail.balance.expireDate;
detail.arriveDate = detail.balance.arriveDate; }else {
detail.produceDate = detail.balance.produceDate; detail.sampleQty = detail.qty;
detail.expireDate = detail.balance.expireDate; detail.failedQty = 0;
list.push(detail) detail.crackQty = 0;
detail.notPassedQty = 0;
detail.goodQty = detail.qty;
detail.inspectUser = this.$store.state.user.id
detail.toInventoryStatus = "OK"
} }
list.push(detail)
}) })
}) })
this.jobContent.subList = list this.jobContent.subList = list
@ -457,6 +474,7 @@
}, },
} }
} }
</script> </script>

12
pages/inspect/job/inspectResult.vue

@ -387,7 +387,10 @@
} else if (this.nextAction == "PARTIAL_OK") { } else if (this.nextAction == "PARTIAL_OK") {
// //
uni.navigateTo({ uni.navigateTo({
url: './inspectDetail?id=' + this.id + '&status=' + this.status url: './inspectDetail?id=' + this.id +
'&status=' + this.status+
'&failedQty=' + this.jobContent.failedQty+
'&crackQty=' + this.jobContent.crackQty
}); });
//=== //===
} else if (this.nextAction == "FULL_INSPECT") { } else if (this.nextAction == "FULL_INSPECT") {
@ -416,6 +419,7 @@
}); });
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
inspectJobSubmit(params).then(res=>{ inspectJobSubmit(params).then(res=>{
uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data, ) this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data, )
} else { } else {
@ -434,6 +438,12 @@
}) })
}) })
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
} }
} }

6
pages/purchaseReceipt/coms/comReceiptDetailCard.vue

@ -3,7 +3,7 @@
<uni-collapse ref="collapse1" @change=""> <uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"></itemCompareQty>
</template> </template>
<u-line /> <u-line />
<view class="" v-for="(item,index) in dataContent.subList"> <view class="" v-for="(item,index) in dataContent.subList">
@ -29,7 +29,7 @@
</template> </template>
<script> <script>
import itemQty from '@/mycomponents/item/itemQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
@ -44,7 +44,7 @@
export default { export default {
components: { components: {
itemQty, itemCompareQty,
recommend, recommend,
recommendQtyEdit, recommendQtyEdit,
jobDetailPopup, jobDetailPopup,

2
pages/putaway/record/putawayRecord.vue

@ -101,11 +101,9 @@
jobContent: {}, // jobContent: {}, //
detailSource: [], // detailSource: [], //
locationTypeList: [], locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
fromLocationInfo: {}, fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "", toLocationCode: "",
isShowLocation: false, isShowLocation: false,
fromlocationTypeList: [], fromlocationTypeList: [],

Loading…
Cancel
Save