Commit 54c4de74 authored by 黄媛媛's avatar 黄媛媛
parents aeca4d66 ab512cda
...@@ -124,13 +124,15 @@ ...@@ -124,13 +124,15 @@
DetailList: [] DetailList: []
}, },
isCheckAll:false, isCheckAll:false,
checkList:[] checkList:[],
isFrom:0
}; };
}, },
mounted() { mounted() {
this.msg.CheckId = this.$route.query.CheckId; this.msg.CheckId = this.$route.query.CheckId;
this.saveMsg.CheckId = this.$route.query.CheckId; this.saveMsg.CheckId = this.$route.query.CheckId;
this.saveMsg.WarehouseId = this.$route.query.WarehouseId; this.saveMsg.WarehouseId = this.$route.query.WarehouseId;
this.isFrom = this.$route.query.isFrom;
this.getList(); this.getList();
this.getCheckStatus(); this.getCheckStatus();
}, },
...@@ -152,8 +154,14 @@ ...@@ -152,8 +154,14 @@
); );
}, },
Backto() { Backto() {
let path='';
if(this.isFrom==1){
path='/InventoryDetails'
}else{
path='/InventoryDetail'
}
this.$router.push({ this.$router.push({
path: "/InventoryDetail", path: path,
query: { query: {
CheckId: this.msg.CheckId CheckId: this.msg.CheckId
} }
......
...@@ -93,13 +93,15 @@ ...@@ -93,13 +93,15 @@
DetailList: [] DetailList: []
}, },
isCheckAll:false, isCheckAll:false,
checkList:[] checkList:[],
isFrom:0
}; };
}, },
mounted() { mounted() {
this.msg.CheckId = this.$route.query.CheckId; this.msg.CheckId = this.$route.query.CheckId;
this.saveMsg.CheckId = this.$route.query.CheckId; this.saveMsg.CheckId = this.$route.query.CheckId;
this.saveMsg.WarehouseId = this.$route.query.WarehouseId; this.saveMsg.WarehouseId = this.$route.query.WarehouseId;
this.isFrom = this.$route.query.isFrom;
this.getList(); this.getList();
}, },
methods: { methods: {
...@@ -108,8 +110,14 @@ ...@@ -108,8 +110,14 @@
this.getList(); this.getList();
}, },
Backto() { Backto() {
let path='';
if(this.isFrom==1){
path='/InventoryDetails'
}else{
path='/InventoryDetail'
}
this.$router.push({ this.$router.push({
path: "/InventoryDetail", path: path,
query: { query: {
CheckId: this.msg.CheckId CheckId: this.msg.CheckId
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/img/more.png" alt="" /> <img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/img/more.png" alt="" />
</span> </span>
<span @click="getList" style="margin-left:20px" class="chaxunSpan">查询</span> <span @click="getList" style="margin-left:20px" class="chaxunSpan">查询</span>
<span style="margin-left:20px" class="chaxunSpan">批量保存</span> <span @click="saveAll" style="margin-left:20px" class="chaxunSpan">批量保存</span>
<span @click="outerVisible=true" style="margin-left:20px" class="chaxunSpan">盘点导入</span> <span @click="outerVisible=true" style="margin-left:20px" class="chaxunSpan">盘点导入</span>
<span @click="goBaosun('InventoryBosun')" style="margin-left:20px" class="chaxunSpan">查看报损</span> <span @click="goBaosun('InventoryBosun')" style="margin-left:20px" class="chaxunSpan">查看报损</span>
<span @click="goBaosun('InventoryBoyi')" style="margin-left:20px" class="chaxunSpan">查看报溢</span> <span @click="goBaosun('InventoryBoyi')" style="margin-left:20px" class="chaxunSpan">查看报溢</span>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<ul v-show="morequery" class="queryul"> <ul v-show="morequery" class="queryul">
扫码出库 扫码出库
<li> <li>
<el-input class="w200" size="small" v-model="barCode" placeholder="商品出库条码" @keyup.enter.native="getList()"> <el-input class="w200" size="small" v-model="barCode" @keyup.enter.native="payCode" placeholder="商品出库条码">
</el-input> </el-input>
</li> </li>
<li> <li>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<vxe-table stripe style="margin-top:15px" :loading="loading" :data="tableData"> <vxe-table stripe style="margin-top:15px" :loading="loading" :data="tableData">
<vxe-table-column field="Name" title="状态" width="120"> <vxe-table-column field="Name" title="状态" width="120">
<template v-slot="{ row }"> <template v-slot="{ row }">
<span class="ColorSpan huangSpan" v-if="row.CheckStatus == 1"></span> <span class="ColorSpan huangSpan" v-if="row.CheckStatus == 1" :id="row.SuppliesId"></span>
<span class="ColorSpan greenSpan" v-if="row.CheckStatus == 2"></span> <span class="ColorSpan greenSpan" v-if="row.CheckStatus == 2"></span>
<span class="ColorSpan purpleSpan" v-if="row.CheckStatus == 3"></span> <span class="ColorSpan purpleSpan" v-if="row.CheckStatus == 3"></span>
<span class="ColorSpan redSpan" v-if="row.CheckStatus == 4"></span> <span class="ColorSpan redSpan" v-if="row.CheckStatus == 4"></span>
...@@ -58,14 +58,14 @@ ...@@ -58,14 +58,14 @@
v-if="row.SpecificationList.length !== y+1"> , </span></span> v-if="row.SpecificationList.length !== y+1"> , </span></span>
</template> </template>
</vxe-table-column> </vxe-table-column>
<vxe-table-column field="InventoryNum" title="库存" width="100"></vxe-table-column> <vxe-table-column field="InventoryNum" title="库存" width="80"></vxe-table-column>
<vxe-table-column field="RealityNum" title="实际数量"> <vxe-table-column field="RealityNum" title="实际数量" width="100">
<template v-slot="{ row }"> <template v-slot="{ row }">
<el-input type='text' class="w80" @keyup.native="checkInteger(row,'RealityNum')" v-model="row.RealityNum" /> <el-input type='text' class="w70" @keyup.native="checkInteger(row,'RealityNum')" :ref="'barCodeInput'+row.SuppliesId" v-model="row.RealityNum" />
<span class="InventoryMsg" :id="'barTishi'+row.SuppliesId">盘点数量+1</span>
</template> </template>
</vxe-table-column> </vxe-table-column>
<vxe-table-column field="Remark" title="备注" width="200"></vxe-table-column> <vxe-table-column field="Remark" title="备注" width="200"></vxe-table-column>
<vxe-table-column field="CheckEmpName" title="盘点人/时间" width="200"> <vxe-table-column field="CheckEmpName" title="盘点人/时间" width="200">
<template v-slot="{ row }"> <template v-slot="{ row }">
<span v-if="row.CheckEmpName||row.CheckDate">{{row.CheckEmpName}}/{{row.CheckDate}}</span> <span v-if="row.CheckEmpName||row.CheckDate">{{row.CheckEmpName}}/{{row.CheckDate}}</span>
...@@ -81,10 +81,10 @@ ...@@ -81,10 +81,10 @@
<vxe-table-column field="address" title="操作"> <vxe-table-column field="address" title="操作">
<template v-slot="{ row }"> <template v-slot="{ row }">
<template v-if="CheckState!=2">
<el-tooltip class="item" effect="dark" content="保存" placement="top"> <el-tooltip class="item" effect="dark" content="保存" placement="top">
<img @click="saveInfo(row)" style="width:24px;height:24px" src="../../assets/img/step1.png" alt=""> <img @click="saveInfo(row)" style="width:24px;height:24px" src="../../assets/img/step1.png" alt="">
</el-tooltip> </el-tooltip>
<el-tooltip style="display:inline-block;position:relative;top:-2px;" class="item" effect="dark" <el-tooltip style="display:inline-block;position:relative;top:-2px;" class="item" effect="dark"
content="上传图片" placement="top"> content="上传图片" placement="top">
<el-upload :http-request="uploadFileBtn" :multiple="false" :show-file-list="false" action> <el-upload :http-request="uploadFileBtn" :multiple="false" :show-file-list="false" action>
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
<img style="width:24px;height:24px" @click="getRowRemark(row)" src="../../assets/img/edit.png" alt="" /> <img style="width:24px;height:24px" @click="getRowRemark(row)" src="../../assets/img/edit.png" alt="" />
</el-tooltip> </el-tooltip>
</template> </template>
</template>
</vxe-table-column> </vxe-table-column>
</vxe-table> </vxe-table>
<el-pagination @current-change="currentChange" background :page-size="msg.pageSize" layout="prev, pager, next" <el-pagination @current-change="currentChange" background :page-size="msg.pageSize" layout="prev, pager, next"
...@@ -172,12 +173,15 @@ ...@@ -172,12 +173,15 @@
Content: '', Content: '',
commonRow: {}, commonRow: {},
//仓库id //仓库id
WarehouseId: 0 WarehouseId: 0,
//CheckState用于管理操作按钮
CheckState:0
}; };
}, },
mounted() { mounted() {
this.msg.CheckId = this.$route.query.CheckId; this.msg.CheckId = this.$route.query.CheckId;
this.WarehouseId = this.$route.query.WarehouseId; this.WarehouseId = this.$route.query.WarehouseId;
this.CheckState = this.$route.query.CheckState;
this.getList(); this.getList();
this.getCheckStatus(); this.getCheckStatus();
//上传接口路径 //上传接口路径
...@@ -200,7 +204,6 @@ ...@@ -200,7 +204,6 @@
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.tableData = res.data.data.pageData; this.tableData = res.data.data.pageData;
this.total = res.data.data.count; this.total = res.data.data.count;
console.log(this.tableData, 'tabledata');
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
...@@ -239,7 +242,7 @@ ...@@ -239,7 +242,7 @@
}, },
//完成盘点 //完成盘点
complePandian() { complePandian() {
this.$confirm("是否确定盘点?", "提示", { this.$confirm("未盘资产将标记盘亏,是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: 'warning' type: 'warning'
...@@ -273,7 +276,6 @@ ...@@ -273,7 +276,6 @@
//上传 //上传
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
if (res.resultCode == 1) { if (res.resultCode == 1) {
console.log(res, '上传后');
this.outerVisible = false; this.outerVisible = false;
} else { } else {
this.Error(res.message); this.Error(res.message);
...@@ -282,7 +284,6 @@ ...@@ -282,7 +284,6 @@
}, },
//耗材单个盘点保存 //耗材单个盘点保存
saveInfo(row) { saveInfo(row) {
console.log(row, 'row');
let msg = { let msg = {
CheckDetailId: row.Id, CheckDetailId: row.Id,
Type: this.Type, Type: this.Type,
...@@ -305,7 +306,6 @@ ...@@ -305,7 +306,6 @@
}, },
//点击上传图片 //点击上传图片
getRow(row) { getRow(row) {
console.log(row, '点了上传');
this.Type = 2; this.Type = 2;
this.commonId = row.Id; this.commonId = row.Id;
this.ImageList = row.ImageList; this.ImageList = row.ImageList;
...@@ -373,20 +373,86 @@ ...@@ -373,20 +373,86 @@
file.file.size < 1024 ? file.file.size < 1024 ?
file.file.size : file.file.size :
(file.file.size / 1024).toFixed(0); (file.file.size / 1024).toFixed(0);
var data=JSON.parse(JSON.stringify(this.tableData)); this.tableData.forEach(y => {
data.forEach(y => {
if (y.Id == this.commonId) { if (y.Id == this.commonId) {
y.ImageList.push( y.ImageList.push(
this.domainManager().ViittoFileUrl + x.data.FilePath this.domainManager().ViittoFileUrl + x.data.FilePath
) )
} }
this.tableData=data;
console.log(this.tableData,'table');
}) })
this.saveRemark(); this.saveRemark();
}); });
}, },
//批量保存
saveAll(){
let msg=[];
this.tableData.forEach(x=>{
let obj={
Id:x.Id,
RealityNum:x.RealityNum
}
msg.push(obj);
})
this.apiJavaPost(
"/api/supplies/SetBatchSuppliesCheckDetailReality", msg,
res => {
if (res.data.resultCode === 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message);
}
},
null
);
},
//扫码枪开始
payCode() {
let msg = {
Code: this.barCode,
WareHouseId: this.WarehouseId
}
this.loading = true;
this.apiJavaPost("/api/Supplies/GetProcurementGoodsInfo", msg,
res => {
this.loading = false;
if (res.data.resultCode === 1) {
var myData = res.data.data.GoodsModel;
var isInStore=true;
if(myData){
var scanMsg = {};
if(myData.WarehouseId!=this.WarehouseId){
this.Error('该商品未在此仓库中!');
return;
}else{
this.tableData.forEach((x,index)=>{
if(x.SuppliesId==myData.SuppliesId){
x.RealityNum++;
isInStore=false;
document.getElementById(myData.SuppliesId).scrollIntoView({ behavior: 'smooth' })
this.$refs["barCodeInput"+myData.SuppliesId].focus();
document.getElementById("barTishi"+myData.SuppliesId).style.opacity=1;
setTimeout(()=>{
this.test("barTishi"+myData.SuppliesId);
},3000)
}
})
if(isInStore){
this.Error('该商品未在列表中!');
}
}
}
} else {
this.Error(res.data.message);
}
this.barCode = '';
},
null
);
},
test(id){
document.getElementById(id).style.opacity= 0;
}
} }
}; };
...@@ -447,8 +513,8 @@ ...@@ -447,8 +513,8 @@
height: 100%; height: 100%;
} }
.w80 { .w70 {
width: 80px !important; width: 70px !important;
} }
.Inven_imgList { .Inven_imgList {
...@@ -462,5 +528,15 @@ ...@@ -462,5 +528,15 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.InventoryMsg{
opacity: 0;
z-index:1500;
color:green;
-webkit-transition: opacity 1s ease-out; /* Saf3.2+, Chrome */
-moz-transition: opacity 1s ease-out; /* FF4+ */
-ms-transition: opacity 1s ease-out; /* IE10? */
-o-transition: opacity 1s ease-out; /* Opera 10.5+ */
transition: opacity 1s ease-out;
}
</style> </style>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
<img v-if="row.CheckState==2" @click="SeeDetails(row,'/InventoryDetails')" style="width:24px;height:24px" src="../../assets/img/chakan.png" alt="" /> <img v-if="row.CheckState==2" @click="SeeDetails(row,'/InventoryDetails')" style="width:24px;height:24px" src="../../assets/img/chakan.png" alt="" />
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="盘点明细" placement="top" v-if="row.CheckState==1"> <el-tooltip class="item" effect="dark" content="盘点明细" placement="top" v-if="row.CheckState==1">
<img v-if="row.CheckState==1" @click="SeeDetails(row,'/InventoryDetail')" style="width:24px;height:24px" src="../../assets/img/sz.png" alt="" /> <img v-if="row.CheckState==1" @click="SeeDetails(row,'/InventoryDetail')" style="width:24px;height:24px" src="../../assets/img/shtg.png" alt="" />
</el-tooltip> </el-tooltip>
<el-tooltip class="item" effect="dark" content="下载明细" placement="top" v-if="row.CheckState==1"> <el-tooltip class="item" effect="dark" content="下载明细" placement="top" v-if="row.CheckState==1">
<img v-if="row.CheckState == 1" @click="" style="width:24px;height:24px" src="../../assets/img/xz.png" alt="" /> <img v-if="row.CheckState == 1" @click="" style="width:24px;height:24px" src="../../assets/img/xz.png" alt="" />
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="dialogState" :visible.sync="dialogState"
top="0" top="0"
width="620px" width="680px"
> >
<el-form <el-form
class="MyEditForm" class="MyEditForm"
...@@ -150,16 +150,17 @@ ...@@ -150,16 +150,17 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="dateList" label="" style="width:300px"> <el-form-item class="dateList" label="" style="width:360px">
<span class="label">计划时间</span> <span class="label">计划时间</span>
<div> <div>
<el-date-picker style="width:300px" <el-date-picker style="width:360px"
v-model="dateList" v-model="dateList"
type="daterange" type="datetimerange"
range-separator="至" range-separator="至"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:default-time="['09:30:00', '18:00:00']"
> >
</el-date-picker> </el-date-picker>
</div> </div>
...@@ -269,7 +270,8 @@ export default { ...@@ -269,7 +270,8 @@ export default {
path: path, path: path,
query: { query: {
CheckId:item.Id, CheckId:item.Id,
WarehouseId:item.WarehouseId WarehouseId:item.WarehouseId,
CheckState:item.CheckState
} }
}); });
...@@ -297,9 +299,7 @@ export default { ...@@ -297,9 +299,7 @@ export default {
this.addMsg.WarehouseId =itemdata.WarehouseId ; this.addMsg.WarehouseId =itemdata.WarehouseId ;
this.addMsg.StartDate =itemdata.StartDate ; this.addMsg.StartDate =itemdata.StartDate ;
this.addMsg.EndDate =itemdata.EndDate ; this.addMsg.EndDate =itemdata.EndDate ;
this.dateList=[]; this.dateList=[this.addMsg.StartDate,this.addMsg.EndDate];
this.dateList[0]=this.addMsg.StartDate;
this.dateList[1]=this.addMsg.EndDate;
}, },
Delete(item) { Delete(item) {
let Id = item.Id; let Id = item.Id;
...@@ -399,7 +399,6 @@ export default { ...@@ -399,7 +399,6 @@ export default {
if (res.data.resultCode === 1) { if (res.data.resultCode === 1) {
this.tableData = res.data.data.pageData; this.tableData = res.data.data.pageData;
this.total = res.data.data.count; this.total = res.data.data.count;
console.log(this.tableData,'tableData');
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
......
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