代码优化
This commit is contained in:
parent
0e4c6cf138
commit
93ea4bcdc3
|
|
@ -82,7 +82,7 @@
|
||||||
ref="deviceTypeCascader"
|
ref="deviceTypeCascader"
|
||||||
filterable
|
filterable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
:disabled="isEdit && !isView"
|
:disabled="(isEdit && !isView) || isCost"
|
||||||
></el-cascader>
|
></el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预计领料时间" prop="estimateLeaseTime">
|
<el-form-item label="预计领料时间" prop="estimateLeaseTime">
|
||||||
|
|
@ -271,6 +271,7 @@ import {
|
||||||
getLeaseApplyListAll,
|
getLeaseApplyListAll,
|
||||||
getLeaseApplyAuditListAll,
|
getLeaseApplyAuditListAll,
|
||||||
getCostBearingApi,
|
getCostBearingApi,
|
||||||
|
getAgreementInfoByIdApi,
|
||||||
} from '@/api/claimAndRefund/receive'
|
} from '@/api/claimAndRefund/receive'
|
||||||
import { getInfo } from '@/api/login'
|
import { getInfo } from '@/api/login'
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -493,6 +494,7 @@ export default {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
costBearingList: [],
|
costBearingList: [],
|
||||||
|
isCost: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -569,6 +571,21 @@ export default {
|
||||||
projectId: this.queryParams.proId,
|
projectId: this.queryParams.proId,
|
||||||
}
|
}
|
||||||
const res = await getAgreementInfoById(params)
|
const res = await getAgreementInfoById(params)
|
||||||
|
|
||||||
|
console.log(res, '根据工程和单位获取协议id')
|
||||||
|
|
||||||
|
if (res.data.isSlt == 1) {
|
||||||
|
this.$message.error(
|
||||||
|
'当前协议下对应的工程已完成结算,不可重复领料!',
|
||||||
|
)
|
||||||
|
this.isCost = true
|
||||||
|
|
||||||
|
if (this.leaseApplyDetails.length > 0) {
|
||||||
|
this.leaseApplyDetails = []
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.isCost = false
|
||||||
|
}
|
||||||
if (!(res.data && res.data.agreementId)) {
|
if (!(res.data && res.data.agreementId)) {
|
||||||
this.$message.error('当前单位和工程未上传')
|
this.$message.error('当前单位和工程未上传')
|
||||||
|
|
||||||
|
|
@ -579,6 +596,12 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.agreementId = res.data.agreementId
|
this.queryParams.agreementId = res.data.agreementId
|
||||||
this.queryParams.agreementCode = res.data.agreementCode
|
this.queryParams.agreementCode = res.data.agreementCode
|
||||||
|
|
||||||
|
// // 1. 判断当前协议对应的工程是否结算
|
||||||
|
|
||||||
|
// getAgreementInfoByIdApi({
|
||||||
|
// agreementId: res.data.agreementId,
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -729,7 +752,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.leaseApplyDetails = this.leaseApplyDetails
|
this.queryParams.leaseApplyDetails = this.leaseApplyDetails
|
||||||
if (this.queryParams.leaseApplyDetails.length == 0) {
|
if (this.queryParams.leaseApplyDetails.length == 0) {
|
||||||
this.$message.error('请添加数据')
|
this.$message.error('请添加机具类型')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let canSave = true
|
let canSave = true
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@
|
||||||
prop="contractCode"
|
prop="contractCode"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
label="协议类型"
|
label="协议类型"
|
||||||
align="center"
|
align="center"
|
||||||
prop="protocol"
|
prop="protocol"
|
||||||
|
|
@ -165,7 +165,7 @@
|
||||||
<span v-if="scope.row.protocol == 1">内部单位</span>
|
<span v-if="scope.row.protocol == 1">内部单位</span>
|
||||||
<span v-if="scope.row.protocol == 2">外部单位</span>
|
<span v-if="scope.row.protocol == 2">外部单位</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="附件图片"
|
label="附件图片"
|
||||||
align="center"
|
align="center"
|
||||||
|
|
@ -321,7 +321,7 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="协议类型" prop="protocol">
|
<el-form-item label="协议类型" prop="protocol">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.protocol"
|
v-model="form.protocol"
|
||||||
|
|
@ -337,6 +337,16 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系方式" prop="phone">
|
||||||
|
<el-input
|
||||||
|
v-model="form.phone"
|
||||||
|
placeholder="请输入联系方式"
|
||||||
|
maxlength="11"
|
||||||
|
onkeyup="this.value = this.value.replace(/[^\d]/g,'');"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
@ -391,29 +401,6 @@
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="联系方式" prop="phone">
|
|
||||||
<el-input
|
|
||||||
v-model="form.phone"
|
|
||||||
placeholder="请输入联系方式"
|
|
||||||
maxlength="11"
|
|
||||||
onkeyup="this.value = this.value.replace(/[^\d]/g,'');"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input
|
|
||||||
v-model="form.remark"
|
|
||||||
type="textarea"
|
|
||||||
placeholder="请输入备注"
|
|
||||||
maxlength="100"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="20">
|
|
||||||
<el-form-item label="合同照片" prop="fileName">
|
<el-form-item label="合同照片" prop="fileName">
|
||||||
<el-upload
|
<el-upload
|
||||||
:http-request="
|
:http-request="
|
||||||
|
|
@ -436,7 +423,19 @@
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
v-model="form.remark"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
maxlength="100"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-row> </el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
@ -488,7 +487,7 @@ export default {
|
||||||
|
|
||||||
protocolList: [
|
protocolList: [
|
||||||
{ protocolId: 1, protocolName: '内部单位' },
|
{ protocolId: 1, protocolName: '内部单位' },
|
||||||
{ protocolId: 2, protocolName: '外部单位' },
|
// { protocolId: 2, protocolName: '外部单位' },
|
||||||
],
|
],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: '',
|
title: '',
|
||||||
|
|
@ -694,7 +693,8 @@ export default {
|
||||||
},
|
},
|
||||||
//图片查看
|
//图片查看
|
||||||
openImg(url) {
|
openImg(url) {
|
||||||
this.dialogImageUrl = this.uploadUrl + url
|
// this.dialogImageUrl = this.uploadUrl + url
|
||||||
|
this.dialogImageUrl = url
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
|
|
|
||||||
Reference in New Issue