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

@ -5,12 +5,15 @@
"playground" : "custom",
"type" : "uni-app:app-android"
},
{
"app-plus" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
{
"app-plus" : {
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "custom",
"type" : "uni-app:app-ios"
}
]
}

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

@ -7,7 +7,7 @@ import api from '@/http/'
Vue.use(uView)
Vue.prototype.$common = common;
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
App.mpType = 'app'

@ -1,5 +1,5 @@
{
"name" : "inv-app",
"name" : "艺邑库存",
"appid" : "__UNI__6DE03A4",
"description" : "",
"versionName" : "1.0.0",
@ -50,6 +50,38 @@
/* SDK */
"sdkConfigs" : {
"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" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"app-plus": {
"titleNView": false //
}

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

@ -31,8 +31,17 @@
</view>
<view class="content-top">
<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>
<u-picker
:show="pcikerShow"
@confirm="pickerConfirm"
@cancel="pickerCancel"
:columns="columns"></u-picker>
<view
class="management-list"
style="margin-bottom: 20rpx">
@ -202,11 +211,21 @@ export default {
changeStock: "",
image: "",
},
columns: [["按库存更新排序", "入库时间倒序", "库存倒序"]],
pcikerShow: false,
sortByName: "按库存更新排序",
sortBy: "stockChangeDesc",
};
},
mounted() {
this.getManagementList();
},
onPullDownRefresh() {
this.managementList = [];
this.page = 1;
this.getManagementList();
uni.stopPullDownRefresh();
},
methods: {
handleScroll() {
if (this.total > this.managementList.length) {
@ -224,12 +243,13 @@ export default {
await this.$api.management
.manageList({
title: this.title,
sortBy: this.sortBy,
page: this.page,
PageSize: this.PageSize,
})
.then((res) => {
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() {
this.showCreate = false;
@ -304,9 +339,14 @@ export default {
});
},
async goOutNum() {
// 0
if (parseInt(this.goodsInfo.changeStock) <= 0) {
uni.$u.toast("出库数量不可小于0");
return;
}
let data = {
ID: this.goodsInfo.ID,
changeStock: 0-parseInt(this.goodsInfo.changeStock),
changeStock: 0 - parseInt(this.goodsInfo.changeStock),
};
let res = await this.$api.management.addNum(data);
if (res.status == 0) {

Loading…
Cancel
Save