|
|
@ -217,21 +217,8 @@ |
|
|
|
</u-form> |
|
|
|
</view> |
|
|
|
|
|
|
|
<button class="cu-btn round bg-green shadow submit">确定</button> |
|
|
|
<button class="cu-btn round bg-green shadow submit" @click="submit">确定</button> |
|
|
|
|
|
|
|
<!-- <d-picker ref="dPicker" :list="stockList"> |
|
|
|
<view slot-scope="{row}" class="stock-picker"> |
|
|
|
<view class="info"> |
|
|
|
<text>{{row.agriculturalGoods}}</text> |
|
|
|
<text :data-unit="row.specDescribe">{{row.substanceName}}</text> |
|
|
|
<text>补货量≥{{row.replenishment||0}}kg</text> |
|
|
|
</view> |
|
|
|
<view class="company"> |
|
|
|
<text style="--c:#FBA83C;margin-right:14rpx;">{{row.detailType}}</text> |
|
|
|
<text style="--c:#999;" class="over">{{row.supplierName}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</d-picker> --> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<script> |
|
|
@ -255,7 +242,8 @@ export default{ |
|
|
|
goodsId:"", |
|
|
|
inOutBatchNo:"", |
|
|
|
inOutVoucher:[], |
|
|
|
number:"" |
|
|
|
number:"", |
|
|
|
substanceType:"", |
|
|
|
}, |
|
|
|
rules:{ |
|
|
|
inOutType:{required:true}, |
|
|
@ -277,6 +265,7 @@ export default{ |
|
|
|
this.fields.number.suffix=(e.specDescribe.match(/\/(.+)/)||['',''])[1] |
|
|
|
this.formData.goodsId=e.id |
|
|
|
}) |
|
|
|
this.formData.substanceType = ({nz:1, ncp:2})[options.type], |
|
|
|
this.mode=options.mode |
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
title:({out:"出库",in:"入库列表"})[this.mode] |
|
|
@ -299,6 +288,31 @@ export default{ |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
submit(){ |
|
|
|
this.$refs.form.validate().then(async valid=>{ |
|
|
|
if(valid){ |
|
|
|
var res=await request("/api/OutInManageApi/outInList",{ |
|
|
|
method:"post", |
|
|
|
body:{ |
|
|
|
...this.formData, |
|
|
|
...this.detail, |
|
|
|
supplier: this.detail.supplierName, |
|
|
|
inOutVoucher:this.fields.inOutVoucher.value, |
|
|
|
type: ({in:2, out:1})[this.mode], |
|
|
|
} |
|
|
|
}) |
|
|
|
if(res.statu){ |
|
|
|
uni.navigateBack() |
|
|
|
}else{ |
|
|
|
uni.showModal({ |
|
|
|
title:"提示", |
|
|
|
content:res.msg||"保存失败!", |
|
|
|
showCancel:false, |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |