|
|
@@ -2,25 +2,21 @@
|
|
|
<div>
|
|
|
<div class="customer-head">
|
|
|
<div class="customer-back">
|
|
|
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
- @click="backToList(0)">返回列表
|
|
|
+ <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="backToList(0)"
|
|
|
+ >返回列表
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
- <!-- <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"-->
|
|
|
- <!-- @click="confirmEditing">编辑-->
|
|
|
- <!-- </el-button>-->
|
|
|
- <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
|
|
|
+ <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" v-if="editButton" @click="inEdit"
|
|
|
+ >编辑
|
|
|
</el-button>
|
|
|
- <el-button class="el-button--small-yh" :type="form.enableOrNot == 0?'primary':''" size="small" @click="enableNot" v-if="form.id">
|
|
|
- {{ form.enableOrNot == 0 ? '启用' : '禁用' }}
|
|
|
+ <el-button v-if="!editButton" class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据 </el-button>
|
|
|
+ <el-button class="el-button--small-yh" :type="form.enableOrNot == 0 ? 'primary' : ''" size="small" @click="enableNot" v-if="form.id">
|
|
|
+ {{ form.enableOrNot == 0 ? "启用" : "禁用" }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="color:#F56C6C;position: relative;top: 12px;z-index: 1000;left: 40%;width: 160px;">
|
|
|
- 请先禁用再进行编辑!!!
|
|
|
- </div>
|
|
|
- <div style="margin-top: 30px">
|
|
|
+ <div style="margin-top: 50px">
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form class="trading-form" :option="optionForm" v-model="form" ref="form">
|
|
|
<template slot="accountBalance">
|
|
|
@@ -30,23 +26,15 @@
|
|
|
</trade-card>
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="提示"
|
|
|
- :visible.sync="dialogVisible"
|
|
|
- :modal-append-to-body="false"
|
|
|
- width="80%">
|
|
|
-
|
|
|
+ <el-dialog title="提示" :visible.sync="dialogVisible" :modal-append-to-body="false" width="80%">
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
<el-tab-pane label="收款" name="collection">
|
|
|
- <el-table
|
|
|
- :data="collectionData"
|
|
|
- stripe
|
|
|
- style="width: 100%">
|
|
|
- <el-table-column prop="sysNo" label="单号"/>
|
|
|
- <el-table-column prop="corpId" label="客户"/>
|
|
|
- <el-table-column prop="settlementDate" label="结算日期"/>
|
|
|
- <el-table-column prop="amount" label="金额"/>
|
|
|
- <el-table-column prop="financeStatus" label="类型"/>
|
|
|
+ <el-table :data="collectionData" stripe style="width: 100%">
|
|
|
+ <el-table-column prop="sysNo" label="单号" />
|
|
|
+ <el-table-column prop="corpId" label="客户" />
|
|
|
+ <el-table-column prop="settlementDate" label="结算日期" />
|
|
|
+ <el-table-column prop="amount" label="金额" />
|
|
|
+ <el-table-column prop="financeStatus" label="类型" />
|
|
|
</el-table>
|
|
|
<el-pagination
|
|
|
@size-change="collectionSizeChange"
|
|
|
@@ -55,19 +43,17 @@
|
|
|
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400]"
|
|
|
:page-size="collectionPagination.size"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="collectionPagination.total">
|
|
|
+ :total="collectionPagination.total"
|
|
|
+ >
|
|
|
</el-pagination>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="付款" name="payment">
|
|
|
- <el-table
|
|
|
- :data="paymentData"
|
|
|
- stripe
|
|
|
- style="width: 100%">
|
|
|
- <el-table-column prop="sysNo" label="单号"/>
|
|
|
- <el-table-column prop="corpId" label="供应商"/>
|
|
|
- <el-table-column prop="settlementDate" label="结算日期"/>
|
|
|
- <el-table-column prop="amount" label="金额"/>
|
|
|
- <el-table-column prop="financeStatus" label="类型"/>
|
|
|
+ <el-table :data="paymentData" stripe style="width: 100%">
|
|
|
+ <el-table-column prop="sysNo" label="单号" />
|
|
|
+ <el-table-column prop="corpId" label="供应商" />
|
|
|
+ <el-table-column prop="settlementDate" label="结算日期" />
|
|
|
+ <el-table-column prop="amount" label="金额" />
|
|
|
+ <el-table-column prop="financeStatus" label="类型" />
|
|
|
</el-table>
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
@@ -76,7 +62,8 @@
|
|
|
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400]"
|
|
|
:page-size="paymentPagination.size"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="paymentPagination.total">
|
|
|
+ :total="paymentPagination.total"
|
|
|
+ >
|
|
|
</el-pagination>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -85,12 +72,10 @@
|
|
|
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-
|
|
|
import { typeSave, detail, editenable } from "@/api/tirePartsMall/basicData/accountManagement";
|
|
|
import { getList } from "@/api/collectionSettlement/index";
|
|
|
import { getUser } from "@/api/system/user";
|
|
|
@@ -100,7 +85,9 @@ export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
- activeName: 'collection',
|
|
|
+ editButton: false,
|
|
|
+ editDisabled: false,
|
|
|
+ activeName: "collection",
|
|
|
khCorpList: [],
|
|
|
gysCorpList: [],
|
|
|
collectionData: [],
|
|
|
@@ -120,70 +107,83 @@ export default {
|
|
|
optionForm: {
|
|
|
menuBtn: false,
|
|
|
span: 8,
|
|
|
- column: [{
|
|
|
- label: '账户名称',
|
|
|
- prop: "cname",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: " ",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- }, {
|
|
|
- label: '账户类型',
|
|
|
- prop: "accountType",
|
|
|
- type: 'select',
|
|
|
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=accountType",
|
|
|
- props: {
|
|
|
- label: "dictValue",
|
|
|
- value: "dictValue"
|
|
|
- }
|
|
|
- }, {
|
|
|
- label: '开户银行',
|
|
|
- prop: "bankDeposit"
|
|
|
- }, {
|
|
|
- label: '银行账号',
|
|
|
- prop: "bankAccount"
|
|
|
- }, {
|
|
|
- label: '开户人',
|
|
|
- prop: "accountHolder"
|
|
|
- }, {
|
|
|
- label: '公司名称',
|
|
|
- prop: "corporateName",
|
|
|
- type: 'select',
|
|
|
+ disabled:false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "账户名称",
|
|
|
+ prop: "cname",
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "账户类型",
|
|
|
+ prop: "accountType",
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=accountType",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "开户银行",
|
|
|
+ prop: "bankDeposit"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "银行账号",
|
|
|
+ prop: "bankAccount"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "开户人",
|
|
|
+ prop: "accountHolder"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "公司名称",
|
|
|
+ prop: "corporateName",
|
|
|
+ type: "select",
|
|
|
disabled: true,
|
|
|
- dicUrl: "/api/blade-system/dept/lazy-list?parentId=",
|
|
|
- props: {
|
|
|
- label: "deptName",
|
|
|
- value: "id"
|
|
|
- }
|
|
|
- }, {
|
|
|
- label: '币别',
|
|
|
- prop: "currency",
|
|
|
- span: 8,
|
|
|
- type: 'select',
|
|
|
- dicData: [
|
|
|
- {
|
|
|
- label: "CNY",
|
|
|
- value: "CNY",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "USD",
|
|
|
- value: "USD",
|
|
|
+ dicUrl: "/api/blade-system/dept/lazy-list?parentId=",
|
|
|
+ props: {
|
|
|
+ label: "deptName",
|
|
|
+ value: "id"
|
|
|
}
|
|
|
- ],
|
|
|
- }, {
|
|
|
- label: '账户余额',
|
|
|
- prop: "accountBalance",
|
|
|
- disabled: true
|
|
|
- }, {
|
|
|
- label: '备注',
|
|
|
- prop: "remarks",
|
|
|
- type: 'textarea',
|
|
|
- span: 24,
|
|
|
- minRows: 2
|
|
|
- }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "币别",
|
|
|
+ prop: "currency",
|
|
|
+ span: 8,
|
|
|
+ type: "select",
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "CNY",
|
|
|
+ value: "CNY"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "USD",
|
|
|
+ value: "USD"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "账户余额",
|
|
|
+ prop: "accountBalance",
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
+ type: "textarea",
|
|
|
+ span: 24,
|
|
|
+ minRows: 2
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
- }
|
|
|
+ };
|
|
|
},
|
|
|
props: {
|
|
|
onLoad: {
|
|
|
@@ -195,157 +195,171 @@ export default {
|
|
|
},
|
|
|
async created() {
|
|
|
if (this.onLoad.id) {
|
|
|
- this.queryData(this.onLoad.id)
|
|
|
- }else {
|
|
|
- getUser(JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id).then(res=>{
|
|
|
- this.form.corporateName = res.data.data.deptName
|
|
|
- this.form.corporateId = res.data.data.deptId
|
|
|
- })
|
|
|
+ this.editButton = true;
|
|
|
+ this.editDisabled = true;
|
|
|
+ this.optionForm.disabled = true;
|
|
|
+ this.queryData(this.onLoad.id);
|
|
|
+ } else {
|
|
|
+ getUser(JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id).then(res => {
|
|
|
+ this.form.corporateName = res.data.data.deptName;
|
|
|
+ this.form.corporateId = res.data.data.deptId;
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ inEdit() {
|
|
|
+ if (this.form.enableOrNot == 1) {
|
|
|
+ return this.$message.error("请先禁用再进行编辑");
|
|
|
+ }
|
|
|
+ if (this.form.enableOrNot == 0) {
|
|
|
+ this.editButton = false;
|
|
|
+ this.editDisabled = false;
|
|
|
+ this.optionForm.disabled = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
handleCurrentChange(currentPage) {
|
|
|
- if (this.activeName === 'collection') {
|
|
|
- this.collectionPagination.current = currentPage
|
|
|
+ if (this.activeName === "collection") {
|
|
|
+ this.collectionPagination.current = currentPage;
|
|
|
getList(this.collectionPagination).then(res => {
|
|
|
- this.collectionData = res.data.data.records
|
|
|
- this.collectionPagination.total = res.data.data.total
|
|
|
+ this.collectionData = res.data.data.records;
|
|
|
+ this.collectionPagination.total = res.data.data.total;
|
|
|
this.collectionData.map(data => {
|
|
|
for (let corp of this.khCorpList) {
|
|
|
if (data.corpId == corp.id) {
|
|
|
- data.corpId = corp.cname
|
|
|
- break
|
|
|
+ data.corpId = corp.cname;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- return data
|
|
|
- })
|
|
|
- })
|
|
|
- } else if (this.activeName === 'payment') {
|
|
|
- this.paymentPagination.current = currentPage
|
|
|
+ return data;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else if (this.activeName === "payment") {
|
|
|
+ this.paymentPagination.current = currentPage;
|
|
|
getList(this.paymentPagination).then(res => {
|
|
|
- this.paymentData = res.data.data.records
|
|
|
- this.paymentPagination.total = res.data.data.total
|
|
|
+ this.paymentData = res.data.data.records;
|
|
|
+ this.paymentPagination.total = res.data.data.total;
|
|
|
this.paymentData.map(data => {
|
|
|
for (let corp of this.gysCorpList) {
|
|
|
if (data.corpId == corp.id) {
|
|
|
- data.corpId = corp.cname
|
|
|
- break
|
|
|
+ data.corpId = corp.cname;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- return data
|
|
|
- })
|
|
|
-
|
|
|
- })
|
|
|
+ return data;
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
accountBalanceClick() {
|
|
|
- corpsDescListAll({corpType: 'KH', enableOrNot: 1}).then(res => {
|
|
|
- this.khCorpList = res.data.data
|
|
|
+ corpsDescListAll({ corpType: "KH", enableOrNot: 1 }).then(res => {
|
|
|
+ this.khCorpList = res.data.data;
|
|
|
|
|
|
- this.activeName = 'collection'
|
|
|
- this.collectionPagination.billType = 'SK'
|
|
|
- this.collectionPagination.dc = 'd'
|
|
|
- this.collectionPagination.accountName = this.form.id
|
|
|
- this.collectionPagination.accountId = this.form.id
|
|
|
- this.collectionPagination.current = 1
|
|
|
+ this.activeName = "collection";
|
|
|
+ this.collectionPagination.billType = "SK";
|
|
|
+ this.collectionPagination.dc = "d";
|
|
|
+ this.collectionPagination.accountName = this.form.id;
|
|
|
+ this.collectionPagination.accountId = this.form.id;
|
|
|
+ this.collectionPagination.current = 1;
|
|
|
|
|
|
getList(this.collectionPagination).then(res => {
|
|
|
- this.collectionData = res.data.data.records
|
|
|
+ this.collectionData = res.data.data.records;
|
|
|
this.collectionData.map(data => {
|
|
|
for (let corp of this.khCorpList) {
|
|
|
if (data.corpId == corp.id) {
|
|
|
- data.corpId = corp.cname
|
|
|
- break
|
|
|
+ data.corpId = corp.cname;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- return data
|
|
|
- })
|
|
|
+ return data;
|
|
|
+ });
|
|
|
|
|
|
- this.collectionPagination.total = res.data.data.total
|
|
|
- this.dialogVisible = true
|
|
|
- })
|
|
|
- })
|
|
|
+ this.collectionPagination.total = res.data.data.total;
|
|
|
+ this.dialogVisible = true;
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
- corpsDescListAll({corpType: 'GYS', enableOrNot: 1}).then(res => {
|
|
|
- this.gysCorpList = res.data.data
|
|
|
- })
|
|
|
+ corpsDescListAll({ corpType: "GYS", enableOrNot: 1 }).then(res => {
|
|
|
+ this.gysCorpList = res.data.data;
|
|
|
+ });
|
|
|
},
|
|
|
handleClick() {
|
|
|
- if (this.activeName === 'collection') {
|
|
|
+ if (this.activeName === "collection") {
|
|
|
// 收款
|
|
|
- this.collectionPagination.billType = 'SK'
|
|
|
- this.collectionPagination.dc = 'd'
|
|
|
- this.collectionPagination.accountName = this.form.id
|
|
|
- this.collectionPagination.accountId = this.form.id
|
|
|
- this.collectionPagination.current = 1
|
|
|
+ this.collectionPagination.billType = "SK";
|
|
|
+ this.collectionPagination.dc = "d";
|
|
|
+ this.collectionPagination.accountName = this.form.id;
|
|
|
+ this.collectionPagination.accountId = this.form.id;
|
|
|
+ this.collectionPagination.current = 1;
|
|
|
|
|
|
getList(this.collectionPagination).then(res => {
|
|
|
- this.collectionData = res.data.data.records
|
|
|
- this.collectionPagination.total = res.data.data.total
|
|
|
+ this.collectionData = res.data.data.records;
|
|
|
+ this.collectionPagination.total = res.data.data.total;
|
|
|
this.collectionData.map(data => {
|
|
|
for (let corp of this.khCorpList) {
|
|
|
if (data.corpId == corp.id) {
|
|
|
- data.corpId = corp.cname
|
|
|
- break
|
|
|
+ data.corpId = corp.cname;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- return data
|
|
|
- })
|
|
|
- })
|
|
|
- } else if (this.activeName === 'payment') {
|
|
|
+ return data;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else if (this.activeName === "payment") {
|
|
|
// 付款
|
|
|
- this.paymentPagination.billType = 'FK'
|
|
|
- this.paymentPagination.dc = 'c'
|
|
|
- this.paymentPagination.accountName = this.form.id
|
|
|
- this.paymentPagination.accountId = this.form.id
|
|
|
- this.paymentPagination.current = 1
|
|
|
+ this.paymentPagination.billType = "FK";
|
|
|
+ this.paymentPagination.dc = "c";
|
|
|
+ this.paymentPagination.accountName = this.form.id;
|
|
|
+ this.paymentPagination.accountId = this.form.id;
|
|
|
+ this.paymentPagination.current = 1;
|
|
|
|
|
|
getList(this.paymentPagination).then(res => {
|
|
|
- this.paymentData = res.data.data.records
|
|
|
- this.paymentPagination.total = res.data.data.total
|
|
|
+ this.paymentData = res.data.data.records;
|
|
|
+ this.paymentPagination.total = res.data.data.total;
|
|
|
this.paymentData.map(data => {
|
|
|
for (let corp of this.gysCorpList) {
|
|
|
if (data.corpId == corp.id) {
|
|
|
- data.corpId = corp.cname
|
|
|
- break
|
|
|
+ data.corpId = corp.cname;
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
- return data
|
|
|
- })
|
|
|
- })
|
|
|
+ return data;
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
//启用禁用
|
|
|
enableNot() {
|
|
|
- let data = this.form
|
|
|
+ let data = this.form;
|
|
|
editenable({ id: data.id, enableOrNot: data.enableOrNot ? 0 : 1 }).then(res => {
|
|
|
this.$message({
|
|
|
type: "success",
|
|
|
message: data.enableOrNot ? "禁用成功!" : "启用成功!"
|
|
|
});
|
|
|
- this.queryData(data.id)
|
|
|
+ this.queryData(data.id);
|
|
|
// this.$set(this.form, 'enableOrNot', data.enableOrNot == 1 ? 0 : 1)
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
// 查询
|
|
|
queryData(id) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- })
|
|
|
- detail({ id }).then(res => {
|
|
|
- this.form = res.data.data;
|
|
|
- if (this.form.enableOrNot == 1) {
|
|
|
- this.$set(this.optionForm,'disabled',true)
|
|
|
- }else {
|
|
|
- this.$set(this.optionForm,'disabled',false)
|
|
|
- }
|
|
|
- loading.close()
|
|
|
- }).finally(() => {
|
|
|
- loading.close()
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
});
|
|
|
+ detail({ id })
|
|
|
+ .then(res => {
|
|
|
+ this.form = res.data.data;
|
|
|
+ if (this.form.enableOrNot == 1) {
|
|
|
+ this.editButton = true;
|
|
|
+ this.editDisabled = true;
|
|
|
+ this.optionForm.disabled = true;
|
|
|
+ }
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
},
|
|
|
editCustomer() {
|
|
|
this.$refs["form"].validate((valid, done) => {
|
|
|
@@ -353,38 +367,40 @@ export default {
|
|
|
if (valid) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
- text: '加载中',
|
|
|
- spinner: 'el-icon-loading',
|
|
|
- background: 'rgba(255,255,255,0.7)'
|
|
|
- })
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
+ });
|
|
|
if (!this.form.id && !this.form.enableOrNot) {
|
|
|
this.form.enableOrNot = 1;
|
|
|
}
|
|
|
- typeSave(this.form).then(res => {
|
|
|
- loading.close()
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: this.form.id ? "修改成功!" : "新增成功!"
|
|
|
+ typeSave(this.form)
|
|
|
+ .then(res => {
|
|
|
+ loading.close();
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: this.form.id ? "修改成功!" : "新增成功!"
|
|
|
+ });
|
|
|
+ this.queryData(res.data.data.id);
|
|
|
+ if (!this.form.id) {
|
|
|
+ //添加成功后默认启用
|
|
|
+ let data = this.form;
|
|
|
+ // editenable({ id: res.data.data.id, enableOrNot: data.enableOrNot ? 0 : 1 }).then(res => {
|
|
|
+ // this.$set(this.form, 'enableOrNot', data.enableOrNot == 1 ? 0 : 1)
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
});
|
|
|
- this.queryData(res.data.data.id);
|
|
|
- if (!this.form.id) {
|
|
|
- //添加成功后默认启用
|
|
|
- let data = this.form
|
|
|
- // editenable({ id: res.data.data.id, enableOrNot: data.enableOrNot ? 0 : 1 }).then(res => {
|
|
|
- // this.$set(this.form, 'enableOrNot', data.enableOrNot == 1 ? 0 : 1)
|
|
|
- // })
|
|
|
- }
|
|
|
- }).finally(() => {
|
|
|
- loading.close()
|
|
|
- });
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
backToList(type) {
|
|
|
this.$emit("backToList", type);
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|