Browse Source

修改检验任务提交

wms3.0_pda
lijuncheng 12 months ago
parent
commit
274a7bd533
  1. 2
      common/style/uni.css
  2. 36
      pages/inspect/coms/inspectComDetailCard.vue
  3. 2
      pages/inspect/coms/inspectEdit.vue
  4. 40
      pages/inspect/job/inspectDetail.vue
  5. 14
      pages/inspect/job/inspectResult.vue
  6. 2
      static/config.json

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 {

36
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>
@ -52,7 +73,11 @@
getDetailEditRemoveOption, getDetailEditRemoveOption,
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
@ -456,6 +473,7 @@
}) })
}, },
} }
} }

14
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") {
@ -402,7 +405,7 @@
res.failedReason =""; res.failedReason ="";
res.photos = "" res.photos = ""
res.inspectResult ="" res.inspectResult =""
res.inspectUser =this.$store.state.user.id res.inspectUser = this.$store.state.user.id
}) })
this.jobContent.nextAction = this.nextAction; this.jobContent.nextAction = this.nextAction;
this.submitJob(this.jobContent) this.submitJob(this.jobContent)
@ -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) {
}
});
},
} }
} }

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://dev.ccwin-in.com:25100/api/admin-api", "value": "http://192.168.0.157:12080/admin-api",
"dev2":"http://192.168.0.157:12080/admin-api", "dev2":"http://192.168.0.157:12080/admin-api",
"dev":"http://dev.ccwin-in.com:25100/api/admin-api", "dev":"http://dev.ccwin-in.com:25100/api/admin-api",
"local":"http://localhost:12080", "local":"http://localhost:12080",

Loading…
Cancel
Save