diff --git a/pages/massif/plant_plan.vue b/pages/massif/plant_plan.vue index da3d9f2..1249368 100644 --- a/pages/massif/plant_plan.vue +++ b/pages/massif/plant_plan.vue @@ -20,7 +20,7 @@ :field="k" :required="!!rules[k]&&rules[k].required" :value="/^select$/.test(v.type)?fields[k].value:formData[k]" - @select="fields[k].value=$event.map(v=>v.value);formData[k]=fields[k].value.at(-1)" + @select="fields[k].value=$event.map(v=>v.value);formData[k]=fields[k].value.slice(-1)[0]" @input="formData[k]=$event" @imgs="fields[k].value=$event"/> @@ -119,6 +119,7 @@ export default { } }, submit(){ + console.log(this.formData,'----formData-----') this.$refs.form.validate().then(async valid=>{ if(valid){ var res=await request("/api/plantPlan/add",{ diff --git a/pages/purchase/newAgr.vue b/pages/purchase/newAgr.vue index 17f65d8..4083b42 100644 --- a/pages/purchase/newAgr.vue +++ b/pages/purchase/newAgr.vue @@ -20,7 +20,7 @@ :required="!!rules[k]" :value="/^select$/.test(v.type)?fields[k].value:formData[k]" @input="formData[k]=$event" - @select="fields[k].value=$event.map(v=>v.value);formData[k]=fields[k].value.at(-1)"/> + @select="fields[k].value=$event.map(v=>v.value);formData[k]=fields[k].value.slice(-1)[0]"/> diff --git a/pages/stock/list.vue b/pages/stock/list.vue index adab124..5254079 100644 --- a/pages/stock/list.vue +++ b/pages/stock/list.vue @@ -157,14 +157,14 @@ v-if="recoveryBatch.list.length>0" label="采收批次" field="inInventoryBatch" required type="select" :columns="recoveryBatch.list" custom :tip="recoveryBatch.surplus>0?`剩余:${recoveryBatch.surplus}kg`:''" :value="recoveryBatch.value" - @select="recoveryBatch.value=[$event[0].value];formData.inOutBatchNo=$event[0].batchNo;recoveryBatch.number=$event[0].surplus;recoveryBatch.surplus=$event[0].surplus;formData.inInventoryBatch=recoveryBatch.value.at(-1)"> + @select="recoveryBatch.value=[$event[0].value];formData.inOutBatchNo=$event[0].batchNo;recoveryBatch.number=$event[0].surplus;recoveryBatch.surplus=$event[0].surplus;formData.inInventoryBatch=recoveryBatch.value.slice(-1)[0]"> {{row.batchNo}} {{row.substanceName}} 剩余:{{row.surplus}} - + diff --git a/pages/stock/prodWarehouse.vue b/pages/stock/prodWarehouse.vue index bf6c599..0ffb759 100644 --- a/pages/stock/prodWarehouse.vue +++ b/pages/stock/prodWarehouse.vue @@ -18,7 +18,7 @@ :required="!!rules[k]" :value="/^select$/.test(v.type)?fields[k].value:formData[k]" @input="formData[k]=$event" - @select="fields[k].value=$event.map(v=>v.value);formData[k]=fields[k].value.at(-1)" + @select="fields[k].value=$event.map(v=>v.value);formData[k]=fields[k].value.slice(-1)[0]" @imgs="fields[k].value=$event"/>