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) {
var that = this;
console.log(item)
let dataList = []
var itemData;
itemData = {
checkStockId:uni.getStorageSync('stockId'),
productId: item.id,
productId: item.productId,
productName:item.productName,
productPicture:item.productPicture,
productSn:item.productSn,
@ -354,7 +355,7 @@
dataList.push(itemData)
this.tui.request("/app/checkStockDetail/addCheckStockDetail", "POST", dataList, false, false).then((res) => {
if (res.code == 200) {
this.stockSelect()
} else {
this.tui.toast(res.message)
}

35
package1/stock/goodsStock.vue

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