Browse Source

农产品出库 选择采收批次 赋值出库批次号

master
邓宏 2 years ago
parent
commit
ea243c7a34
  1. 10
      pages/stock/list.vue

10
pages/stock/list.vue

@ -157,7 +157,7 @@
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];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.at(-1)">
<view slot-scope="{row}" style="display:flex;">
<text style="margin-left:10rpx;font-weight:bold;">{{row.batchNo}}</text>
<text style="font-size:24rpx;color:#999;margin-left:10rpx;">{{row.substanceName}}</text>
@ -165,13 +165,13 @@
</view>
</d-form>
<d-form :label="`${({in:'入',out:'出'})[mode]}库类型`" field="inOutType" required type="select" :columns="inOutType.list" :value="inOutType.value" @select="inOutType.value=$event.map(v=>v.value);formData.inOutType=inOutType.value.at(-1)"/>
<d-form :label="`${({in:'入',out:'出'})[mode]}库批次号`" field="inOutBatchNo" required :value="formData.inOutBatchNo" @input="formData.inOutBatchNo=$event" btnText="生成" :btnFun="()=>this.formData.inOutBatchNo=`${({in:'RK',out:'CK'})[this.mode]}${new Date().format('yyyyMMdd')}${new Date().getTime()}`"/>
<d-form :label="`${({in:'入',out:'出'})[mode]}库批次号`" field="inOutBatchNo" required :disabled="formData.substanceType==2" :value="formData.inOutBatchNo" @input="formData.inOutBatchNo=$event" :btnText="formData.substanceType==1?'生成':''" :btnFun="()=>this.formData.inOutBatchNo=`${({in:'RK',out:'CK'})[this.mode]}${new Date().format('yyyyMMdd')}${new Date().getTime()}`"/>
<d-form :label="({1:`${({in:'入',out:'出'})[mode]}库数量`,2:'交易重量'})[formData.substanceType]" field="number" required :suffix="number.suffix" :value="formData.number" @input="formData.number=$event" type="digit"/>
<template v-if="formData.substanceType==2&&formData.inOutType=='out01'&&recoveryBatch.list.length>0">
<view style="display:flex;align-items: center;">
<view style="display:flex;margin:-20rpx 0;">
<d-form label="规格" required field="specification" type="digit" suffix="kg" :value="formData.specification" @input="formData.specification=$event"/>
<text style="margin:45rpx 20rpx 0 20rpx;">/</text>
<d-form style="width:max-content;margin-top:40rpx;" type="select" placeholder=" " @select="formData.packUnit=$event[0].value" :columns="[packWeightList]" :value="[formData.packUnit]"/>
<text style="margin:90rpx 20rpx 0 20rpx;">/</text>
<d-form style="width:max-content;margin-top:62rpx;" type="select" placeholder=" " @select="formData.packUnit=$event[0].value" :columns="[packWeightList]" :value="[formData.packUnit]"/>
</view>
<d-form label="交易数量" disabled type="digit" :suffix="formData.packUnit" :value="tradeNum"/>
<d-form label="买方名称" required field="buyerName" btnIcon="plant-sousuo" :btnFun="searchBuy" :value="formData.buyerName" @input="formData.buyerName=$event"/>

Loading…
Cancel
Save