This commit is contained in:
2024-07-25 13:36:55 +08:00
parent 9a7fabcdbd
commit b35147baf9
7 changed files with 44 additions and 75 deletions

View File

@@ -21,6 +21,11 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
background-color: transparent;
}
uni-toast .uni-toast {
width: auto;
min-width: 8em;
}
.content{
width: 100%;
min-height: 100%;

View File

@@ -51,7 +51,7 @@
</view> -->
</view>
<view class="zd-row mgt20 mgb20">
<button class="primary-button" :disabled="disabled" @tap="toConfig">&nbsp;&nbsp;</button>
<button class="primary-button" @tap="toConfig">&nbsp;&nbsp;</button>
</view>
</view>
</view>

View File

@@ -280,8 +280,7 @@
};
},
onLoad () {
this._getWarehouseInfo()
this._getOrganizationInfo()
this.toSearch()
},
methods: {
// 仓库下拉框
@@ -293,7 +292,6 @@
this.$set(e, 'text', e.ckmc)
this.$set(e, 'value', e.ckbm)
})
this.toSearch()
}
},
// 组织信息下拉框
@@ -305,7 +303,6 @@
this.$set(e, 'text', e.kczzmc)
this.$set(e, 'value', e.kczzbm)
})
this.toSearch()
}
},
// 查询一级表格
@@ -333,6 +330,8 @@
icon: 'none'
})
}
this._getWarehouseInfo()
this._getOrganizationInfo()
},
// 二级表格接口
async _allocationBillPage () {
@@ -400,7 +399,6 @@
},
// 二级表格详情修改接口
async _allocationBillUpdate (e) {
console.log(e)
try {
let res = await allocationBillUpdate(e)
uni.showToast({
@@ -524,10 +522,10 @@
}
this.currentPage2 = 1
this._allocationBillPage()
uni.showToast({
title: res.desc,
icon: 'none'
})
// uni.showToast({
// title: res.desc,
// icon: 'none'
// })
} else {
uni.showToast({
title: res.desc,

View File

@@ -262,7 +262,7 @@
this.title = options.name
this.crType = options.type
if (this.crType === 'IN') {
this._getWarehouseInfo()
this.toSearch()
} else {
this._getUserInfo()
}
@@ -277,7 +277,6 @@
this.$set(e, 'text', e.ckmc)
this.$set(e, 'value', e.ckbm)
})
this.toSearch()
}
},
// 仓管员下拉框
@@ -292,7 +291,7 @@
}
this.value2 = JSON.parse(this.$store.getters.userInfo).username
}
this._getWarehouseInfo()
this.toSearch()
}
},
// 查询一级表格
@@ -324,6 +323,7 @@
icon: 'none'
})
}
this._getWarehouseInfo()
},
// 二级表格接口
async _easOutInBillDetailPage () {
@@ -401,10 +401,10 @@
this.disabled1 = false
this.checkArr1 = []
this._easOutInBillPage()
uni.showToast({
title: res.desc,
icon: 'none'
})
// uni.showToast({
// title: res.desc,
// icon: 'none'
// })
} else {
this.disabled1 = false
uni.showToast({

View File

@@ -231,8 +231,7 @@
};
},
onLoad () {
this._getWarehouseInfo()
this._getOrganizationInfo()
this.toSearch()
},
methods: {
// 仓库下拉框
@@ -244,7 +243,6 @@
this.$set(e, 'text', e.ckmc)
this.$set(e, 'value', e.ckbm)
})
this.toSearch()
}
},
// 组织信息下拉框
@@ -256,7 +254,6 @@
this.$set(e, 'text', e.kczzmc)
this.$set(e, 'value', e.kczzbm)
})
this.toSearch()
}
},
// 查询一级表格
@@ -284,6 +281,8 @@
icon: 'none'
})
}
this._getWarehouseInfo()
this._getOrganizationInfo()
},
// 二级表格接口
async _receiptBillPage () {
@@ -467,10 +466,10 @@
}
this.currentPage2 = 1
this._receiptBillPage()
uni.showToast({
title: res.desc,
icon: 'none'
})
// uni.showToast({
// title: res.desc,
// icon: 'none'
// })
} else {
uni.showToast({
title: res.desc,

View File

@@ -47,6 +47,7 @@ export const easOutInBillDetailPage = (djid, page, size) => request({
// 3.审核出入库单据
export const easOutInBillUpdate = (arr) => request({
url:'api/easOutInBill/audit',
type: 1,
data: arr
})
// 4.查询出单据明细库位
@@ -127,6 +128,7 @@ export const allocationBillUpdate = (obj) => request({
// 5.单据直接调拨
export const allocationBillConfirm = (arr) => request({
url:'api/allocationBill/confirm',
type: 1,
data: arr
})
// 6.根据跟踪号查询库存列表
@@ -166,5 +168,6 @@ export const receiptBillUpdate = (obj) => request({
// 4.单据直接调拨
export const receiptBillConfirm = (arr) => request({
url:'api/receiptBill/confirm',
type: 1,
data: arr
})

View File

@@ -5,17 +5,6 @@ const request = (params) => {
let url = params.url;
let method = params.method || 'POST';
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 = ''
if (store.getters.saveToken !== '') {
token = store.getters.saveToken
@@ -35,9 +24,18 @@ const request = (params) => {
// data = qs.stringify(data)
}
const requestUrl = `${store.getters.baseUrl}/` + url;
uni.showLoading({
title: '加载中...'
});
let type = params.type
if (type === 1) {
uni.showLoading({
mask: true,
title: '正在推送,如未审核成功,请查看单据审核结果信息。'
});
} else {
uni.showLoading({
mask: true,
title: '加载中...'
});
}
return new Promise((resolve, reject) => {
uni.request({
url: requestUrl,
@@ -69,45 +67,11 @@ const request = (params) => {
url: '/pages/login/login'
})
} else if (res[1] && res[1].statusCode === 200) {
uni.hideLoading();
let {
data: dataType
} = res[1]
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 {
uni.showModal({
content: `${res[1].data.message}`,
@@ -120,7 +84,7 @@ const request = (params) => {
reject(err)
})
.finally(() => {
uni.hideLoading();
// uni.hideLoading();
})
})
}