|
|
@@ -2,17 +2,21 @@
|
|
|
<div >
|
|
|
<el-button @click="submit" size="mini" slot="reference" type="primary" :disabled="data.status == '已过期'" v-if="data.status=='新建' && tool.checkAuth($route.name,'submit') && !disabled && data.status">提 交</el-button>
|
|
|
<el-button @click="submit" size="mini" slot="reference" type="primary" v-if="data.status=='已提交' && tool.checkAuth($route.name,'check') && data.status">审 核</el-button>
|
|
|
+ <adjust v-show="false" ref="adjustRef" @adjustSuccess="onCheck"></adjust>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import adjust from '../components/priceDifference/index'
|
|
|
export default {
|
|
|
props:['data','disabled'],
|
|
|
name: '',
|
|
|
+ components:{adjust},
|
|
|
data() {
|
|
|
return {
|
|
|
checkVisible:false,
|
|
|
- refresh:true
|
|
|
+ refresh:true,
|
|
|
+ siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid
|
|
|
};
|
|
|
},
|
|
|
computed:{
|
|
|
@@ -21,7 +25,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
created() {
|
|
|
- console.log('eeee',this.disabled);
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
submit () {
|
|
|
@@ -41,45 +45,45 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
} else {
|
|
|
- console.log(this.data,'审核数据')
|
|
|
- console.log(new Date(this.data.enddate))
|
|
|
- console.log(new Date())
|
|
|
- console.log(new Date() > new Date(this.data.enddate))
|
|
|
if (new Date() > new Date(this.data.enddate)){
|
|
|
this.$confirm('当前合同有效期已过期,是否确定继续审核?','提示',{
|
|
|
confirmButtonText:'确定',
|
|
|
cancelButtonText:'取消'
|
|
|
- }).then(async () => {
|
|
|
- let res = await this.$api.requested({
|
|
|
- "id": 20221121203102,
|
|
|
- "content": {
|
|
|
- "type":1,//0:不通过,1:通过
|
|
|
- "sa_contractid": this.data.sa_contractid
|
|
|
- },
|
|
|
- })
|
|
|
- this.tool.showMessage(res,() => {
|
|
|
- this.$emit('onSuccess')
|
|
|
- })
|
|
|
+ }).then( () => {
|
|
|
+ if (this.siteid == 'HY' && this.$route.query.type == '居间'){
|
|
|
+ this.$refs.adjustRef.$refs.priceDiff.dialogTableVisible = true
|
|
|
+ this.$refs.adjustRef.$refs.priceDiff.onAdjust(this.data)
|
|
|
+ }else {
|
|
|
+ this.onCheck()
|
|
|
+ }
|
|
|
})
|
|
|
}else {
|
|
|
this.$confirm('确定进行审核操作吗?','提示',{
|
|
|
confirmButtonText:'确定',
|
|
|
cancelButtonText:'取消'
|
|
|
- }).then(async () => {
|
|
|
- let res = await this.$api.requested({
|
|
|
- "id": 20221121203102,
|
|
|
- "content": {
|
|
|
- "type":1,//0:不通过,1:通过
|
|
|
- "sa_contractid": this.data.sa_contractid
|
|
|
- },
|
|
|
- })
|
|
|
- this.tool.showMessage(res,() => {
|
|
|
- this.$emit('onSuccess')
|
|
|
- })
|
|
|
+ }).then( () => {
|
|
|
+ if (this.siteid == 'HY' && this.$route.query.type == '居间'){
|
|
|
+ this.$refs.adjustRef.$refs.priceDiff.dialogTableVisible = true
|
|
|
+ this.$refs.adjustRef.$refs.priceDiff.onAdjust(this.data)
|
|
|
+ }else {
|
|
|
+ this.onCheck()
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ async onCheck(){
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id": 20221121203102,
|
|
|
+ "content": {
|
|
|
+ "type":1,//0:不通过,1:通过
|
|
|
+ "sa_contractid": this.data.sa_contractid
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|