bug修改
This commit is contained in:
parent
be25f3e6b7
commit
8b6b608201
|
|
@ -12,7 +12,7 @@
|
||||||
<h5 class="tit">规格型号</h5>
|
<h5 class="tit">规格型号</h5>
|
||||||
<view class="drop-menu">
|
<view class="drop-menu">
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
v-model="specVal"
|
v-model="specVals"
|
||||||
:localdata="specRange"
|
:localdata="specRange"
|
||||||
@change="specChange"
|
@change="specChange"
|
||||||
:clear="false"
|
:clear="false"
|
||||||
|
|
@ -50,6 +50,7 @@ import { basePath } from '../../public';
|
||||||
|
|
||||||
],
|
],
|
||||||
specVal: '',
|
specVal: '',
|
||||||
|
specVals: '',
|
||||||
specText: '',
|
specText: '',
|
||||||
deviceNum: 1,
|
deviceNum: 1,
|
||||||
specRange: [
|
specRange: [
|
||||||
|
|
@ -69,18 +70,22 @@ import { basePath } from '../../public';
|
||||||
console.log('参数');
|
console.log('参数');
|
||||||
},
|
},
|
||||||
specChange (e) {
|
specChange (e) {
|
||||||
console.log(e, this.specRange);
|
// for (let i = 0; i < this.specRange.length; i++) {
|
||||||
for (let i = 0; i < this.specRange.length; i++) {
|
// if (this.specRange[i].value == e) {
|
||||||
if (this.specRange[i].value == e) {
|
// this.specText = this.specRange[i].text
|
||||||
this.specText = this.specRange[i].text
|
// this.status = this.specRange[i].status
|
||||||
this.status = this.specRange[i].status
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
this.devicePrice = '¥' + (e * this.deviceNum)
|
this.specText = this.specRange[e].text
|
||||||
|
this.status = this.specRange[e].status
|
||||||
|
this.typeId = this.specRange[e].typeId
|
||||||
|
this.specVal = this.specRange[e].leasePrice
|
||||||
|
this.devicePrice = '¥' + (Math.round((e * this.deviceNum) * 100)/100)
|
||||||
},
|
},
|
||||||
numChange (e) {
|
numChange (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
this.devicePrice = '¥' + (e * this.specVal)
|
this.devicePrice = '¥' + (Math.round((e * Number(this.specVal || 0)) * 100)/100)
|
||||||
},
|
},
|
||||||
addCart () {
|
addCart () {
|
||||||
if (this.specVal == '') {
|
if (this.specVal == '') {
|
||||||
|
|
@ -138,11 +143,13 @@ import { basePath } from '../../public';
|
||||||
for (let i = 0; i < res.data.data.length; i++) {
|
for (let i = 0; i < res.data.data.length; i++) {
|
||||||
that.bgList.push(res.data.data[i].photoUrl)
|
that.bgList.push(res.data.data[i].photoUrl)
|
||||||
}
|
}
|
||||||
that.specRange = res.data.data.map((item) => {
|
that.specRange = res.data.data.map((item,index) => {
|
||||||
return {
|
return {
|
||||||
text: item['typeName'],
|
text: item['typeName'],
|
||||||
value: item['leasePrice'],
|
value: index,
|
||||||
status: item['status']
|
status: item['status'],
|
||||||
|
typeId: item['typeId'],
|
||||||
|
leasePrice: item['leasePrice']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,9 @@
|
||||||
this.taskId = params.taskId
|
this.taskId = params.taskId
|
||||||
this.init()
|
this.init()
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,9 @@ import { basePath } from '../../public';
|
||||||
sendData: {},
|
sendData: {},
|
||||||
deptFormData: {
|
deptFormData: {
|
||||||
deptName: '',
|
deptName: '',
|
||||||
projName: ''
|
projName: '',
|
||||||
|
agreementId: null,
|
||||||
|
agreementCode: null
|
||||||
},
|
},
|
||||||
deptRange: [
|
deptRange: [
|
||||||
|
|
||||||
|
|
@ -225,7 +227,30 @@ import { basePath } from '../../public';
|
||||||
closePopup () {
|
closePopup () {
|
||||||
this.$refs.popup.close()
|
this.$refs.popup.close()
|
||||||
},
|
},
|
||||||
formSubmit () {
|
|
||||||
|
async getgreementId(){
|
||||||
|
const params = {
|
||||||
|
unitId:this.deptFormData.deptName,
|
||||||
|
projectId:this.deptFormData.projName
|
||||||
|
}
|
||||||
|
const res = await this.$api.exitMaterial.ifAgreement(params)
|
||||||
|
if(res.data.code == 200){
|
||||||
|
this.deptFormData = { ...this.deptFormData,...res.data.data }
|
||||||
|
}else{
|
||||||
|
this.deptFormData.deptName = ''
|
||||||
|
this.deptFormData.projName = ''
|
||||||
|
|
||||||
|
uni.showToast({
|
||||||
|
duration:1000,
|
||||||
|
title:'当前单位和工程未上传协议'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log('getgreementId ==============',res);
|
||||||
|
},
|
||||||
|
|
||||||
|
async formSubmit () {
|
||||||
|
await this.getgreementId()
|
||||||
|
|
||||||
let that = this
|
let that = this
|
||||||
that.$refs.deptForm.validate().then(formData => {
|
that.$refs.deptForm.validate().then(formData => {
|
||||||
console.log(formData);
|
console.log(formData);
|
||||||
|
|
@ -239,11 +264,14 @@ import { basePath } from '../../public';
|
||||||
preNum: item['num']
|
preNum: item['num']
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
that.sendData = {
|
that.sendData = {
|
||||||
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
|
companyId: uni.getStorageSync('userInfo').sysUser.companyId,
|
||||||
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
createBy: uni.getStorageSync('userInfo').sysUser.userName,
|
||||||
unitId: formData.deptName,
|
unitId: formData.deptName,
|
||||||
projectId: formData.projName,
|
projectId: formData.projName,
|
||||||
|
agreementId: that.deptFormData.agreementId,
|
||||||
|
agreementCode: that.deptFormData.agreementCode,
|
||||||
taskType: 29,
|
taskType: 29,
|
||||||
taskStatus: 30,
|
taskStatus: 30,
|
||||||
// createTime: that.formatDate(new Date().getTime()),
|
// createTime: that.formatDate(new Date().getTime()),
|
||||||
|
|
@ -253,7 +281,7 @@ import { basePath } from '../../public';
|
||||||
},
|
},
|
||||||
leaseApplyDetails: that.totalGoods
|
leaseApplyDetails: that.totalGoods
|
||||||
}
|
}
|
||||||
console.log(that.sendData);
|
console.log('that.sendData =================== ',that.sendData,that.deptFormData);
|
||||||
// 提交预约商品
|
// 提交预约商品
|
||||||
uni.request({
|
uni.request({
|
||||||
url: basePath + '/tm_task/submitLeaseApply',
|
url: basePath + '/tm_task/submitLeaseApply',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue