Commit 54c4de74 authored by 黄媛媛's avatar 黄媛媛
parents aeca4d66 ab512cda
......@@ -124,13 +124,15 @@
DetailList: []
},
isCheckAll:false,
checkList:[]
checkList:[],
isFrom:0
};
},
mounted() {
this.msg.CheckId = this.$route.query.CheckId;
this.saveMsg.CheckId = this.$route.query.CheckId;
this.saveMsg.WarehouseId = this.$route.query.WarehouseId;
this.isFrom = this.$route.query.isFrom;
this.getList();
this.getCheckStatus();
},
......@@ -152,8 +154,14 @@
);
},
Backto() {
let path='';
if(this.isFrom==1){
path='/InventoryDetails'
}else{
path='/InventoryDetail'
}
this.$router.push({
path: "/InventoryDetail",
path: path,
query: {
CheckId: this.msg.CheckId
}
......
......@@ -93,13 +93,15 @@
DetailList: []
},
isCheckAll:false,
checkList:[]
checkList:[],
isFrom:0
};
},
mounted() {
this.msg.CheckId = this.$route.query.CheckId;
this.saveMsg.CheckId = this.$route.query.CheckId;
this.saveMsg.WarehouseId = this.$route.query.WarehouseId;
this.isFrom = this.$route.query.isFrom;
this.getList();
},
methods: {
......@@ -108,8 +110,14 @@
this.getList();
},
Backto() {
let path='';
if(this.isFrom==1){
path='/InventoryDetails'
}else{
path='/InventoryDetail'
}
this.$router.push({
path: "/InventoryDetail",
path: path,
query: {
CheckId: this.msg.CheckId
}
......
......@@ -10,7 +10,7 @@
<img v-show="morequery" class="roatImg" style="width:12px;height:12px" src="../../assets/img/more.png" alt="" />
</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="goBaosun('InventoryBosun')" style="margin-left:20px" class="chaxunSpan">查看报损</span>
<span @click="goBaosun('InventoryBoyi')" style="margin-left:20px" class="chaxunSpan">查看报溢</span>
......@@ -21,7 +21,7 @@
<ul v-show="morequery" class="queryul">
扫码出库
<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>
</li>
<li>
......@@ -43,7 +43,7 @@
<vxe-table stripe style="margin-top:15px" :loading="loading" :data="tableData">
<vxe-table-column field="Name" title="状态" width="120">
<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 purpleSpan" v-if="row.CheckStatus == 3"></span>
<span class="ColorSpan redSpan" v-if="row.CheckStatus == 4"></span>
......@@ -58,14 +58,14 @@
v-if="row.SpecificationList.length !== y+1"> , </span></span>
</template>
</vxe-table-column>
<vxe-table-column field="InventoryNum" title="库存" width="100"></vxe-table-column>
<vxe-table-column field="RealityNum" title="实际数量">
<vxe-table-column field="InventoryNum" title="库存" width="80"></vxe-table-column>
<vxe-table-column field="RealityNum" title="实际数量" width="100">
<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>
</vxe-table-column>
<vxe-table-column field="Remark" title="备注" width="200"></vxe-table-column>
<vxe-table-column field="CheckEmpName" title="盘点人/时间" width="200">
<template v-slot="{ row }">
<span v-if="row.CheckEmpName||row.CheckDate">{{row.CheckEmpName}}/{{row.CheckDate}}</span>
......@@ -81,10 +81,10 @@
<vxe-table-column field="address" title="操作">
<template v-slot="{ row }">
<template v-if="CheckState!=2">
<el-tooltip class="item" effect="dark" content="保存" placement="top">
<img @click="saveInfo(row)" style="width:24px;height:24px" src="../../assets/img/step1.png" alt="">
</el-tooltip>
<el-tooltip style="display:inline-block;position:relative;top:-2px;" class="item" effect="dark"
content="上传图片" placement="top">
<el-upload :http-request="uploadFileBtn" :multiple="false" :show-file-list="false" action>
......@@ -95,6 +95,7 @@
<img style="width:24px;height:24px" @click="getRowRemark(row)" src="../../assets/img/edit.png" alt="" />
</el-tooltip>
</template>
</template>
</vxe-table-column>
</vxe-table>
<el-pagination @current-change="currentChange" background :page-size="msg.pageSize" layout="prev, pager, next"
......@@ -172,12 +173,15 @@
Content: '',
commonRow: {},
//仓库id
WarehouseId: 0
WarehouseId: 0,
//CheckState用于管理操作按钮
CheckState:0
};
},
mounted() {
this.msg.CheckId = this.$route.query.CheckId;
this.WarehouseId = this.$route.query.WarehouseId;
this.CheckState = this.$route.query.CheckState;
this.getList();
this.getCheckStatus();
//上传接口路径
......@@ -200,7 +204,6 @@
if (res.data.resultCode === 1) {
this.tableData = res.data.data.pageData;
this.total = res.data.data.count;
console.log(this.tableData, 'tabledata');
} else {
this.Error(res.data.message);
}
......@@ -239,7 +242,7 @@
},
//完成盘点
complePandian() {
this.$confirm("是否确定盘点?", "提示", {
this.$confirm("未盘资产将标记盘亏,是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: 'warning'
......@@ -273,7 +276,6 @@
//上传
handleAvatarSuccess(res, file) {
if (res.resultCode == 1) {
console.log(res, '上传后');
this.outerVisible = false;
} else {
this.Error(res.message);
......@@ -282,7 +284,6 @@
},
//耗材单个盘点保存
saveInfo(row) {
console.log(row, 'row');
let msg = {
CheckDetailId: row.Id,
Type: this.Type,
......@@ -305,7 +306,6 @@
},
//点击上传图片
getRow(row) {
console.log(row, '点了上传');
this.Type = 2;
this.commonId = row.Id;
this.ImageList = row.ImageList;
......@@ -373,20 +373,86 @@
file.file.size < 1024 ?
file.file.size :
(file.file.size / 1024).toFixed(0);
var data=JSON.parse(JSON.stringify(this.tableData));
data.forEach(y => {
this.tableData.forEach(y => {
if (y.Id == this.commonId) {
y.ImageList.push(
this.domainManager().ViittoFileUrl + x.data.FilePath
)
}
this.tableData=data;
console.log(this.tableData,'table');
})
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 @@
height: 100%;
}
.w80 {
width: 80px !important;
.w70 {
width: 70px !important;
}
.Inven_imgList {
......@@ -462,5 +528,15 @@
width: 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>
......@@ -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="" />
</el-tooltip>
<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 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="" />
......@@ -121,7 +121,7 @@
:close-on-click-modal="false"
:visible.sync="dialogState"
top="0"
width="620px"
width="680px"
>
<el-form
class="MyEditForm"
......@@ -150,16 +150,17 @@
</el-option>
</el-select>
</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>
<div>
<el-date-picker style="width:300px"
<el-date-picker style="width:360px"
v-model="dateList"
type="daterange"
type="datetimerange"
range-separator="至"
value-format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['09:30:00', '18:00:00']"
>
</el-date-picker>
</div>
......@@ -269,7 +270,8 @@ export default {
path: path,
query: {
CheckId:item.Id,
WarehouseId:item.WarehouseId
WarehouseId:item.WarehouseId,
CheckState:item.CheckState
}
});
......@@ -297,9 +299,7 @@ export default {
this.addMsg.WarehouseId =itemdata.WarehouseId ;
this.addMsg.StartDate =itemdata.StartDate ;
this.addMsg.EndDate =itemdata.EndDate ;
this.dateList=[];
this.dateList[0]=this.addMsg.StartDate;
this.dateList[1]=this.addMsg.EndDate;
this.dateList=[this.addMsg.StartDate,this.addMsg.EndDate];
},
Delete(item) {
let Id = item.Id;
......@@ -399,7 +399,6 @@ export default {
if (res.data.resultCode === 1) {
this.tableData = res.data.data.pageData;
this.total = res.data.data.count;
console.log(this.tableData,'tableData');
} else {
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