|
@@ -9,44 +9,64 @@
|
|
|
append-to-body
|
|
|
:show-close="false"
|
|
|
@close="onClose">
|
|
|
- <div class="drawer__panel">
|
|
|
- <el-row :gutter="10">
|
|
|
- <el-form :model="form" :rules="rules" ref="form" label-width="125px" label-position="right" size="mini">
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="项目名称:" prop="projectname">
|
|
|
- <el-input v-model="projectname" placeholder="请输入项目名称" disabled></el-input>
|
|
|
- </el-form-item>
|
|
|
+ <div class="drawer__panel" v-if="auditList.length > 0">
|
|
|
+ <div style="border: 1px solid #c4c4c4;margin-bottom: 20px" v-for="(item,index) in auditList" :key="item.rowindex">
|
|
|
+ <el-row :gutter="10" style="margin: 20px 0 20px 0">
|
|
|
+ <el-col :span="11" :offset="1">
|
|
|
+ <span style="font-size: 14px">
|
|
|
+ 发起授权人:{{item.initiateauthby}}
|
|
|
+ </span>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="客户名称:" prop="enterprisename">
|
|
|
- <el-input v-model="form.enterprisename" placeholder="请选择客户" disabled></el-input>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="11">
|
|
|
+ <span style="font-size: 14px">
|
|
|
+ 发起时间:{{item.initiateauthdate}}
|
|
|
+ </span>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item label="授权书有效期:" prop="date">
|
|
|
- <el-date-picker
|
|
|
- @change="changeDate"
|
|
|
- v-model="form.date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- type="daterange"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-form :model="form" :rules="rules" ref="form" label-width="125px" label-position="right" size="mini">
|
|
|
+ <el-col :span="23">
|
|
|
+ <el-form-item label="项目名称:" >
|
|
|
+ <el-input v-model="item.projectname" placeholder="请输入项目名称" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="23">
|
|
|
+ <el-form-item label="客户名称:" :rules="{ required: true, message: '请选择客户', trigger: 'change'}">
|
|
|
+ <el-input v-model="item.enterprisename" placeholder="请选择客户" disabled></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="23">
|
|
|
+ <el-form-item label="授权书有效期:" :rules="{ required: true, message: '请选择授权书有效期', trigger: 'change'}">
|
|
|
+ <el-date-picker
|
|
|
+ @change="changeDate"
|
|
|
+ v-model="dateList[index]"
|
|
|
+ :clearable="false"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="10" style="margin: 0 0 20px 0">
|
|
|
+ <el-col :span="11" :offset="1">
|
|
|
+ <span style="color: #3874f6;font-size: 14px" @click="queryAudit(item)">预览授权书</span>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
- <el-form-item >
|
|
|
- <span style="color: #3874f6" @click="queryAudit">预览授权书</span>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-form>
|
|
|
- </el-row>
|
|
|
+ </el-row>
|
|
|
+ <div style="text-align: center;margin-bottom: 20px">
|
|
|
+ <el-button size="small" type="warning" @click="noPass(item)" class="normal-btn-width">不通过</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="onApproved(item)" class="normal-btn-width">审核通过</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="drawer__panel" v-else>
|
|
|
+ <el-empty description="暂无记录" :image-size="40"></el-empty>
|
|
|
</div>
|
|
|
- <div class="fixed__btn__panel">
|
|
|
+ <div class="fixed__btn__panel">
|
|
|
<el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
|
|
|
- <el-button size="small" type="warning" @click="noPass" class="normal-btn-width">不通过</el-button>
|
|
|
- <el-button size="small" type="primary" @click="onApproved" class="normal-btn-width">审核通过</el-button>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
</div>
|
|
@@ -67,6 +87,8 @@ export default {
|
|
|
list:[],
|
|
|
tablecols:[],
|
|
|
total:0,
|
|
|
+ auditList:[],
|
|
|
+ dateList:[],
|
|
|
form:{
|
|
|
"enterprisename":'',
|
|
|
"sa_projectid": '',
|
|
@@ -76,6 +98,17 @@ export default {
|
|
|
"date":[],
|
|
|
"isPass": 1
|
|
|
},
|
|
|
+ param:{
|
|
|
+ "id": 20230816124004,
|
|
|
+ "content": {
|
|
|
+ "sa_projectid":'',
|
|
|
+ "pageNumber": 1,
|
|
|
+ "pageSize": 999,
|
|
|
+ "where": {
|
|
|
+ "condition": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
rules:{
|
|
|
enterprisename:[
|
|
|
{ required: true, message: '请选择客户', trigger: 'change'},
|
|
@@ -89,13 +122,25 @@ export default {
|
|
|
methods:{
|
|
|
visibleShow(){
|
|
|
this.formVisible = true
|
|
|
- this.projectname = this.data.projectname
|
|
|
+ this.listData()
|
|
|
+ /*this.projectname = this.data.projectname
|
|
|
this.form.sa_projectid = this.data.sa_projectid
|
|
|
this.form.sys_enterpriseid = this.data.sys_enterpriseid
|
|
|
this.form.enterprisename = this.data.enterprisename
|
|
|
this.form.begdate = this.data.begdate_auth
|
|
|
this.form.enddate = this.data.enddate_auth
|
|
|
- this.form.date = [this.data.begdate_auth,this.data.enddate_auth]
|
|
|
+ this.form.date = [this.data.begdate_auth,this.data.enddate_auth]*/
|
|
|
+ },
|
|
|
+ async listData(){
|
|
|
+ this.param.content.sa_projectid = this.$route.query.id
|
|
|
+ const res = await this.$api.requested(this.param)
|
|
|
+ console.log(res.data,'可审核授权')
|
|
|
+ this.auditList = res.data
|
|
|
+ res.data.forEach((item,index)=>{
|
|
|
+ this.dateList[index] = [item.begdate_auth,item.enddate_auth]
|
|
|
+ })
|
|
|
+ console.log(this.dateList)
|
|
|
+
|
|
|
},
|
|
|
changeDate(){
|
|
|
console.log(this.form.date)
|
|
@@ -103,7 +148,8 @@ export default {
|
|
|
this.form.enddate = this.form.date[1]
|
|
|
},
|
|
|
/*授权预览*/
|
|
|
- async queryAudit(){
|
|
|
+ async queryAudit(item){
|
|
|
+ console.log(item)
|
|
|
const res = await this.$api.requested({
|
|
|
"id": 20221213094501,
|
|
|
"content": {
|
|
@@ -114,53 +160,87 @@ export default {
|
|
|
let page = this.$router.resolve({
|
|
|
path:res.data,
|
|
|
query: {
|
|
|
- begdate: this.form.begdate,
|
|
|
- enddate: this.form.enddate,
|
|
|
- enterprisename:this.form.enterprisename
|
|
|
+ begdate: item.begdate_auth,
|
|
|
+ enddate: item.enddate_auth,
|
|
|
+ enterprisename:item.enterprisename
|
|
|
}
|
|
|
})
|
|
|
page.href = page.href.replace(/#\//g,'')
|
|
|
window.open('http://61.164.207.46:8000/' + page.href, '_blank');
|
|
|
/*window.open('https://oms.idcgroup.com.cn:8079/' + page.href, '_blank');*/
|
|
|
},
|
|
|
- onApproved(){
|
|
|
- console.log(this.form,'form表单')
|
|
|
- this.$refs.form.validate(async (valid)=>{
|
|
|
- if (!valid) return false
|
|
|
- this.form.isPass = 1
|
|
|
- this.form.begdate = this.form.date[0]
|
|
|
- this.form.enddate = this.form.date[1]
|
|
|
+ open() {
|
|
|
+ this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!'
|
|
|
+ });
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onApproved(item){
|
|
|
+ this.$confirm('该项目授权申请确认通过?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ closeOnClickModal:false,
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
const res = await this.$api.requested({
|
|
|
- "id": 20230810161804,
|
|
|
- "content": this.form
|
|
|
+ "id": "20230810161804",
|
|
|
+ "content": {
|
|
|
+ "sa_project_authorizationid":item.sa_project_authorizationid,
|
|
|
+ "begdate": item.begdate_auth,
|
|
|
+ "enddate": item.enddate_auth,
|
|
|
+ "isPass":"1"
|
|
|
+ }
|
|
|
})
|
|
|
this.tool.showMessage(res,()=>{
|
|
|
- this.$emit('onSuccess')
|
|
|
- this.formVisible = false
|
|
|
- this.$refs.form.resetFields()
|
|
|
+ this.listData()
|
|
|
})
|
|
|
- })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
- noPass(){
|
|
|
- this.$refs.form.validate(async (valid)=>{
|
|
|
- if (!valid) return false
|
|
|
- this.form.isPass = 0
|
|
|
- this.form.begdate = this.form.date[0]
|
|
|
- this.form.enddate = this.form.date[1]
|
|
|
+ noPass(item){
|
|
|
+ this.$confirm('该项目授权申请确认不通过?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ closeOnClickModal:false,
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
const res = await this.$api.requested({
|
|
|
- "id": 20230810161804,
|
|
|
- "content": this.form
|
|
|
+ "id": "20230810161804",
|
|
|
+ "content": {
|
|
|
+ "sa_project_authorizationid":item.sa_project_authorizationid,
|
|
|
+ "begdate": item.begdate_auth,
|
|
|
+ "enddate": item.enddate_auth,
|
|
|
+ "isPass":"0"
|
|
|
+ }
|
|
|
})
|
|
|
this.tool.showMessage(res,()=>{
|
|
|
- this.$emit('onSuccess')
|
|
|
- this.formVisible = false
|
|
|
- this.$refs.form.resetFields()
|
|
|
+ this.listData()
|
|
|
})
|
|
|
- })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
onClose(){
|
|
|
this.formVisible = false
|
|
|
- this.$refs.form.resetFields()
|
|
|
+ this.$emit('onSuccess')
|
|
|
}
|
|
|
},
|
|
|
created() {
|