|
@ -234,22 +234,22 @@ export default{ |
|
|
fields:{ |
|
|
fields:{ |
|
|
inOutType:{label:"库类型",type:"select",columns:[],value:[]}, |
|
|
inOutType:{label:"库类型",type:"select",columns:[],value:[]}, |
|
|
inOutBatchNo:{label:"库批次号",btnText:"生成",btnFun:()=>this.formData.inOutBatchNo=`KC${new Date().format('yyyyMMdd')}${new Date().getTime()}`}, |
|
|
inOutBatchNo:{label:"库批次号",btnText:"生成",btnFun:()=>this.formData.inOutBatchNo=`KC${new Date().format('yyyyMMdd')}${new Date().getTime()}`}, |
|
|
inOutVoucher:{label:"库凭证",type:"upImg",value:"",num:3}, |
|
|
pic:{label:"库凭证",type:"upImg",value:"",num:3}, |
|
|
number:{label:"库数量",placeholder:"请输入采购数量"}, |
|
|
number:{label:"库数量",placeholder:"请输入采购数量"}, |
|
|
}, |
|
|
}, |
|
|
formData:{ |
|
|
formData:{ |
|
|
inOutType:"", |
|
|
inOutType:"", |
|
|
goodsId:"", |
|
|
goodsId:"", |
|
|
inOutBatchNo:"", |
|
|
inOutBatchNo:"", |
|
|
inOutVoucher:[], |
|
|
pic:[], |
|
|
number:"", |
|
|
number:"", |
|
|
substanceType:"", |
|
|
substanceType:"", |
|
|
}, |
|
|
}, |
|
|
rules:{ |
|
|
rules:{ |
|
|
inOutType:{required:true}, |
|
|
inOutType:{required:true}, |
|
|
inOutBatchNo:{required:true}, |
|
|
inOutBatchNo:{required:true}, |
|
|
inOutVoucher:{required:true,validator(rule,val,call){ |
|
|
pic:{required:true,validator(rule,val,call){ |
|
|
if(!this.fields.inOutVoucher.value)call(new Error("请上传库凭证!")); |
|
|
if(!this.fields.pic.value)call(new Error("请上传库凭证!")); |
|
|
else call() |
|
|
else call() |
|
|
}}, |
|
|
}}, |
|
|
number:{required:true,type:"number"}, |
|
|
number:{required:true,type:"number"}, |
|
@ -291,14 +291,14 @@ export default{ |
|
|
submit(){ |
|
|
submit(){ |
|
|
this.$refs.form.validate().then(async valid=>{ |
|
|
this.$refs.form.validate().then(async valid=>{ |
|
|
if(valid){ |
|
|
if(valid){ |
|
|
var res=await request("/api/OutInManageApi/outInList",{ |
|
|
var res=await request("/api/Inventory/inventoryOperate",{ |
|
|
method:"post", |
|
|
method:"post", |
|
|
body:{ |
|
|
body:{ |
|
|
...this.formData, |
|
|
...this.formData, |
|
|
...this.detail, |
|
|
...this.detail, |
|
|
equivalentAmount: this.detail.equivalentInventory, |
|
|
equivalentAmount: this.detail.equivalentInventory, |
|
|
supplier: this.detail.supplierName, |
|
|
supplier: this.detail.supplierName, |
|
|
inOutVoucher:this.fields.inOutVoucher.value, |
|
|
pic:this.fields.pic.value, |
|
|
type: ({in:2, out:1})[this.mode], |
|
|
type: ({in:2, out:1})[this.mode], |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|