|
@@ -33,20 +33,19 @@
|
|
|
</view>
|
|
|
<view class="row row-bottom">
|
|
|
<view class="left">净重(吨)</view>
|
|
|
- <input @input='calculate' v-model='detailData.netWeight' class="right-bottom"
|
|
|
- placeholder="不可编辑,自动计算"></input>
|
|
|
+ <input v-model='netWeight' disabled class="right-bottom" placeholder="不可编辑,自动计算"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom" v-if="detailData.type == '潮粮'">
|
|
|
<view class="left">扣重比</view>
|
|
|
- <input v-model='detailData.buckleWeightRatio' class="right-bottom" placeholder="输入扣重比"></input>
|
|
|
+ <input v-model='detailData.buckleWeightRatio' class="right-bottom" placeholder="输入扣重比" @input="pureWeightCount"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom" v-if="detailData.type == '潮粮'">
|
|
|
<view class="left">干粮水分(%)</view>
|
|
|
- <input v-model='detailData.solidGrainWater' class="right-bottom" placeholder="输入干粮水分占比"></input>
|
|
|
+ <input v-model='detailData.solidGrainWater' class="right-bottom" placeholder="输入干粮水分占比" @input="pureWeightCount"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom" v-if="detailData.type == '潮粮'">
|
|
|
<view class="left">潮粮水分(%)</view>
|
|
|
- <input v-model='detailData.tidalGrainWater' class="right-bottom" placeholder="输入潮粮水分占比"></input>
|
|
|
+ <input v-model='detailData.tidalGrainWater' class="right-bottom" placeholder="输入潮粮水分占比" @input="pureWeightCount"></input>
|
|
|
</view>
|
|
|
<view class="row row-bottom" v-if="detailData.type == '潮粮'">
|
|
|
<view class="left">纯重(吨)</view>
|
|
@@ -192,8 +191,6 @@
|
|
|
binNumber:'',
|
|
|
detailData: {
|
|
|
contractNo: "请选择合同编号或移库任务编号",
|
|
|
- carNo: '辽H12345',
|
|
|
- name: "",
|
|
|
type: "请选择类型",
|
|
|
grade: "请输入品级",
|
|
|
agent: "请选择经办人",
|
|
@@ -211,21 +208,24 @@
|
|
|
second: true
|
|
|
},
|
|
|
inOutDate1: "",
|
|
|
+ netWeight:""
|
|
|
}
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ netWeight:function(v){
|
|
|
+ this.pureWeightCount()
|
|
|
+ },
|
|
|
+ },
|
|
|
onLoad(options) {
|
|
|
this.id = options.id
|
|
|
this.cangId = options.cangId
|
|
|
},
|
|
|
onShow() {
|
|
|
- console.log(helper.erpWarehouse.baseId,"仓位id")
|
|
|
this.binNumber = helper.erpWarehouse.binNumber
|
|
|
this.warehouseName = helper.erpWarehouse.warehouseName
|
|
|
this.detailData.goodsName = uni.getStorageSync('erpContractNo').goodsName;
|
|
|
this.detailData.contractNo = uni.getStorageSync('erpContractNo').contractNo;
|
|
|
this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
|
|
|
- console.log(this.detailData.goodsNameKey,"keyzhi")
|
|
|
- console.log(uni.getStorageSync('erpContractNoList'))
|
|
|
if(!this.detailData.contractNo){
|
|
|
this.detailData.contractNo = '请选择合同编号'
|
|
|
}
|
|
@@ -238,6 +238,14 @@
|
|
|
this.handler()
|
|
|
},
|
|
|
methods: {
|
|
|
+ //计算纯重
|
|
|
+ pureWeightCount(){
|
|
|
+ if(this.netWeight && this.detailData.buckleWeightRatio && this.detailData.solidGrainWater && this.detailData.tidalGrainWater){
|
|
|
+ // 纯重=净重x[100-(潮粮水分-干粮水分)x扣重比]/100
|
|
|
+ this.detailData.pureWeight = 100-(this.detailData.tidalGrainWater - this.detailData.solidGrainWater)*this.netWeight*this.detailData.buckleWeightRatio/100
|
|
|
+ this.detailData.pureWeight= this.detailData.pureWeight.toFixed(3)
|
|
|
+ }
|
|
|
+ },
|
|
|
outWarehouse(){
|
|
|
this.$api.doRequest('get', '/commonSysParameter/getInfo', {
|
|
|
constId: 'CON6'
|
|
@@ -260,11 +268,11 @@
|
|
|
this.detailData.type = this.typeList[e].type
|
|
|
},
|
|
|
pjPicker(e) {
|
|
|
- console.log(e[0],"dd")
|
|
|
this.detailData.gradeKey = e[0]
|
|
|
this.detailData.grade = this.pjList[e].type
|
|
|
},
|
|
|
handlerPicker(e) {
|
|
|
+ this.detailData.agentKey = e[0]
|
|
|
this.detailData.agent = this.handlerList[e].staffName
|
|
|
},
|
|
|
dateChange(e) {
|
|
@@ -288,7 +296,7 @@
|
|
|
},
|
|
|
calculate() {
|
|
|
if (this.detailData.grossWeight && this.detailData.tare) {
|
|
|
- this.detailData.netWeight = this.detailData.grossWeight - this.detailData.tare
|
|
|
+ this.netWeight = this.detailData.grossWeight - this.detailData.tare
|
|
|
}
|
|
|
},
|
|
|
getImgUrl(res) {
|
|
@@ -329,7 +337,6 @@
|
|
|
})
|
|
|
},
|
|
|
onProgress(e) {
|
|
|
- console.log(e)
|
|
|
},
|
|
|
onRemove(index) {},
|
|
|
submit(num) {
|
|
@@ -352,11 +359,9 @@
|
|
|
this.detailData.warehouseName = helper.erpWarehouse.warehouseName
|
|
|
this.detailData.positionId = helper.erpWarehouse.baseId
|
|
|
this.detailData.binNumber = this.binNumber
|
|
|
- console.log(this.detailData.positionId,"仓库id")
|
|
|
- console.log(this.detailData.binNumber,"仓库号")
|
|
|
this.detailData.goodsNameKey = uni.getStorageSync('erpContractNo').goodsNameKey;
|
|
|
- console.log(this.detailData.goodsNameKey,"|key值")
|
|
|
this.detailData.compId = helper.erpWarehouse.compId
|
|
|
+ this.detailData.netWeight = this.netWeight
|
|
|
this.detailData.inOutFlag = 1
|
|
|
this.detailData.taskType = "出库任务"
|
|
|
this.detailData.pcFlag = 0
|
|
@@ -370,8 +375,6 @@
|
|
|
title = "提交成功"
|
|
|
}
|
|
|
let that = this
|
|
|
- console.log(this.detailData,"提交对象")
|
|
|
- return
|
|
|
uni.showModal({
|
|
|
content: "确定提交出库信息?",
|
|
|
success(res) {
|
|
@@ -389,7 +392,7 @@
|
|
|
},
|
|
|
slectcontractNo() {
|
|
|
uni.navigateTo({
|
|
|
- url: '/pages/erp/warehousing/selectContractNo?compId=' + this.compId
|
|
|
+ url: '/pages/erp/warehousing/selectContractNo?flag=' + 5
|
|
|
})
|
|
|
},
|
|
|
slectCarNo() {
|