Commit 183715f0 authored by 罗超's avatar 罗超

新增耗材出库

parent 3c91adc3
...@@ -44,4 +44,39 @@ import request from '../../utils/request_zc' ...@@ -44,4 +44,39 @@ import request from '../../utils/request_zc'
method: 'post', method: 'post',
data data
}) })
}
/**
* 出库申请 - 出库
*
*/
export function SuppliesStockOut(data) {
return request({
url: '/supplies/SetSuppliesApplyForStockOut',
method: 'post',
data
})
}
/**
* 获取仓库
*
*/
export function GetWareHouse(data) {
return request({
url: '/Supplies/GetWareHouseList',
method: 'post',
data
})
}
/**
* 设置出库申请状态
*
*/
export function SetSuppliesStockOutApplyForState(data) {
return request({
url: '/supplies/SetSuppliesStockOutApplyForState',
method: 'post',
data
})
} }
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="PropertyProcurementDetails padContent ck_detail" v-loading="pageLoad"> <div class="PropertyProcurementDetails padContent ck_detail" v-loading="pageLoad">
<div style="border-bottom: 1px solid #e2e4eb; padding-bottom: 10px;display:flex;align-items:center;height:50px"> <div style="border-bottom: 1px solid #e2e4eb; padding-bottom: 10px;display:flex;align-items:center;height:50px">
<span class="pageTitle" style="float: inherit">耗材出库详情</span> <span class="pageTitle" style="float: inherit">耗材出库详情</span>
<el-button @click="backTo" round style="background-color:#089bab;color:#fff;margin-left:15px" >返回</el-button> <el-button @click="backTo" round style="background-color:#2961fe;color:#fff;margin-left:15px" >返回</el-button>
</div> </div>
<div <div
style=" style="
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
</p> </p>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-button @click="SetPropertyProcurementStockIn" round style="float: right;background-color:#089bab;color:#fff" :disabled="GetDetail.StockOutStatus === 3">出库</el-button> <el-button @click="setStockoutdig=true" round style="float: right;background-color:#2961fe;color:#fff;margin-left:10px" v-if="isSelfCreate" :disabled="GetDetail.AuditStatus == 2">修改状态</el-button>
<el-button @click="SetStockout" round style="float: right;background-color:#2961fe;color:#fff;" :disabled="GetDetail.AuditStatus != 2||GetDetail.StockOutStatus === 3">出库</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -72,11 +73,19 @@ ...@@ -72,11 +73,19 @@
<span>总数量 :</span> <span>总数量 :</span>
<span>{{ GetDetail.TotalNumber }}</span> <span>{{ GetDetail.TotalNumber }}</span>
</el-col> </el-col>
<el-col :span="12" style="display:flex">
<span>仓库 :</span>
<div>
<q-select filled use-input input-debounce="0" option-value="Id"
option-label="Name" v-model="GetDetail.WareHouseId" :options="storeList" dense
emit-value map-options>
</q-select>
</div>
</el-col>
<el-col :span="24"> <el-col :span="24">
<span>备注 :</span> <span>备注 :</span>
<span>{{ GetDetail.AuditRemark }}</span> <span>{{ GetDetail.Remark }}</span>
</el-col> </el-col>
</el-row> </el-row>
</el-col> </el-col>
...@@ -119,7 +128,7 @@ ...@@ -119,7 +128,7 @@
<td>{{ item.Number }}</td> <td>{{ item.Number }}</td>
<td>{{ item.StockOutNum }}</td> <td>{{ item.StockOutNum }}</td>
<td> <td>
<el-input v-model.number="item.WaitStockOutNum" type="number" @input="inputval(item.WaitStockOutNum,item.Number,index)" :min="0" :max="item.Number" :disabled="GetDetail.StockOutStatus === 3"></el-input> <q-input v-model.number="item.WaitStockOutNum" type="number" @input="inputval(item.WaitStockOutNum,item.Number,index)" :min="0" :max="item.Number" :disable="GetDetail.AuditStatus != 2||GetDetail.StockOutStatus === 3"></q-input>
</td> </td>
</tr> </tr>
...@@ -129,36 +138,97 @@ ...@@ -129,36 +138,97 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<q-dialog v-model="setStockoutdig">
<q-card class="q-px-md" style="width:1000px;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">修改状态</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-6 q-mt-lg">
<q-select filled use-input input-debounce="0" option-value="id" label="类型"
option-label="name" v-model="stateMsg.Type" :options="stateOption"
emit-value map-options>
</q-select>
</div>
</div>
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-12 q-mt-lg">
<q-input v-model="stateMsg.Remark" label="备注" type="textarea" filled></q-input>
</div>
</div>
<div class="col row wrap q-mr-lg q-col-gutter-md q-mb-lg">
<div class="col-12 q-mt-lg" >
<q-btn color="primary" label="提交" style="float:right" class="q-ml-sm" @click="SetStockoutState"></q-btn>
<q-btn text-color="primary" label="取消" style="float:right" @click="setStockoutdig=false"></q-btn>
</div>
</div>
</q-card>
</q-dialog>
</div> </div>
</template> </template>
<script> <script>
import {GetSuppliesStockOutApplyForDetail} from '../../api/sale/StockOutApplyFor' import {GetSuppliesStockOutApplyForDetail,SuppliesStockOut,GetWareHouse,SetSuppliesStockOutApplyForState} from '../../api/sale/StockOutApplyFor'
export default { export default {
data() { data() {
return { return {
ApplyForId: 0, ApplyForId: 0,
isSelfCreate:false,//出库单是否是登录人创建
images: [], images: [],
imageOptions: { imageOptions: {
navbar: false, navbar: false,
title: false, title: false,
}, },
pageLoad: false, pageLoad: false,
storeList:[],
GetDetail: { GetDetail: {
WareHouseId:0,
DetailList: [ DetailList: [
], ],
}, },
uploadImgList: [], uploadImgList: [],
setStockoutdig:false,
stateMsg:{
ApplyForId:0,
Type:1,
Remark:"",
},
stateOption:[
{
id:1,
name:"取消"
},
{
id:2,
name:"审核通过"
},
{
id:3,
name:"审核驳回"
}
]
}; };
}, },
created() { created() {
this.ApplyForId = this.$route.query.Id; this.ApplyForId = this.$route.query.Id;
this.stateMsg.ApplyForId=this.$route.query.Id;
this.getDetail(); this.getDetail();
this.getWareHouse();
},
mounted() {
}, },
mounted() {},
methods: { methods: {
getWareHouse(){
GetWareHouse({}).then(res=>{
this.storeList=res.data.data
})
},
inputval(val,maxVal,index){ inputval(val,maxVal,index){
this.$forceUpdate(); this.$forceUpdate();
if(val>maxVal){ if(val>maxVal){
...@@ -172,45 +242,55 @@ export default { ...@@ -172,45 +242,55 @@ export default {
}, },
getDetail() { getDetail() {
this.pageLoad = true; this.pageLoad = true;
let that=this
GetSuppliesStockOutApplyForDetail({ApplyForId:this.ApplyForId}).then(res=>{ GetSuppliesStockOutApplyForDetail({ApplyForId:this.ApplyForId}).then(res=>{
this.pageLoad = false; this.pageLoad = false;
if(res.data.resultCode===1){ if(res.data.resultCode===1){
console.log(res.data.data)
this.GetDetail=res.data.data this.GetDetail=res.data.data
this.GetDetail.DetailList.forEach(item=>{ this.GetDetail.DetailList.forEach(item=>{
item.WaitStockOutNum=item.StockOutNum item.WaitStockOutNum=item.StockOutNum
}) })
that.isSelf();
} }
}) })
}, },
//采购单入 //
SetPropertyProcurementStockIn() { SetStockout() {
// let msg = { let msg = {
// ProcurementId: this.GetDetail.Id, Id: this.GetDetail.Id,
// StockInDate: this.GetDetail.BuyDate, WareHouseId: this.GetDetail.WareHouseId,
// DetailList: [], DetailList: [],
// }; };
// this.GetDetail.DetailList.map((item) => { this.GetDetail.DetailList.map((item) => {
// let obj = { let obj = {
// Id:item.Id, Id:item.Id,
// MaterialId: item.MaterialId, WaitStockOutNum:item.WaitStockOutNum
// WaitStockInNum: item.WaitStockInNum, };
// }; msg.DetailList.push(obj);
// msg.DetailList.push(obj); });
// }); SuppliesStockOut(msg).then(res=>{
// this.apiJavaPost(
// "/api/supplies/SetSuppliesProcurementStockIn", })
// msg,
// (res) => { },
// if (res.data.resultCode === 1) { SetStockoutState(){
// this.Success(res.data.message) SetSuppliesStockOutApplyForState(this.stateMsg).then(res=>{
// } else { if(res.data.resultCode===1){
// this.Error(res.data.message); this.Success(res.data.message)
// } }else {
// }, this.Error(res.data.message);
// null }
// ); })
}, },
//判断登录人是否是创建人
isSelf(){
let loginId= JSON.parse(localStorage.getItem('loginUserInfo')).data.Id
if(this.GetDetail.CreateBy===loginId){
this.isSelfCreate=true
}else{
this.isSelfCreate=false
}
}
}, },
}; };
</script> </script>
......
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">出库管理</div> <div class="col-2 q-table__title">出库管理</div>
<q-space /> <q-space />
<q-btn color="primary" size="11px" @click="showAdd">新增出库单</q-btn> <q-btn color="accent" size="11px" icon="add" @click="showAdd">新增出库单</q-btn>
</template> </template>
<template v-slot:body-cell-StockOutStatus="props"> <template v-slot:body-cell-StockOutStatus="props">
<q-td :props="props"> <q-td :props="props">
...@@ -422,6 +422,9 @@ ...@@ -422,6 +422,9 @@
// 显示新增出库单 // 显示新增出库单
showAdd(){ showAdd(){
this.showaddStockOut=true this.showaddStockOut=true
},
closePop(){
this.showaddStockOut=false
} }
} }
} }
......
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