6.12宁夏同时领用限制修改-后台字段未加暂使用别的字段代替-接口调试后修改判断字段
This commit is contained in:
parent
2fea12cec5
commit
ef279443f2
|
|
@ -3,8 +3,8 @@ class HttpConfig {
|
||||||
baseUrl = "/api"
|
baseUrl = "/api"
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
baseUrl = "http://112.29.103.165:21624"
|
// baseUrl = "http://112.29.103.165:21624"
|
||||||
// baseUrl = "http://192.168.0.14:21624"
|
baseUrl = "http://192.168.0.14:21624"
|
||||||
// baseUrl = "http://112.29.103.165:21626"
|
// baseUrl = "http://112.29.103.165:21626"
|
||||||
// baseUrl = "http://172.20.10.3:8080"
|
// baseUrl = "http://172.20.10.3:8080"
|
||||||
// baseUrl = "http://10.40.92.8:8080"
|
// baseUrl = "http://10.40.92.8:8080"
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ class Http{
|
||||||
},
|
},
|
||||||
// 成功的回调
|
// 成功的回调
|
||||||
success(res) {
|
success(res) {
|
||||||
|
resolve(res)
|
||||||
|
/* console.log(res);
|
||||||
if (res.data.code == 401) {
|
if (res.data.code == 401) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -25,7 +27,7 @@ class Http{
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}
|
} */
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|
@ -48,7 +50,8 @@ class Http{
|
||||||
},
|
},
|
||||||
// 成功的回调
|
// 成功的回调
|
||||||
success(res) {
|
success(res) {
|
||||||
// console.log(res);
|
resolve(res)
|
||||||
|
/* console.log(res);
|
||||||
if (res.data.code == 401) {
|
if (res.data.code == 401) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -61,7 +64,7 @@ class Http{
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}
|
} */
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
// console.log(err);
|
// console.log(err);
|
||||||
|
|
@ -85,6 +88,8 @@ class Http{
|
||||||
},
|
},
|
||||||
// 成功的回调
|
// 成功的回调
|
||||||
success(res) {
|
success(res) {
|
||||||
|
resolve(res)
|
||||||
|
/* console.log(res);
|
||||||
if (res.data.code == 401) {
|
if (res.data.code == 401) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -97,7 +102,7 @@ class Http{
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}
|
} */
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|
@ -120,6 +125,8 @@ class Http{
|
||||||
},
|
},
|
||||||
// 成功的回调
|
// 成功的回调
|
||||||
success(res) {
|
success(res) {
|
||||||
|
resolve(res)
|
||||||
|
/* console.log(res);
|
||||||
if (res.data.code == 401) {
|
if (res.data.code == 401) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -132,7 +139,7 @@ class Http{
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}
|
} */
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|
@ -153,6 +160,8 @@ class Http{
|
||||||
name: 'file',
|
name: 'file',
|
||||||
// 成功的回调
|
// 成功的回调
|
||||||
success(res) {
|
success(res) {
|
||||||
|
resolve(res)
|
||||||
|
/* console.log(res);
|
||||||
if (res.data.code == 401) {
|
if (res.data.code == 401) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -165,7 +174,7 @@ class Http{
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}
|
} */
|
||||||
},
|
},
|
||||||
fail(err) {
|
fail(err) {
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ import { basePath } from '../../public';
|
||||||
// console.log(1);
|
// console.log(1);
|
||||||
that.$refs.deptForm.validate().then(formData => {
|
that.$refs.deptForm.validate().then(formData => {
|
||||||
console.log(formData, that.totalGoods);
|
console.log(formData, that.totalGoods);
|
||||||
that.totalGoods = that.totalGoods.map((item) => {
|
that.totalGoods = that.totalGoods.map(item => {
|
||||||
return {
|
return {
|
||||||
id: item['id'],
|
id: item['id'],
|
||||||
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
||||||
|
|
@ -297,47 +297,61 @@ import { basePath } from '../../public';
|
||||||
preNum: item['bookNum']
|
preNum: item['bookNum']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
that.sendData = {
|
let setArr = []
|
||||||
userId: uni.getStorageSync('userInfo').sysUser.userId,
|
that.totalGoods.forEach(list => {
|
||||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
|
setArr.push(list.typeId)
|
||||||
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()
|
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 => {
|
that.$api.fetchMaterial.getCartDetail().then(res => {
|
||||||
|
console.log(res);
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
for (let i = 0; i < res.data.data.length; i++) {
|
for (let i = 0; i < res.data.data.length; i++) {
|
||||||
res.data.data[i].checked = false
|
res.data.data[i].checked = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue