Browse Source

修改检验任务提交

wms3.0_pda
lijuncheng 12 months ago
parent
commit
274a7bd533
  1. 2
      common/style/uni.css
  2. 34
      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;
flex-direction: row;
align-items: center;
/* justify-content: center; */
/* background-color: #888888; */
}
/* .uni-inline-item text {

34
pages/inspect/coms/inspectComDetailCard.vue

@ -1,13 +1,31 @@
<template>
<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-item :open="true">
<template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)">
</item-compare-qty>
<view class="" style="margin-left: 20rpx; ">
<batch :batch="settingParam.batch"></batch>
<batch :batch="jobContent.batch"></batch>
</view>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.subList">
@ -23,6 +41,9 @@
<view class="" >
报废数量 {{item.crackQty}}
</view>
<view class="" >
合格数量 {{item.goodQty}}
</view>
</view>
</uni-swipe-action-item>
@ -53,6 +74,10 @@
getDetailRemoveOption
} from '@/common/array.js';
import {
getUnitInfo
} from '@/common/directory.js';
export default {
components: {
itemCompareQty,
@ -67,7 +92,7 @@
type: Object,
default: {}
},
settingParam: {
jobContent: {
type: Object,
default: {}
},
@ -166,7 +191,10 @@
})
}
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.crackQty = crackQty
this.dataContent.goodQty = this.dataContent.handleQty -failedQty-crackQty
this.afterSave()

40
pages/inspect/job/inspectDetail.vue

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

14
pages/inspect/job/inspectResult.vue

@ -387,7 +387,10 @@
} else if (this.nextAction == "PARTIAL_OK") {
//
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") {
@ -402,7 +405,7 @@
res.failedReason ="";
res.photos = ""
res.inspectResult =""
res.inspectUser =this.$store.state.user.id
res.inspectUser = this.$store.state.user.id
})
this.jobContent.nextAction = this.nextAction;
this.submitJob(this.jobContent)
@ -416,6 +419,7 @@
});
console.log("提交参数", JSON.stringify(params));
inspectJobSubmit(params).then(res=>{
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data, )
} 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": {
"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",
"dev":"http://dev.ccwin-in.com:25100/api/admin-api",
"local":"http://localhost:12080",

Loading…
Cancel
Save