|
@@ -32,7 +32,7 @@
|
|
|
:rules="[
|
|
|
{required: true, message:'请输入合同名称', trigger:'blur'}
|
|
|
]">
|
|
|
- <el-input v-model="inputForm.name" placeholder="请输入合同名称"></el-input>
|
|
|
+ <el-input maxlength="64" v-model="inputForm.name" placeholder="请输入合同名称"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -74,6 +74,7 @@
|
|
|
{required: true, message:'请选择合同终止日期', trigger:'blur'}
|
|
|
]">
|
|
|
<el-date-picker
|
|
|
+ @change="checkData"
|
|
|
v-model="inputForm.closingDate"
|
|
|
type="date"
|
|
|
style="width: 418px"
|
|
@@ -120,7 +121,7 @@
|
|
|
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="对方合同编号" prop="contractOpposite">
|
|
|
- <el-input v-model="inputForm.contractOpposite" placeholder="请填写对方合同编号"></el-input>
|
|
|
+ <el-input maxlength="64" v-model="inputForm.contractOpposite" placeholder="请填写对方合同编号"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -139,7 +140,7 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="contractFee">
|
|
|
- <el-input style="width: 500px" placeholder="请选择收费标准" v-model="inputForm.contractFee"></el-input>
|
|
|
+ <el-input style="width: 100%" placeholder="请选择收费标准" v-model="inputForm.contractFee"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -175,6 +176,16 @@
|
|
|
|
|
|
</el-form>
|
|
|
<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
|
+
|
|
|
+ <el-image-viewer
|
|
|
+ v-if="showViewer"
|
|
|
+ :on-close="closeViewer"
|
|
|
+ :url-list="[url]"
|
|
|
+ zIndex="9999"/>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="close(),closeXTable()" icon="el-icon-circle-close">关闭</el-button>
|
|
|
+ <el-button size="small" type="primary" v-if="method != 'view'" @click="doSubmit()" icon="el-icon-circle-check" v-noMoreClick >确定</el-button>
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -348,7 +359,6 @@
|
|
|
this.loading = true
|
|
|
this.workContractService.findById(this.inputForm.id).then(({data}) => {
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
- console.log('data', data)
|
|
|
const f = []
|
|
|
if (data.fees !== null && data.fees !== undefined && data.fees !== '') {
|
|
|
data.fees.split(',').forEach(item => {
|
|
@@ -373,7 +383,7 @@
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
|
- this.inputForm.workAttachmentList = []
|
|
|
+ this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
|
|
|
this.dataListNew.forEach((item) => {
|
|
|
if (item.id === null || item.id === undefined || item.id === '') {
|
|
|
item.url = item.raw.url
|
|
@@ -386,7 +396,7 @@
|
|
|
|
|
|
this.workContractService.save(this.inputForm).then(({data}) => {
|
|
|
this.close()
|
|
|
- this.$message.success(data)
|
|
|
+ this.$message.success(data.msg)
|
|
|
this.$emit('refreshDataList')
|
|
|
this.loading = false
|
|
|
}).catch(() => {
|
|
@@ -460,8 +470,8 @@
|
|
|
if (str_.indexOf('.') != -1) {
|
|
|
str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
|
|
|
}
|
|
|
- if (str_.length > 4) {
|
|
|
- this.$message.warning(`金额小数点后只能输入四位,请正确输入!`)
|
|
|
+ if (str_.length > 2) {
|
|
|
+ this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
|
|
|
return (str = '')
|
|
|
}
|
|
|
}
|
|
@@ -469,22 +479,6 @@
|
|
|
str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
|
|
|
return str
|
|
|
},
|
|
|
- positiveInteger (num) {
|
|
|
- let str = num.toString()
|
|
|
- var len1 = str.substr(0, 1)
|
|
|
- var len2 = str.substr(1, 1)
|
|
|
- // eslint-disable-next-line eqeqeq
|
|
|
- if (str.length > 1 && len1 == 0 && len2 != '.') {
|
|
|
- str = str.substr(1, 1)
|
|
|
- }
|
|
|
- // eslint-disable-next-line eqeqeq
|
|
|
- if (len1 == '.') {
|
|
|
- str = ''
|
|
|
- }
|
|
|
- // eslint-disable-next-line no-useless-escape
|
|
|
- str = str.replace(/[^\d^]+/g, '') // 保留数字
|
|
|
- return str
|
|
|
- },
|
|
|
tableRowClassName ({row, rowIndex}) {
|
|
|
row.index = rowIndex
|
|
|
},
|
|
@@ -541,6 +535,14 @@
|
|
|
this.inputForm.contractFee = fee.substring(1, fee.length)
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ checkData () {
|
|
|
+ let begin = this.inputForm.effectiveDate
|
|
|
+ let close = this.inputForm.closingDate
|
|
|
+ if (close < begin) {
|
|
|
+ this.$message.warning(`合同终止日期异常,请重新选择`)
|
|
|
+ this.inputForm.closingDate = ''
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|