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