Browse Source

库存管理 出入库 添加操作时间

master
邓宏 2 years ago
parent
commit
5a74022964
  1. 3
      pages/stock/list.vue

3
pages/stock/list.vue

@ -167,6 +167,7 @@
<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 :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"/>
<d-form label="操作日期" field="operationTime" required type="calendar" v-model="formData.operationTime"/>
<template v-if="formData.substanceType==2&&formData.inOutType=='out01'&&recoveryBatch.list.length>0">
<view style="display:flex;margin:-20rpx 0;">
<d-form label="规格" required field="specification" type="digit" suffix="kg" :value="formData.specification" @input="formData.specification=$event"/>
@ -208,6 +209,7 @@ export default{
pic:[],
number:"",
substanceType:"",
operationTime:"",
tradeWeight:"",
specification:"",
@ -226,6 +228,7 @@ export default{
if(!val)call(new Error(`${({in:'入',out:'出'})[this.mode]}库批次号必填!`));
else call()
},trigger:['blur','change']},
operationTime:{required:true,message:"请选择操作日期!",trigger:['blur','change']},
number:{required:true,validator:(rule,val,call)=>{
var title=({1:({in:'入',out:'出'})[this.mode],2:'交易重量'})[this.formData.substanceType]
if(!(val>0))call(new Error(`请输入${title}`));

Loading…
Cancel
Save