wangfukang 3 years ago
parent
commit
957fa63e5b
  1. 13
      pages/index/orderDetail.vue
  2. 21
      pages/inventory/addGoods.vue

13
pages/index/orderDetail.vue

@ -811,11 +811,9 @@
} }
} }
} }
console.log(this.list)
for (var i = 0; i < this.list.length; i++) { for (var i = 0; i < this.list.length; i++) {
if(this.list[i].stockLogList.length == 0){ if(this.list[i].stockLogList.length != 0){
this.tui.toast("请选择退货商品")
return;
}
for (var m = 0; m < this.list[i].stockLogList.length; m++) { for (var m = 0; m < this.list[i].stockLogList.length; m++) {
if(this.list[i].stockLogList[m].returnCount <= 0){ if(this.list[i].stockLogList[m].returnCount <= 0){
this.tui.toast("退货数量不能为零") this.tui.toast("退货数量不能为零")
@ -834,6 +832,9 @@
if(this.list[i].stockLogList1.length <= 0){ if(this.list[i].stockLogList1.length <= 0){
this.list[i].productCount = 0 this.list[i].productCount = 0
} }
}else{
}
} }
for (var i = 0; i < this.list.length; i++) { for (var i = 0; i < this.list.length; i++) {
if(this.list[i].stockLogList1.length == 0){ if(this.list[i].stockLogList1.length == 0){
@ -896,11 +897,9 @@
}, },
// 取消订单 // 取消订单
cancelOrder(type) { cancelOrder(type) {
this.tui.modal("提示", "您确定要取消该订单吗?", true, (res) => { this.tui.modal("提示", "您确定要取消吗?", true, (res) => {
if (res) { if (res) {
var data={},url var data={},url
if (type == 'qxdd') { if (type == 'qxdd') {
data = { data = {
status: 2, status: 2,

21
pages/inventory/addGoods.vue

@ -51,12 +51,13 @@
trim="all" /> trim="all" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<view> <view v-if="type == 'edit'" style="display: flex;">
<u-button type="primary" @tap.stop="delGoods()">删除商品</u-button> <button @tap.stop="delGoods()" style="width: 49%;">删除商品</button>
<u-button type="primary" @tap.stop="submit()">保存</u-button> <button @tap.stop="submit()" style="width: 49%;">保存</button>
</view>
<view v-else>
<button @tap.stop="submit()">保存</button>
</view> </view>
</view> </view>
<!-- <u-modal v-model="show" :content="content"></u-modal> --> <!-- <u-modal v-model="show" :content="content"></u-modal> -->
</view> </view>
@ -86,6 +87,7 @@
arrtChange: [], arrtChange: [],
categoryId:'', categoryId:'',
dataList:[], dataList:[],
type:'add',
rules: { rules: {
categoryId: { categoryId: {
rules: [{ rules: [{
@ -141,6 +143,7 @@
}, },
onLoad(option) { onLoad(option) {
if(option.dataList){ if(option.dataList){
this.type = 'edit'
this.dataList = JSON.parse(option.dataList) this.dataList = JSON.parse(option.dataList)
this.formData.productName = this.dataList.productName this.formData.productName = this.dataList.productName
this.formData.barcode = this.dataList.barcode this.formData.barcode = this.dataList.barcode
@ -372,4 +375,12 @@
height: 70rpx; height: 70rpx;
border: 1px solid #eee; border: 1px solid #eee;
} }
button{
height: 90rpx;
line-height: 90rpx;
font-size: 36rpx;
color: #fff;
background: #5fd9ee;
border-radius: 10px;
}
</style> </style>
Loading…
Cancel
Save