main
齐斌 1 year ago
parent 99399a2c56
commit 9e017fd508

@ -6,11 +6,14 @@
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
}, },
{ {
"app-plus" : "app-plus" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"type" : "uniCloud" "type" : "uniCloud"
},
{
"playground" : "custom",
"type" : "uni-app:app-ios"
} }
] ]
} }

@ -4,7 +4,7 @@
*/ */
export default { export default {
config: { config: {
baseUrl: "http://172.16.100.93:8015", baseUrl: "https://stock.szjixun.cn",
header: { header: {
"Content-Type": "application/json;charset=UTF-8", "Content-Type": "application/json;charset=UTF-8",
// 'Content-Type':'application/x-www-form-urlencoded' // 'Content-Type':'application/x-www-form-urlencoded'
@ -50,11 +50,13 @@ export default {
response = newResponse; response = newResponse;
} }
} }
console.log(response);
if (response.data.status === 401) { if (response.data.status === 401) {
uni.removeStorageSync("oa-token"); uni.$u.toast('登录过期,请重新登录');
uni.removeStorageSync("oa-user-info"); uni.removeStorageSync("token");
uni.removeStorageSync("userInfo");
uni.redirectTo({ uni.redirectTo({
url: "/pages/login/index", url: "/pages/login/login",
}); });
} }
// 统一的响应日志记录 // 统一的响应日志记录

@ -7,7 +7,7 @@ import api from '@/http/'
Vue.use(uView) Vue.use(uView)
Vue.prototype.$common = common; Vue.prototype.$common = common;
Vue.prototype.$api = api; Vue.prototype.$api = api;
Vue.prototype.$baseUrl = "http://172.16.100.93:8015"; // "http://114.218.158.24:9022", "http://58.210.42.242:9085" Vue.prototype.$baseUrl = "https://stock.szjixun.cn"; // "http://114.218.158.24:9022", "http://58.210.42.242:9085"
Vue.config.productionTip = false Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'

@ -1,5 +1,5 @@
{ {
"name" : "inv-app", "name" : "艺邑库存",
"appid" : "__UNI__6DE03A4", "appid" : "__UNI__6DE03A4",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
@ -50,6 +50,38 @@
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs" : {
"ad" : {} "ad" : {}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
} }
} }
}, },

@ -21,7 +21,7 @@
"style" : "style" :
{ {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false, "enablePullDownRefresh": true,
"app-plus": { "app-plus": {
"titleNView": false // "titleNView": false //
} }

@ -158,7 +158,6 @@
label="商品名称" label="商品名称"
prop="goodsInfo.title" prop="goodsInfo.title"
borderBottom borderBottom
ref="title"> ref="title">
<u--input <u--input
:disabled="true" :disabled="true"
@ -304,7 +303,7 @@ export default {
let token = uni.getStorageSync("token"); let token = uni.getStorageSync("token");
// //
wx.uploadFile({ wx.uploadFile({
url: "http://172.16.100.93:8015/api/common/upload", url: "https://stock.szjixun.cn/api/common/upload",
filePath: res.tempFilePaths[0], filePath: res.tempFilePaths[0],
name: "file", name: "file",
header: { header: {
@ -378,10 +377,15 @@ export default {
this.$refs.childForm this.$refs.childForm
.validate() .validate()
.then(async () => { .then(async () => {
// 0
if (this.model.goodsInfo.changeStock <= 0) {
uni.$u.toast("增加数量不可以小于0");
return;
}
let data = { let data = {
ID: this.model.goodsInfo.ID, ID: this.model.goodsInfo.ID,
changeStock: parseInt(this.model.goodsInfo.changeStock), changeStock: parseInt(this.model.goodsInfo.changeStock),
} };
let res = await this.$api.management.addNum(data); let res = await this.$api.management.addNum(data);
if (res.status == 0) { if (res.status == 0) {
uni.$u.toast("增加成功"); uni.$u.toast("增加成功");
@ -430,6 +434,35 @@ page {
font-size: 30rpx; font-size: 30rpx;
border: 0; border: 0;
} }
/deep/ .u-form {
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 20rpx 40rpx;
}
/deep/ .u-input {
background-color: #dcdee8;
height: 24rpx;
}
/deep/ .u-form-item__body__left__content {
border-right: 1px solid #ebebeb;
padding-right: 40rpx;
}
/deep/ .u-form-item__body__right {
padding-left: 30rpx;
}
/deep/ .u-form-item__body__left__content__required {
color: #1936c9;
}
/deep/ .u-modal__title {
color: #1936c9;
}
/deep/ .u-modal__content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
} }
.barcode-box { .barcode-box {
display: flex; display: flex;
@ -470,26 +503,7 @@ page {
border-radius: 30rpx; border-radius: 30rpx;
} }
} }
/deep/ .u-form {
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
padding: 20rpx 40rpx;
}
/deep/ .u-input {
background-color: #dcdee8;
height: 24rpx;
}
/deep/ .u-form-item__body__left__content {
border-right: 1px solid #ebebeb;
padding-right: 40rpx;
}
/deep/ .u-form-item__body__right {
padding-left: 30rpx;
}
/deep/ .u-form-item__body__left__content__required {
color: #1936c9;
}
.bottom-btn-box { .bottom-btn-box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -503,13 +517,4 @@ page {
border: none; border: none;
} }
} }
/deep/ .u-modal__title {
color: #1936c9;
}
/deep/ .u-modal__content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style> </style>

@ -77,6 +77,18 @@ export default {
); );
}, },
}, },
onShow() {
//
if (uni.getStorageSync("token")) {
uni.redirectTo({
url: "/pages/management/management",
});
} else {
uni.redirectTo({
url: "/pages/login/login",
});
}
},
methods: { methods: {
phoneVail(value) { phoneVail(value) {
if (value) { if (value) {

@ -31,8 +31,17 @@
</view> </view>
<view class="content-top"> <view class="content-top">
<view style="color: #9fafff; font-size: 24rpx">全部</view> <view style="color: #9fafff; font-size: 24rpx">全部</view>
<view style="color: #4f598b; font-size: 16rpx">按库存更新排序</view> <view
@click="showPicker"
style="color: #4f598b; font-size: 16rpx"
>{{ sortByName }}</view
>
</view> </view>
<u-picker
:show="pcikerShow"
@confirm="pickerConfirm"
@cancel="pickerCancel"
:columns="columns"></u-picker>
<view <view
class="management-list" class="management-list"
style="margin-bottom: 20rpx"> style="margin-bottom: 20rpx">
@ -202,11 +211,21 @@ export default {
changeStock: "", changeStock: "",
image: "", image: "",
}, },
columns: [["按库存更新排序", "入库时间倒序", "库存倒序"]],
pcikerShow: false,
sortByName: "按库存更新排序",
sortBy: "stockChangeDesc",
}; };
}, },
mounted() { mounted() {
this.getManagementList(); this.getManagementList();
}, },
onPullDownRefresh() {
this.managementList = [];
this.page = 1;
this.getManagementList();
uni.stopPullDownRefresh();
},
methods: { methods: {
handleScroll() { handleScroll() {
if (this.total > this.managementList.length) { if (this.total > this.managementList.length) {
@ -224,12 +243,13 @@ export default {
await this.$api.management await this.$api.management
.manageList({ .manageList({
title: this.title, title: this.title,
sortBy: this.sortBy,
page: this.page, page: this.page,
PageSize: this.PageSize, PageSize: this.PageSize,
}) })
.then((res) => { .then((res) => {
this.total = res.data.count; this.total = res.data.count;
this.managementList = this.managementList.concat(res.data.data); this.managementList = this.managementList.concat(res.data.data || []);
}); });
}, },
// //
@ -285,6 +305,21 @@ export default {
}, },
}); });
}, },
showPicker() {
this.pcikerShow = true;
},
pickerConfirm(e) {
console.log(e);
this.sortByName = e.value[0];
this.sortBy = e.indexs[0] == 0 ? "stockChangeDesc" :e.indexs[0] == 1 ? "createdDesc" : "stockSizeDesc";
this.pcikerShow = false;
this.managementList = [];
this.page = 1;
this.getManagementList();
},
pickerCancel(e) {
this.pcikerShow = false;
},
// //
goCreateNew() { goCreateNew() {
this.showCreate = false; this.showCreate = false;
@ -304,6 +339,11 @@ export default {
}); });
}, },
async goOutNum() { async goOutNum() {
// 0
if (parseInt(this.goodsInfo.changeStock) <= 0) {
uni.$u.toast("出库数量不可小于0");
return;
}
let data = { let data = {
ID: this.goodsInfo.ID, ID: this.goodsInfo.ID,
changeStock: 0 - parseInt(this.goodsInfo.changeStock), changeStock: 0 - parseInt(this.goodsInfo.changeStock),

Loading…
Cancel
Save