diff --git a/pages/deviceDetail/deviceDetail.vue b/pages/deviceDetail/deviceDetail.vue index 7322831..5f7790e 100644 --- a/pages/deviceDetail/deviceDetail.vue +++ b/pages/deviceDetail/deviceDetail.vue @@ -12,7 +12,7 @@
规格型号
{ + that.specRange = res.data.data.map((item,index) => { return { text: item['typeName'], - value: item['leasePrice'], - status: item['status'] + value: index, + status: item['status'], + typeId: item['typeId'], + leasePrice: item['leasePrice'] } }) } diff --git a/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail.vue b/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail.vue index 70b1f02..99afa52 100644 --- a/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail.vue +++ b/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail.vue @@ -200,7 +200,9 @@ this.taskId = params.taskId this.init() } - + }, + onShow() { + this.init() } } diff --git a/pages/orderCart/orderCart.vue b/pages/orderCart/orderCart.vue index 20f040f..9e5c9b0 100644 --- a/pages/orderCart/orderCart.vue +++ b/pages/orderCart/orderCart.vue @@ -91,7 +91,9 @@ import { basePath } from '../../public'; sendData: {}, deptFormData: { deptName: '', - projName: '' + projName: '', + agreementId: null, + agreementCode: null }, deptRange: [ @@ -225,7 +227,30 @@ import { basePath } from '../../public'; closePopup () { 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 that.$refs.deptForm.validate().then(formData => { console.log(formData); @@ -239,11 +264,14 @@ import { basePath } from '../../public'; preNum: item['num'] } }) + that.sendData = { 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()), @@ -253,7 +281,7 @@ import { basePath } from '../../public'; }, leaseApplyDetails: that.totalGoods } - console.log(that.sendData); + console.log('that.sendData =================== ',that.sendData,that.deptFormData); // 提交预约商品 uni.request({ url: basePath + '/tm_task/submitLeaseApply',