| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <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,
- siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid
- };
- },
- computed:{
- },
- watch:{
- },
- created() {
- },
- methods: {
- submit () {
- if (this.data.status == '新建') {
- this.$confirm('确定进行提交操作吗?','提示',{
- confirmButtonText:'确定',
- cancelButtonText:'取消'
- }).then(async () => {
- let res = await this.$api.requested({
- "id": 20221121202802,
- "content": {
- "sa_contractids": [this.data.sa_contractid]
- },
- })
- this.tool.showMessage(res,() => {
- this.$emit('onSuccess')
- })
- })
- } else {
- if (new Date() > new Date(this.data.enddate)){
- this.$confirm('当前合同有效期已过期,是否确定继续审核?','提示',{
- confirmButtonText:'确定',
- cancelButtonText:'取消'
- }).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( () => {
- 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>
- <style scoped>
- .box p {
- line-height: 40px;
- text-align: center;
- }
- .box p:hover {
- background: #EBF1FE;
- color: #6191F8;
- cursor: pointer;
- }
- </style>
|