@@ -186,7 +186,7 @@ class UpdatePickZone implements ToCollection,WithHeadingRow
$map[$qty] = $i;
if (($qty >= $amount && $qty<=$max) || $max===null)$max = $qty;
}
- if ($max !== null)return $lots[$map[$max]];
+ if ($max !== null && $max>=$amount)return $lots[$map[$max]];
return null;
private function matchingMin($lots, $amount)
@@ -9,7 +9,7 @@
<div class="row">
<label for="ownerSelectpicker" class="col-2 offset-1">选择货主</label>
<select data-none-results-text="货主不存在" id="ownerSelectpicker" class="selectpicker col-5" multiple data-live-search="true" title="项目(多选)" {{--v-model="ownerIds[customers[index]['id']]"--}}>
- <option v-for="owner in owners" :value="owner">@{{ owner.name }}</option>
+ <option v-for="owner in owners" :value="owner.id">@{{ owner.name }}</option>
</select>
</div>
<div class="row m-2" v-if="index!==''">
@@ -342,6 +342,15 @@
},
submitRelatedOwner(){
let val = $("#ownerSelectpicker").selectpicker('val');
+ let id = this.customers[this.index]['id'];
+ if (val.length>0){
+ let errors = "";
+ this.owners.forEach(owner=>{
+ val.forEach(v=>{
+ if (v===owner.id&&(owner.customer_id && owner.customer_id!==id)){}
+ });
+ }
console.log(val);