Commit b3efc42b authored by 我在何方's avatar 我在何方
parents 5b5226a1 b6a0591c
......@@ -34,6 +34,11 @@ export default {
lang: {
type: String,
default: 'Zh'
},
// 是否显示待确认商品,不传默认不显示
determined: {
type: Boolean,
default: false
}
},
data(){
......@@ -85,7 +90,7 @@ export default {
remoteMethod(keyword){
let params = {
pageSize: keyword ? 100000 : 10,
filter: false
filter: !this.determined
}
if(this.productType){
params.typeId = this.productType
......
......@@ -241,27 +241,36 @@
<el-option v-for="item in splitData[0].orderSplitItemBackVOList" :label="item.prodTitleEn" :value="item.id" :key="item.prodTitleEn" ></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('剩余箱数')">
{{shopForm.sum||0}}
<el-form-item :label2="$t('剩余箱数')" v-if="mainOrderItem.orderItemId">
剩余箱数{{ shopForm.sum || 0 }},可放入箱数:{{ mainOrderItem.num - 1 }}
</el-form-item>
<el-form-item :label="$t('放入箱数')">
<el-input-number v-model="shopForm.num" @change="numChange" controls-position="right" :min="1" :max="shopForm.sum"></el-input-number>
<el-input-number v-model="shopForm.num" @change="numChange" controls-position="right" :min="1" :max="mainOrderItem.num-1"></el-input-number>
</el-form-item>
<el-form-item v-if="quantityshow" :label="$t('放入数量')+'('+$t('个')+')'">
<el-input-number v-model="shopForm.quantity" controls-position="right" :min="1" :max="quantitySum"></el-input-number>
<el-input-number v-model="shopForm.quantity" controls-position="right" :min="1" :max="mainOrderItem.quantity-1" :placeholder="$t('最多可放入{quantity}', {
quantity: mainOrderItem.quantity-1
})"></el-input-number>
</el-form-item>
<el-form-item :label="$t('入仓体积')">
<el-input-number v-model="shopForm.volume" @change="numChange" controls-position="right" :min="1" :max="shopForm.sum"></el-input-number>
<el-form-item v-if="mainOrderItem.orderItemId">
<div>{{ $t('剩余入仓方数') }}:{{ mainOrderItem.volume || 0 }}m³,{{$t('可放入仓方数')}}:{{ (mainOrderItem.volume - 0.01).toFixed(2) }}m³</div>
<div>{{$t('剩余收费方数')}}:{{ mainOrderItem.chargeVolume || 0 }}m³,{{$t('可放入收费方数')}}:{{ (mainOrderItem.chargeVolume - 0.01).toFixed(2) }}m³</div>
</el-form-item>
<el-form-item :label="$t('入仓方数')">
<el-input-number v-model="shopForm.volume" controls-position="right" :min="0" :max="(mainOrderItem.volume - 0.01).toFixed(2)"></el-input-number>
</el-form-item>
<el-form-item :label="$t('收费方数')">
<el-input-number v-model="shopForm.chargeVolume" controls-position="right" :min="0" :max="(mainOrderItem.chargeVolume - 0.01).toFixed(2)"></el-input-number>
</el-form-item>
<el-form-item :label="$t('收费体积')">
<el-input-number v-model="shopForm.chargeVolume" @change="numChange" controls-position="right" :min="1" :max="shopForm.sum"></el-input-number>
<el-form-item v-if="mainOrderItem.orderItemId">
<div>{{$t('剩余入仓重量')}}:{{ mainOrderItem.weight || 0 }}kg,{{$t('可放入重量')}}:{{ (mainOrderItem.weight - 0.01).toFixed(2) }}kg</div>
<div>{{$t('剩余收费重量')}}:{{ mainOrderItem.chargeWeight || 0 }}kg,{{$t('可放入收费重量')}}:{{ (mainOrderItem.chargeWeight - 0.01).toFixed(2) }}kg</div>
</el-form-item>
<el-form-item :label="$t('入仓重量')">
<el-input-number v-model="shopForm.weight" @change="numChange" controls-position="right" :min="1" :max="shopForm.sum"></el-input-number>
<el-input-number v-model="shopForm.weight" controls-position="right" :min="0" :max="(mainOrderItem.weight - 0.01).toFixed(2)"></el-input-number>
</el-form-item>
<el-form-item :label="$t('收费重量')">
<el-input-number v-model="shopForm.chargeWeight" @change="numChange" controls-position="right" :min="1" :max="shopForm.sum"></el-input-number>
<el-input-number v-model="shopForm.chargeWeight" controls-position="right" :min="0" :max="(mainOrderItem.chargeWeight - 0.01).toFixed(2)"></el-input-number>
</el-form-item>
<el-form-item :label="$t('备注信息')+':'">
......@@ -389,6 +398,16 @@ export default {
},
getDictDatas(){
return getDictDatas
},
// 放入品名试选择的商品项
orderItem(){
if(!this.orderData || !this.shopForm.orderItemId) return {}
return this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId) || {}
},
// 主单数据,也就是拆分剩余的数据,可用来限制拆单放入的最大值
mainOrderItem(){
if(!this.orderItem.orderItemId || !this.splitData.length || !this.splitData[0].orderSplitItemBackVOList) return {}
return this.splitData[0].orderSplitItemBackVOList.find(item => item.orderItemId == this.orderItem.orderItemId) || {}
}
},
methods: {
......@@ -573,9 +592,16 @@ export default {
this.quantityshow = res.data
})
},
// 输入方数箱数后,按照平均值计算数量和体积重量数据
numChange(){
var sum = parseInt(this.quantitySum/this.shopForm.num)
this.$set(this.shopForm,'quantity',sum)
/*var sum = parseInt(this.quantitySum/this.shopForm.num)
this.$set(this.shopForm,'quantity',sum)*/
let rate = this.shopForm.num/this.mainOrderItem.num
this.$set(this.shopForm, 'quantity', Math.ceil(this.mainOrderItem.quantity * rate))
this.$set(this.shopForm, 'volume', (this.mainOrderItem.volume * rate).toFixed(2))
this.$set(this.shopForm, 'chargeVolume', (this.mainOrderItem.chargeVolume * rate).toFixed(2))
this.$set(this.shopForm, 'weight', (this.mainOrderItem.weight * rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (this.mainOrderItem.chargeWeight * rate).toFixed(2))
},
changeProdTitleEn(){
var list = []
......
......@@ -13,14 +13,14 @@
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<span style="min-width: 200px;margin-right: 15px;display: inline-block">
<product-selector v-if="!order.parentOrderId && !isAdd" v-model="form.prodId" @change="onProductChange"/>
<product-selector v-if="!order.parentOrderId && !isAdd" v-model="form.prodId" @change="onProductChange" determined/>
<span v-else>{{ warehousing.prodTitleZh }}</span>
</span>
<el-button v-if="!order.parentOrderId && !isAdd" type="text" @click="isShowProduct = true">添加新商品</el-button>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<product-selector v-if="!order.parentOrderId && !isAdd" lang="En" v-model="form.prodId" @change="onProductChange"/>
<product-selector v-if="!order.parentOrderId && !isAdd" lang="En" v-model="form.prodId" @change="onProductChange" determined/>
<span v-else>{{ warehousing.prodTitleEn }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment