|
|
@ -174,7 +174,7 @@
|
|
|
|
<u-form-item required label="毛重">
|
|
|
|
<u-form-item required label="毛重">
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].grossWeight"
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].grossWeight"
|
|
|
|
@change="changeData('voucherproduct-grossWeight',i)" :precision="4" :controls="true"
|
|
|
|
@change="changeData('voucherproduct-grossWeight',i)" :precision="4" :controls="true"
|
|
|
|
placeholder="数字文本" :step="1" @input="UpdateWeight(dataForm.voucherProductList[i])">
|
|
|
|
placeholder="数字文本" :step="1" :min="0" @input="UpdateWeight(dataForm.voucherProductList[i])">
|
|
|
|
</jnpf-number-box>
|
|
|
|
</jnpf-number-box>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
@ -182,7 +182,7 @@
|
|
|
|
<u-form-item required label="皮重">
|
|
|
|
<u-form-item required label="皮重">
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].tareWeight"
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].tareWeight"
|
|
|
|
@change="changeData('voucherproduct-tareWeight',i)" :precision="4" :controls="true"
|
|
|
|
@change="changeData('voucherproduct-tareWeight',i)" :precision="4" :controls="true"
|
|
|
|
placeholder="数字文本" :step="1" @input="UpdateWeight(dataForm.voucherProductList[i])">
|
|
|
|
placeholder="数字文本" :step="1" :min="0" @input="UpdateWeight(dataForm.voucherProductList[i])">
|
|
|
|
</jnpf-number-box>
|
|
|
|
</jnpf-number-box>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
@ -190,7 +190,7 @@
|
|
|
|
<u-form-item required label="扣重">
|
|
|
|
<u-form-item required label="扣重">
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].buckleWeight"
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].buckleWeight"
|
|
|
|
@change="changeData('voucherproduct-buckleWeight',i)" :precision="4" :controls="true"
|
|
|
|
@change="changeData('voucherproduct-buckleWeight',i)" :precision="4" :controls="true"
|
|
|
|
placeholder="数字文本" :step="1" @input="UpdateWeight(dataForm.voucherProductList[i])">
|
|
|
|
placeholder="数字文本" :step="1" :min="0" @input="UpdateWeight(dataForm.voucherProductList[i])">
|
|
|
|
</jnpf-number-box>
|
|
|
|
</jnpf-number-box>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
@ -198,7 +198,7 @@
|
|
|
|
<u-form-item required label="结算量">
|
|
|
|
<u-form-item required label="结算量">
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].netWeight"
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].netWeight"
|
|
|
|
@change="changeData('voucherproduct-netWeight',i)" :precision="4" :controls="true"
|
|
|
|
@change="changeData('voucherproduct-netWeight',i)" :precision="4" :controls="true"
|
|
|
|
placeholder="数字文本" :step="1">
|
|
|
|
placeholder="数字文本" :step="1" :min="0">
|
|
|
|
</jnpf-number-box>
|
|
|
|
</jnpf-number-box>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
@ -206,7 +206,7 @@
|
|
|
|
<u-form-item required label="净重">
|
|
|
|
<u-form-item required label="净重">
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].clearWeight"
|
|
|
|
<jnpf-number-box v-model="dataForm.voucherProductList[i].clearWeight"
|
|
|
|
@change="changeData('voucherproduct-clearWeight',i)" :precision="4" :controls="true"
|
|
|
|
@change="changeData('voucherproduct-clearWeight',i)" :precision="4" :controls="true"
|
|
|
|
placeholder="数字文本" :step="1">
|
|
|
|
placeholder="数字文本" :step="1" :min="0">
|
|
|
|
</jnpf-number-box>
|
|
|
|
</jnpf-number-box>
|
|
|
|
</u-form-item>
|
|
|
|
</u-form-item>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
@ -1127,6 +1127,40 @@
|
|
|
|
if (!!this.exist()) return this.$u.toast(
|
|
|
|
if (!!this.exist()) return this.$u.toast(
|
|
|
|
this.exist()
|
|
|
|
this.exist()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
var flag = false
|
|
|
|
|
|
|
|
_data.voucherProductList.forEach(e => {
|
|
|
|
|
|
|
|
var tareWeight = e.tareWeight;//皮重
|
|
|
|
|
|
|
|
var grossWeight = e.grossWeight;//毛重
|
|
|
|
|
|
|
|
var buckleWeight = e.buckleWeight;//扣重
|
|
|
|
|
|
|
|
var netWeight = e.netWeight;//净重
|
|
|
|
|
|
|
|
if (grossWeight < this.jnpf.floatAdd(this.jnpf.floatAdd(tareWeight, buckleWeight), netWeight)) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
title: '毛重不得小于皮重+扣重+净重',
|
|
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
flag = true
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (buckleWeight >= netWeight) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
title: '扣重不得大于净重',
|
|
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
flag = true
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (buckleWeight >= grossWeight) {
|
|
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
|
|
title: '扣重不得大于毛重',
|
|
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
flag = true
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if(flag){
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
this.btnLoading = true
|
|
|
|
this.btnLoading = true
|
|
|
|
if (this.dataForm.id) {
|
|
|
|
if (this.dataForm.id) {
|
|
|
|
request({
|
|
|
|
request({
|
|
|
|