|
|
@@ -10,9 +10,11 @@
|
|
|
<!-- <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" type="primary" size="small" @click="editCustomer"
|
|
|
+ :disabled="!roleName.includes('admin')">保存数据
|
|
|
</el-button>
|
|
|
- <el-button class="el-button--small-yh" :type="form.enableOrNot == 0?'primary':''" size="small" @click="enableNot" v-if="form.id">
|
|
|
+ <el-button class="el-button--small-yh" :type="form.enableOrNot == 0 ? 'primary' : ''" size="small"
|
|
|
+ @click="enableNot" v-if="form.id" :disabled="!roleName.includes('admin')">
|
|
|
{{ form.enableOrNot == 0 ? '启用' : '禁用' }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -21,58 +23,41 @@
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form class="trading-form" :option="optionForm" v-model="form" ref="form">
|
|
|
<template slot="accountBalance">
|
|
|
- <el-link type="primary" @click="accountBalanceClick(form.accountBalance)">{{ form.accountBalance }}</el-link>
|
|
|
+ <el-link type="primary" @click="accountBalanceClick(form.accountBalance)">{{ form.accountBalance
|
|
|
+ }}</el-link>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
</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"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="collectionPagination.current"
|
|
|
- :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400]"
|
|
|
- :page-size="collectionPagination.size"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ <el-pagination @size-change="collectionSizeChange" @current-change="handleCurrentChange"
|
|
|
+ :current-page="collectionPagination.current" :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">
|
|
|
</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"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page="paymentPagination.current"
|
|
|
- :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400]"
|
|
|
- :page-size="paymentPagination.size"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
+ :current-page="paymentPagination.current" :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">
|
|
|
</el-pagination>
|
|
|
</el-tab-pane>
|
|
|
@@ -97,6 +82,7 @@ export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ roleName: localStorage.getItem("roleName"),
|
|
|
activeName: 'collection',
|
|
|
khCorpList: [],
|
|
|
gysCorpList: [],
|
|
|
@@ -147,7 +133,7 @@ export default {
|
|
|
label: '公司名称',
|
|
|
prop: "corporateName",
|
|
|
type: 'select',
|
|
|
- disabled: true,
|
|
|
+ disabled: true,
|
|
|
dicUrl: "/api/blade-system/dept/lazy-list?parentId=",
|
|
|
props: {
|
|
|
label: "deptName",
|
|
|
@@ -193,11 +179,11 @@ 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
|
|
|
- })
|
|
|
+ } 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: {
|
|
|
@@ -236,7 +222,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
accountBalanceClick() {
|
|
|
- corpsDescListAll({corpType: 'KH', enableOrNot: 1}).then(res => {
|
|
|
+ corpsDescListAll({ corpType: 'KH', enableOrNot: 1 }).then(res => {
|
|
|
this.khCorpList = res.data.data
|
|
|
|
|
|
this.activeName = 'collection'
|
|
|
@@ -263,7 +249,7 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
- corpsDescListAll({corpType: 'GYS', enableOrNot: 1}).then(res => {
|
|
|
+ corpsDescListAll({ corpType: 'GYS', enableOrNot: 1 }).then(res => {
|
|
|
this.gysCorpList = res.data.data
|
|
|
})
|
|
|
},
|
|
|
@@ -334,10 +320,14 @@ export default {
|
|
|
})
|
|
|
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)
|
|
|
+ if (this.roleName.includes('admin')) {
|
|
|
+ if (this.form.enableOrNot == 1) {
|
|
|
+ this.$set(this.optionForm, 'disabled', true)
|
|
|
+ } else {
|
|
|
+ this.$set(this.optionForm, 'disabled', false)
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$set(this.optionForm, 'disabled', true)
|
|
|
}
|
|
|
loading.close()
|
|
|
}).finally(() => {
|