loading
This commit is contained in:
@@ -21,6 +21,11 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uni-toast .uni-toast {
|
||||||
|
width: auto;
|
||||||
|
min-width: 8em;
|
||||||
|
}
|
||||||
|
|
||||||
.content{
|
.content{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row mgt20 mgb20">
|
<view class="zd-row mgt20 mgb20">
|
||||||
<button class="primary-button" :disabled="disabled" @tap="toConfig">配 置</button>
|
<button class="primary-button" @tap="toConfig">配 置</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -280,8 +280,7 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad () {
|
onLoad () {
|
||||||
this._getWarehouseInfo()
|
this.toSearch()
|
||||||
this._getOrganizationInfo()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 仓库下拉框
|
// 仓库下拉框
|
||||||
@@ -293,7 +292,6 @@
|
|||||||
this.$set(e, 'text', e.ckmc)
|
this.$set(e, 'text', e.ckmc)
|
||||||
this.$set(e, 'value', e.ckbm)
|
this.$set(e, 'value', e.ckbm)
|
||||||
})
|
})
|
||||||
this.toSearch()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 组织信息下拉框
|
// 组织信息下拉框
|
||||||
@@ -305,7 +303,6 @@
|
|||||||
this.$set(e, 'text', e.kczzmc)
|
this.$set(e, 'text', e.kczzmc)
|
||||||
this.$set(e, 'value', e.kczzbm)
|
this.$set(e, 'value', e.kczzbm)
|
||||||
})
|
})
|
||||||
this.toSearch()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 查询一级表格
|
// 查询一级表格
|
||||||
@@ -333,6 +330,8 @@
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this._getWarehouseInfo()
|
||||||
|
this._getOrganizationInfo()
|
||||||
},
|
},
|
||||||
// 二级表格接口
|
// 二级表格接口
|
||||||
async _allocationBillPage () {
|
async _allocationBillPage () {
|
||||||
@@ -400,7 +399,6 @@
|
|||||||
},
|
},
|
||||||
// 二级表格详情修改接口
|
// 二级表格详情修改接口
|
||||||
async _allocationBillUpdate (e) {
|
async _allocationBillUpdate (e) {
|
||||||
console.log(e)
|
|
||||||
try {
|
try {
|
||||||
let res = await allocationBillUpdate(e)
|
let res = await allocationBillUpdate(e)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -524,10 +522,10 @@
|
|||||||
}
|
}
|
||||||
this.currentPage2 = 1
|
this.currentPage2 = 1
|
||||||
this._allocationBillPage()
|
this._allocationBillPage()
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: res.desc,
|
// title: res.desc,
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.desc,
|
title: res.desc,
|
||||||
|
|||||||
@@ -262,7 +262,7 @@
|
|||||||
this.title = options.name
|
this.title = options.name
|
||||||
this.crType = options.type
|
this.crType = options.type
|
||||||
if (this.crType === 'IN') {
|
if (this.crType === 'IN') {
|
||||||
this._getWarehouseInfo()
|
this.toSearch()
|
||||||
} else {
|
} else {
|
||||||
this._getUserInfo()
|
this._getUserInfo()
|
||||||
}
|
}
|
||||||
@@ -277,7 +277,6 @@
|
|||||||
this.$set(e, 'text', e.ckmc)
|
this.$set(e, 'text', e.ckmc)
|
||||||
this.$set(e, 'value', e.ckbm)
|
this.$set(e, 'value', e.ckbm)
|
||||||
})
|
})
|
||||||
this.toSearch()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 仓管员下拉框
|
// 仓管员下拉框
|
||||||
@@ -292,7 +291,7 @@
|
|||||||
}
|
}
|
||||||
this.value2 = JSON.parse(this.$store.getters.userInfo).username
|
this.value2 = JSON.parse(this.$store.getters.userInfo).username
|
||||||
}
|
}
|
||||||
this._getWarehouseInfo()
|
this.toSearch()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 查询一级表格
|
// 查询一级表格
|
||||||
@@ -324,6 +323,7 @@
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this._getWarehouseInfo()
|
||||||
},
|
},
|
||||||
// 二级表格接口
|
// 二级表格接口
|
||||||
async _easOutInBillDetailPage () {
|
async _easOutInBillDetailPage () {
|
||||||
@@ -401,10 +401,10 @@
|
|||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
this.checkArr1 = []
|
this.checkArr1 = []
|
||||||
this._easOutInBillPage()
|
this._easOutInBillPage()
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: res.desc,
|
// title: res.desc,
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
} else {
|
} else {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -231,8 +231,7 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad () {
|
onLoad () {
|
||||||
this._getWarehouseInfo()
|
this.toSearch()
|
||||||
this._getOrganizationInfo()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 仓库下拉框
|
// 仓库下拉框
|
||||||
@@ -244,7 +243,6 @@
|
|||||||
this.$set(e, 'text', e.ckmc)
|
this.$set(e, 'text', e.ckmc)
|
||||||
this.$set(e, 'value', e.ckbm)
|
this.$set(e, 'value', e.ckbm)
|
||||||
})
|
})
|
||||||
this.toSearch()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 组织信息下拉框
|
// 组织信息下拉框
|
||||||
@@ -256,7 +254,6 @@
|
|||||||
this.$set(e, 'text', e.kczzmc)
|
this.$set(e, 'text', e.kczzmc)
|
||||||
this.$set(e, 'value', e.kczzbm)
|
this.$set(e, 'value', e.kczzbm)
|
||||||
})
|
})
|
||||||
this.toSearch()
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 查询一级表格
|
// 查询一级表格
|
||||||
@@ -284,6 +281,8 @@
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
this._getWarehouseInfo()
|
||||||
|
this._getOrganizationInfo()
|
||||||
},
|
},
|
||||||
// 二级表格接口
|
// 二级表格接口
|
||||||
async _receiptBillPage () {
|
async _receiptBillPage () {
|
||||||
@@ -467,10 +466,10 @@
|
|||||||
}
|
}
|
||||||
this.currentPage2 = 1
|
this.currentPage2 = 1
|
||||||
this._receiptBillPage()
|
this._receiptBillPage()
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: res.desc,
|
// title: res.desc,
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
})
|
// })
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.desc,
|
title: res.desc,
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export const easOutInBillDetailPage = (djid, page, size) => request({
|
|||||||
// 3.审核出入库单据
|
// 3.审核出入库单据
|
||||||
export const easOutInBillUpdate = (arr) => request({
|
export const easOutInBillUpdate = (arr) => request({
|
||||||
url:'api/easOutInBill/audit',
|
url:'api/easOutInBill/audit',
|
||||||
|
type: 1,
|
||||||
data: arr
|
data: arr
|
||||||
})
|
})
|
||||||
// 4.查询出单据明细库位
|
// 4.查询出单据明细库位
|
||||||
@@ -127,6 +128,7 @@ export const allocationBillUpdate = (obj) => request({
|
|||||||
// 5.单据直接调拨
|
// 5.单据直接调拨
|
||||||
export const allocationBillConfirm = (arr) => request({
|
export const allocationBillConfirm = (arr) => request({
|
||||||
url:'api/allocationBill/confirm',
|
url:'api/allocationBill/confirm',
|
||||||
|
type: 1,
|
||||||
data: arr
|
data: arr
|
||||||
})
|
})
|
||||||
// 6.根据跟踪号查询库存列表
|
// 6.根据跟踪号查询库存列表
|
||||||
@@ -166,5 +168,6 @@ export const receiptBillUpdate = (obj) => request({
|
|||||||
// 4.单据直接调拨
|
// 4.单据直接调拨
|
||||||
export const receiptBillConfirm = (arr) => request({
|
export const receiptBillConfirm = (arr) => request({
|
||||||
url:'api/receiptBill/confirm',
|
url:'api/receiptBill/confirm',
|
||||||
|
type: 1,
|
||||||
data: arr
|
data: arr
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -5,17 +5,6 @@ const request = (params) => {
|
|||||||
let url = params.url;
|
let url = params.url;
|
||||||
let method = params.method || 'POST';
|
let method = params.method || 'POST';
|
||||||
let data = params.data || {};
|
let data = params.data || {};
|
||||||
// data.token = "default-access_token"
|
|
||||||
// if (!params.token) {
|
|
||||||
// let token = uni.getStorageSync('token');
|
|
||||||
// if (!token) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url: '/pages/login/login'
|
|
||||||
// });
|
|
||||||
// } else {
|
|
||||||
// data.token = '179509245-9c91827e0224bdc18d0b118b8be1b5af';
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
let token = ''
|
let token = ''
|
||||||
if (store.getters.saveToken !== '') {
|
if (store.getters.saveToken !== '') {
|
||||||
token = store.getters.saveToken
|
token = store.getters.saveToken
|
||||||
@@ -35,9 +24,18 @@ const request = (params) => {
|
|||||||
// data = qs.stringify(data)
|
// data = qs.stringify(data)
|
||||||
}
|
}
|
||||||
const requestUrl = `${store.getters.baseUrl}/` + url;
|
const requestUrl = `${store.getters.baseUrl}/` + url;
|
||||||
uni.showLoading({
|
let type = params.type
|
||||||
title: '加载中...'
|
if (type === 1) {
|
||||||
});
|
uni.showLoading({
|
||||||
|
mask: true,
|
||||||
|
title: '正在推送,如未审核成功,请查看单据审核结果信息。'
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
uni.showLoading({
|
||||||
|
mask: true,
|
||||||
|
title: '加载中...'
|
||||||
|
});
|
||||||
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: requestUrl,
|
url: requestUrl,
|
||||||
@@ -69,45 +67,11 @@ const request = (params) => {
|
|||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
})
|
})
|
||||||
} else if (res[1] && res[1].statusCode === 200) {
|
} else if (res[1] && res[1].statusCode === 200) {
|
||||||
|
uni.hideLoading();
|
||||||
let {
|
let {
|
||||||
data: dataType
|
data: dataType
|
||||||
} = res[1]
|
} = res[1]
|
||||||
resolve(dataType)
|
resolve(dataType)
|
||||||
// switch (dataType.code * 1) { // 拦截返回参数
|
|
||||||
// case 0:
|
|
||||||
// resolve(dataType)
|
|
||||||
// break;
|
|
||||||
// case 1003:
|
|
||||||
// uni.showModal({
|
|
||||||
// title: '登录已过期',
|
|
||||||
// content: '很抱歉,登录已过期,请重新登录',
|
|
||||||
// confirmText: '重新登录',
|
|
||||||
// success: function(res) {
|
|
||||||
// if (res.confirm) {
|
|
||||||
// uni.navigateTo({
|
|
||||||
// // 切记这儿需要哈pages.json保持一致;不能有.vue后缀
|
|
||||||
// url: '/pages/login/login'
|
|
||||||
// });
|
|
||||||
// } else if (res.cancel) {
|
|
||||||
// console.log('用户点击取消');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// break;
|
|
||||||
// case -1:
|
|
||||||
// uni.showModal({
|
|
||||||
// title: '请求数据失败',
|
|
||||||
// content: '获取数据失败!',
|
|
||||||
// confirmText: '确定',
|
|
||||||
// showCancel: false,
|
|
||||||
// success: function(res) {
|
|
||||||
// if (res.confirm) {} else if (res.cancel) {
|
|
||||||
// console.log('用户点击取消');
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// break
|
|
||||||
// }
|
|
||||||
}else {
|
}else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
content: `${res[1].data.message}`,
|
content: `${res[1].data.message}`,
|
||||||
@@ -120,7 +84,7 @@ const request = (params) => {
|
|||||||
reject(err)
|
reject(err)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
uni.hideLoading();
|
// uni.hideLoading();
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user