wangfukang 3 years ago
parent
commit
634ca7dca3
  1. 5
      package1/stock/addStock.vue
  2. 35
      package1/stock/goodsStock.vue

5
package1/stock/addStock.vue

@ -341,11 +341,12 @@
//删除整条商品 //删除整条商品
delShop(item) { delShop(item) {
var that = this; var that = this;
console.log(item)
let dataList = [] let dataList = []
var itemData; var itemData;
itemData = { itemData = {
checkStockId:uni.getStorageSync('stockId'), checkStockId:uni.getStorageSync('stockId'),
productId: item.id, productId: item.productId,
productName:item.productName, productName:item.productName,
productPicture:item.productPicture, productPicture:item.productPicture,
productSn:item.productSn, productSn:item.productSn,
@ -354,7 +355,7 @@
dataList.push(itemData) dataList.push(itemData)
this.tui.request("/app/checkStockDetail/addCheckStockDetail", "POST", dataList, false, false).then((res) => { this.tui.request("/app/checkStockDetail/addCheckStockDetail", "POST", dataList, false, false).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.stockSelect()
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }

35
package1/stock/goodsStock.vue

@ -7,15 +7,16 @@
<view class="formBox"> <view class="formBox">
<u-alert description="点击可查看对应每笔盘点单" type="primary"></u-alert> <u-alert description="点击可查看对应每笔盘点单" type="primary"></u-alert>
<view class="pd-box"> <view class="pd-box">
<view class="pd-container" @tap="onItemClick(item)" v-for="(item,index) in stockList" :key="index"> <view class="pd-container" v-for="(item,index) in stockList" :key="index">
<view class="pd-left"> <view class="pd-left">
<view class="">盘点时间:{{ item.creatTime == null ?'暂无':item.creatTime}}</view> <view class="">盘点时间:{{ item.creatTime == null ?'暂无':item.creatTime}}</view>
<view class="">盘点人:{{item.createByName}} <text v-if="item.delFlag == 0" style="color:red;">(盘点中)</text><text v-else>(已完成)</text></view> <view class="">盘点人:{{item.createByName}}</view>
<view class="">盘点状态:<text v-if="item.delFlag == 0" style="color:red;">盘点中</text><text v-else>已完成</text></view>
</view> </view>
<view class="pd-right"> <view class="pd-right">
<view style="color: blue;text-align: right;padding-right: 30rpx;" @tap.stop="delStock(item.id)">删除此盘点</view> <button v-if="item.delFlag == 0" @tap="onItemClick(item)">继续盘点</button>
<view class="pd-right-bottom" v-if="item.delFlag == 0">继续盘点 ></view> <button v-else @tap="onItemClick(item)">查看详情</button>
<view class="pd-right-bottom" v-else>查看详情 ></view> <button v-if="item.delFlag == 0" @tap.stop="delStock(item.id)">删除</button>
</view> </view>
</view> </view>
@ -115,9 +116,8 @@
content: "确认要删除此条盘点信息吗?", content: "确认要删除此条盘点信息吗?",
success: function(res) { success: function(res) {
if(res.confirm){ if(res.confirm){
that.tui.request("/app/checkStock/submitToStock", "post", { that.tui.request("/app/checkStock/deleteCheckStock", "post", {
id:id, id:id
delFlag:2
}, false, true).then((res) => { }, false, true).then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
@ -125,7 +125,7 @@
icon: 'none' icon: 'none'
}) })
setTimeout(res=> { setTimeout(res=> {
this.getList(); that.getList();
},2000) },2000)
} else { } else {
@ -161,7 +161,7 @@
} }
.pd-container{ .pd-container{
width: 100%; width: 100%;
height: 150rpx; height: 230rpx;
background: #fff; background: #fff;
border-top: 10px solid #eee; border-top: 10px solid #eee;
display: flex; display: flex;
@ -175,10 +175,15 @@
.pd-right{ .pd-right{
width: 40%; width: 40%;
line-height: 70rpx; line-height: 70rpx;
} button{
.pd-right-bottom{ width: 140rpx;
text-align: right; height: 70rpx;
padding-right: 30rpx; font-size: 26rpx;
color: red; color: #fff;
background: #5fd9ee;
margin-top: 25rpx;
margin-right: 20rpx;
padding: 0;
}
} }
</style> </style>
Loading…
Cancel
Save