6.12宁夏同时领用限制修改-后台字段未加暂使用别的字段代替-接口调试后修改判断字段

This commit is contained in:
FrancisHu 2024-06-12 16:49:25 +08:00
parent 2fea12cec5
commit ef279443f2
3 changed files with 73 additions and 49 deletions

View File

@ -3,8 +3,8 @@ class HttpConfig {
baseUrl = "/api"
// #endif
// #ifdef APP-PLUS
baseUrl = "http://112.29.103.165:21624"
// baseUrl = "http://192.168.0.14:21624"
// baseUrl = "http://112.29.103.165:21624"
baseUrl = "http://192.168.0.14:21624"
// baseUrl = "http://112.29.103.165:21626"
// baseUrl = "http://172.20.10.3:8080"
// baseUrl = "http://10.40.92.8:8080"

View File

@ -13,6 +13,8 @@ class Http{
},
// 成功的回调
success(res) {
resolve(res)
/* console.log(res);
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
@ -25,7 +27,7 @@ class Http{
})
} else {
resolve(res)
}
} */
},
fail(err) {
reject(err)
@ -48,7 +50,8 @@ class Http{
},
// 成功的回调
success(res) {
// console.log(res);
resolve(res)
/* console.log(res);
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
@ -61,7 +64,7 @@ class Http{
})
} else {
resolve(res)
}
} */
},
fail(err) {
// console.log(err);
@ -85,6 +88,8 @@ class Http{
},
// 成功的回调
success(res) {
resolve(res)
/* console.log(res);
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
@ -97,7 +102,7 @@ class Http{
})
} else {
resolve(res)
}
} */
},
fail(err) {
reject(err)
@ -120,6 +125,8 @@ class Http{
},
// 成功的回调
success(res) {
resolve(res)
/* console.log(res);
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
@ -132,7 +139,7 @@ class Http{
})
} else {
resolve(res)
}
} */
},
fail(err) {
reject(err)
@ -153,6 +160,8 @@ class Http{
name: 'file',
// 成功的回调
success(res) {
resolve(res)
/* console.log(res);
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
@ -165,7 +174,7 @@ class Http{
})
} else {
resolve(res)
}
} */
},
fail(err) {
reject(err)

View File

@ -286,7 +286,7 @@ import { basePath } from '../../public';
// console.log(1);
that.$refs.deptForm.validate().then(formData => {
console.log(formData, that.totalGoods);
that.totalGoods = that.totalGoods.map((item) => {
that.totalGoods = that.totalGoods.map(item => {
return {
id: item['id'],
createBy: uni.getStorageSync('userInfo').sysUser.userName,
@ -297,47 +297,61 @@ import { basePath } from '../../public';
preNum: item['bookNum']
}
})
that.sendData = {
userId: uni.getStorageSync('userInfo').sysUser.userId,
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
createBy: uni.getStorageSync('userInfo').sysUser.userName,
unitId: formData.deptName,
projectId: formData.projName,
agreementId: that.deptFormData.agreementId,
agreementCode: that.deptFormData.agreementCode,
taskType: 29,
taskStatus: 30,
// createTime: that.formatDate(new Date().getTime()),
leaseApplyInfo: {
leasePerson: uni.getStorageSync('userInfo').sysUser.userName,
phone: uni.getStorageSync('userInfo').sysUser.phonenumber
},
leaseApplyDetails: that.totalGoods
}
console.log('that.sendData =================== ',that.sendData);
//
that.$api.fetchMaterial.subCart(that.sendData).then(res => {
console.log(res);
if (res.data.code == 200) {
uni.showToast({
icon: 'none',
title: res.data.msg,
success: () => {
uni.redirectTo({
url: '/pages/orderCart/orderCart'
})
}
})
} else {
uni.showToast({
icon: 'none',
title:res.data.msg
})
}
}).catch(err => {
console.log(err);
let setArr = []
that.totalGoods.forEach(list => {
setArr.push(list.typeId)
})
that.$refs.popup.close()
console.log(setArr);
let set = new Set(setArr)
console.log(set.size);
if (set.size == 1) {
that.sendData = {
userId: uni.getStorageSync('userInfo').sysUser.userId,
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
createBy: uni.getStorageSync('userInfo').sysUser.userName,
unitId: formData.deptName,
projectId: formData.projName,
agreementId: that.deptFormData.agreementId,
agreementCode: that.deptFormData.agreementCode,
taskType: 29,
taskStatus: 30,
// createTime: that.formatDate(new Date().getTime()),
leaseApplyInfo: {
leasePerson: uni.getStorageSync('userInfo').sysUser.userName,
phone: uni.getStorageSync('userInfo').sysUser.phonenumber
},
leaseApplyDetails: that.totalGoods
}
console.log('that.sendData =================== ',that.sendData);
//
/* that.$api.fetchMaterial.subCart(that.sendData).then(res => {
console.log(res);
if (res.data.code == 200) {
uni.showToast({
icon: 'none',
title: res.data.msg,
success: () => {
uni.redirectTo({
url: '/pages/orderCart/orderCart'
})
}
})
} else {
uni.showToast({
icon: 'none',
title:res.data.msg
})
}
}).catch(err => {
console.log(err);
}) */
that.$refs.popup.close()
} else {
uni.showToast({
icon: 'none',
title: '无法同时领用机具设备和调试设备!'
})
}
})
}
},
@ -442,6 +456,7 @@ import { basePath } from '../../public';
})
//
that.$api.fetchMaterial.getCartDetail().then(res => {
console.log(res);
if (res.data.code == 200) {
for (let i = 0; i < res.data.data.length; i++) {
res.data.data[i].checked = false