123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <script>
- import { submit } from "@/api/expend/customerExpend";
- export default {
- name: "OpenOrClose",
- props: {
- selectData: {
- type: Array,
- default: () => [],
- },
- },
- data() {
- return {
- // title: "提交",
- title: "不转销售订单审批",
- loading: false,
- };
- },
- computed: {
- disabled: {
- get() {
- const { selectData } = this;
- if (selectData.length < 1) {
- return true;
- }
- return false;
- },
- set() {},
- },
- },
- methods: {
- //提交
- useClick() {
- this.$modal.confirm("确认提交吗?").then(async () => {
- try {
- this.$modal.loading("处理中,请稍后...");
- let { code, msg } = await submit(this.selectData[0]);
- if (code == 200) {
- this.$notify.success(msg);
- this.$emit("success");
- }
- } catch (error) {
- } finally {
- this.$modal.closeLoading();
- }
- });
- },
- },
- created() {},
- };
- </script>
- <template>
- <el-button
- v-loading="loading"
- @click="useClick"
- :disabled="disabled"
- v-bind="$attrs"
- >{{ title }}</el-button
- >
- </template>
|