wangfukang 3 years ago
parent
commit
e207c55238
  1. 37
      pages/inventory/addGoods.vue
  2. 1
      pages/inventory/batchPrint.vue

37
pages/inventory/addGoods.vue

@ -51,8 +51,11 @@
trim="all" />
</uni-forms-item>
</uni-forms>
<u-button type="primary" @tap.stop="submit()">保存</u-button>
<view>
<u-button type="primary" @tap.stop="delGoods()">删除商品</u-button>
<u-button type="primary" @tap.stop="submit()">保存</u-button>
</view>
</view>
<!-- <u-modal v-model="show" :content="content"></u-modal> -->
@ -220,6 +223,36 @@
}
})
},
delGoods(){
let that = this;
if(that.dataList.stockCount == 0 || that.dataList.purchasePrice==null){
uni.showModal({
title: "提示",
content: "确定删除此条商品吗?",
success: function(res) {
if(res.confirm){
that.tui.request('/app/product/edit', "post", {
id:that.dataList.id,
delFlag:0
}, false, false).then((res1) => {
if (res1.code == 200) {
uni.navigateBack({
delta: 2
})
} else {
uni.showToast({
title: "删除失败",
icon: 'none'
})
}
})
}
}
})
}else{
this.tui.toast("您的商品下有库存,不能执行删除操作!")
}
},
// 触发提交表单
submit() {

1
pages/inventory/batchPrint.vue

@ -267,6 +267,7 @@
},
//点击打印按钮
goPrint(){
uni.setStorageSync('small',true)
let that = this;
for(var i=0;i<that.carList.length;i++){
let item = that.carList[i]

Loading…
Cancel
Save