main
scout 8 months ago
parent 9e017fd508
commit 5588ae51aa

@ -3,7 +3,7 @@
"configurations" : [
{
"playground" : "custom",
"type" : "uni-app:app-android"
"type" : "uni-app:app-ios"
},
{
"app-plus" : {
@ -13,7 +13,7 @@
},
{
"playground" : "custom",
"type" : "uni-app:app-ios"
"type" : "uni-app:app-android"
}
]
}

@ -2,8 +2,8 @@
"name" : "艺邑库存",
"appid" : "__UNI__6DE03A4",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionName" : "1.0.1",
"versionCode" : 102,
"transformPx" : false,
/* 5+App */
"app-plus" : {

@ -124,6 +124,7 @@
@click="addNum"></u-button>
<u-button
class="bottom-btn"
:disabled="loading"
style="background-color: #fff; color: #1936c9"
text="修改"
@click="goEdit"></u-button>
@ -133,6 +134,7 @@
v-else>
<u-button
class="bottom-btn"
:disabled="loading"
style="background-color: #fff; color: #1936c9"
text="保存"
@click="goSave"></u-button>
@ -199,6 +201,7 @@ import moment from "moment";
export default {
data() {
return {
loading: false,
actionType: "add",
title: "商品录入",
codeVal: "",
@ -345,9 +348,11 @@ export default {
},
//
async save() {
this.loading = true;
this.model.goodsInfo.stockSize = parseInt(this.model.goodsInfo.stockSize);
let res = await this.$api.management.save(this.model.goodsInfo);
if (res.status == 0) {
this.loading = false;
uni.$u.toast("添加成功");
setTimeout(() => {
uni.navigateTo({
@ -355,14 +360,17 @@ export default {
});
}, 1000);
} else {
this.loading = false;
uni.$u.toast("添加失败");
}
},
//
async edit() {
this.loading = true;
this.model.goodsInfo.stockSize = parseInt(this.model.goodsInfo.stockSize);
let res = await this.$api.management.update(this.model.goodsInfo);
if (res.status == 0) {
this.loading = false;
uni.$u.toast("修改成功");
setTimeout(() => {
uni.navigateTo({
@ -370,6 +378,7 @@ export default {
});
}, 1000);
} else {
this.loading = false;
uni.$u.toast("修改失败");
}
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Loading…
Cancel
Save