|
|
|
<template>
|
|
|
|
<j-modal :title="title" :width="width" :visible="visible" :confirmLoading="confirmLoading" :maskClosable="false"
|
|
|
|
switchFullscreen @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
|
|
|
|
<a-spin :spinning="confirmLoading">
|
|
|
|
<j-form-container :disabled="formDisabled">
|
|
|
|
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
|
|
|
|
<!-- <j-form-container :disabled="formDisabled"> -->
|
|
|
|
<a-form-model ref="form" :model="model" :rules="validatorRules">
|
|
|
|
<a-row>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="审批人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approval">
|
|
|
|
<a-input v-model="model.approval" placeholder="请输入审批人" ></a-input>
|
|
|
|
<a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree">
|
|
|
|
<a-radio-group v-model="model.isagree" @change="onChange">
|
|
|
|
<a-radio :value="'1'">
|
|
|
|
同意
|
|
|
|
</a-radio>
|
|
|
|
<a-radio :value="'2'">
|
|
|
|
不同意
|
|
|
|
</a-radio>
|
|
|
|
</a-radio-group>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="审批意见" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalOpinions">
|
|
|
|
<a-input v-model="model.approvalOpinions" placeholder="请输入审批意见" ></a-input>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="是否同意" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isagree">
|
|
|
|
<a-input v-model="model.isagree" placeholder="请输入是否同意" ></a-input>
|
|
|
|
<a-textarea v-model="model.approvalOpinions" placeholder="请输入审批意见" ></a-textarea>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
</a-row>
|
|
|
|
</a-form-model>
|
|
|
|
</j-form-container>
|
|
|
|
<!-- </j-form-container> -->
|
|
|
|
</a-spin>
|
|
|
|
</j-modal>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
...
|
...
|
@@ -30,7 +36,7 @@ |
|
|
|
import { validateDuplicateValue } from '@/utils/util'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'TblBiddingShenqApprovalForm',
|
|
|
|
name: 'TblBiddingShenqApproval2Model',
|
|
|
|
components: {
|
|
|
|
},
|
|
|
|
props: {
|
|
...
|
...
|
@@ -43,8 +49,12 @@ |
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
title: "操作",
|
|
|
|
width: 800,
|
|
|
|
model:{
|
|
|
|
},
|
|
|
|
visible: false,
|
|
|
|
value:'1',
|
|
|
|
labelCol: {
|
|
|
|
xs: { span: 24 },
|
|
|
|
sm: { span: 5 },
|
|
...
|
...
|
@@ -55,9 +65,15 @@ |
|
|
|
},
|
|
|
|
confirmLoading: false,
|
|
|
|
validatorRules: {
|
|
|
|
isagree: [
|
|
|
|
{ required: true, message: '请选择!' },
|
|
|
|
],
|
|
|
|
approvalOpinions: [
|
|
|
|
{ required: true, message: '请输入审批意见!' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
url: {
|
|
|
|
add: "/bidding_shenq_approval/tblBiddingShenqApproval/add",
|
|
|
|
add: "/bidding_shenq_approval/biddingShenqApproval/add2",
|
|
|
|
edit: "/bidding_shenq_approval/tblBiddingShenqApproval/edit",
|
|
|
|
queryById: "/bidding_shenq_approval/tblBiddingShenqApproval/queryById"
|
|
|
|
}
|
|
...
|
...
|
@@ -79,23 +95,37 @@ |
|
|
|
edit (record) {
|
|
|
|
this.model = Object.assign({}, record);
|
|
|
|
this.visible = true;
|
|
|
|
this.model.isagree = '1'
|
|
|
|
console.log('this.model',this.model)
|
|
|
|
},
|
|
|
|
submitForm () {
|
|
|
|
onChange(e) {
|
|
|
|
console.log('radio checked', e.target.value);
|
|
|
|
this.model.isagree = this.value
|
|
|
|
},
|
|
|
|
handleOk () {
|
|
|
|
const that = this;
|
|
|
|
// 触发表单验证
|
|
|
|
this.$refs.form.validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
that.confirmLoading = true;
|
|
|
|
let httpurl = '';
|
|
|
|
let method = '';
|
|
|
|
if(!this.model.id){
|
|
|
|
httpurl+=this.url.add;
|
|
|
|
method = 'post';
|
|
|
|
}else{
|
|
|
|
httpurl+=this.url.edit;
|
|
|
|
method = 'put';
|
|
|
|
console.log(this.model)
|
|
|
|
const tempMOdel = {
|
|
|
|
partNumber:this.model.partNumber,
|
|
|
|
approvalOpinions:this.model.approvalOpinions,
|
|
|
|
isagree:this.model.isagree,
|
|
|
|
approvalLevel:'2'
|
|
|
|
}
|
|
|
|
httpAction(httpurl,this.model,method).then((res)=>{
|
|
|
|
// return
|
|
|
|
that.confirmLoading = true;
|
|
|
|
// let httpurl = this.url.add;
|
|
|
|
let method = 'post';
|
|
|
|
// if(!this.model.id){
|
|
|
|
// httpurl+=this.url.add;
|
|
|
|
// method = 'post';
|
|
|
|
// }else{
|
|
|
|
// httpurl+=this.url.edit;
|
|
|
|
// method = 'put';
|
|
|
|
// }
|
|
|
|
httpAction(this.url.add,tempMOdel,method).then((res)=>{
|
|
|
|
if(res.success){
|
|
|
|
that.$message.success(res.message);
|
|
|
|
that.$emit('ok');
|
|
...
|
...
|
@@ -104,11 +134,20 @@ |
|
|
|
}
|
|
|
|
}).finally(() => {
|
|
|
|
that.confirmLoading = false;
|
|
|
|
this.close()
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
close() {
|
|
|
|
this.$emit('close');
|
|
|
|
this.visible = false;
|
|
|
|
this.$refs.form.clearValidate();
|
|
|
|
},
|
|
|
|
handleCancel() {
|
|
|
|
this.close()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script> |
|
|
\ No newline at end of file |
...
|
...
|
|