Commit f8c8b3e2 authored by Mac's avatar Mac

电商入库的按钮处理

parent 458c11ff
......@@ -61,12 +61,12 @@
<template slot-scope="scope">
<span>{{scope.row.MaterialModel.Name}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="GoodsSpecificationList" label="规格" >
<template slot-scope="scope">
<span v-for="(x,y) in scope.row.MaterialModel.GoodsSpecificationList" :key="y">{{x}} <span v-if="scope.row.MaterialModel.GoodsSpecificationList.length !== y+1"> , </span></span>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="Number" label="采购数量" width="80"></el-table-column>
<el-table-column prop="StockInNum" label="已入数量" width="80">
<template slot-scope="scope">
......@@ -75,8 +75,8 @@
</el-table-column>
<el-table-column prop="" label="入库数量" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.InStockNum" type="number" :min='0'
:max="scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0)"
<el-input v-model="scope.row.InStockNum" type="number" :min='0'
:max="scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0)"
:disabled="(scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0))==0? true:false"
@input='validation(scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0),scope.row,$event)'
placeholder="请输入"></el-input>
......@@ -84,8 +84,8 @@
</el-table-column>
</el-table>
</div>
<el-button size="small" type="primary" @click="submitForm()" :disabled = 'ISoperation' >入库</el-button
<el-button size="small" type="primary" @click="submitForm()" :disabled = 'ISoperation' :loading="rukuloading">入库</el-button
>
</div>
</template>
......@@ -95,14 +95,15 @@ export default {
return {
Detaildata:{},
WareHouseId:0,
ISoperation:false
ISoperation:false,
rukuloading:false,
};
},
created() {},
methods: {
getProcurementInfo(data) {
this.assetsApipost("/api/property/GetProcurementInfo", {ProcurementId:data.ID}, res => {
if (res.data.resultCode == 1) {
let data = res.data.data
......@@ -114,7 +115,7 @@ export default {
this.Error(res.data.message);
}
})
},
getSuppliesCheckList(WareHouseId){
this.assetsApipost("/api/Property/GetSuppliesCheckList", {}, res => {
......@@ -155,8 +156,10 @@ export default {
this.Error('请输入入库数量');
return
}
this.rukuloading=true
this.assetsApipost("/api/property/SetProcurementStockIn", msg, res => {
if (res.data.resultCode == 1) {
this.rukuloading=false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
// this.getProcurementInfo(this.$route.query)
this.CommonJump('procurementMange')
......@@ -167,7 +170,7 @@ export default {
},
validation(v,row,value){
let that = this
if(value>v){
this.Error('数量不足');
......@@ -178,14 +181,14 @@ export default {
})
}
}
},
mounted() {
this.WareHouseId = this.$route.query.WareHouseId;
this.getSuppliesCheckList(this.$route.query.WareHouseId)
this.getProcurementInfo(this.$route.query)
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment