|
@@ -2,17 +2,8 @@
|
|
|
<div class="inline-16" v-if="data.status">
|
|
|
<el-popconfirm v-if="refresh" title="确定提交当前合同吗?" @confirm="submit">
|
|
|
<el-button size="mini" slot="reference" v-if="data.status=='新建'">提 交</el-button>
|
|
|
+ <el-button size="mini" slot="reference" v-if="data.status=='已提交'">审 核</el-button>
|
|
|
</el-popconfirm>
|
|
|
-
|
|
|
- <el-dropdown :hide-on-click="false" @command="check">
|
|
|
- <span class="el-dropdown-link">
|
|
|
- <el-button size="mini" :disabled="disabled" v-if="data.status == '已提交'">审 核</el-button>
|
|
|
- </span>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item command="1">通过</el-dropdown-item>
|
|
|
- <el-dropdown-item command="0">退回</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -42,6 +33,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
async submit () {
|
|
|
+ if (this.data.status == '新建') {
|
|
|
let res = await this.$api.requested({
|
|
|
"id": 20221121202802,
|
|
|
"content": {
|
|
@@ -51,18 +43,18 @@ export default {
|
|
|
this.tool.showMessage(res,() => {
|
|
|
this.$emit('onSuccess')
|
|
|
})
|
|
|
- },
|
|
|
- async check (num) {
|
|
|
- let res = await this.$api.requested({
|
|
|
- "id": 20221121203102,
|
|
|
- "content": {
|
|
|
- "type":num,//0:不通过,1:通过
|
|
|
- "sa_contractids": [this.data.sa_contractid]
|
|
|
- },
|
|
|
- })
|
|
|
- this.tool.showMessage(res,() => {
|
|
|
- this.$emit('onSuccess')
|
|
|
- })
|
|
|
+ } else {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id": 20221121203102,
|
|
|
+ "content": {
|
|
|
+ "type":1,//0:不通过,1:通过
|
|
|
+ "sa_contractids": [this.data.sa_contractid]
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.tool.showMessage(res,() => {
|
|
|
+ this.$emit('onSuccess')
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
};
|