|
|
@@ -44,9 +44,17 @@
|
|
|
<router-link :to="'/oilsupplier/paymentinfo/' + scope.row.Id + '/operation'">
|
|
|
<el-button type="primary" plain title="查看详情" size="mini">查看</el-button>
|
|
|
</router-link>
|
|
|
-
|
|
|
- <el-button v-if="authUser.Profile.IsCompanyUser != '1'" plain type="plain" title="删除" style="margin-left:10px"
|
|
|
- size="mini" @click="deleteEntityConfirm(scope.row)">删除</el-button>
|
|
|
+ <el-button type="danger" style="margin-left:10px" size="mini" @click="deleteEntity(scope.row)" v-if="isAllowDel">删除</el-button>
|
|
|
+ <!--<el-popover placement="top" title="提示" trigger="click" v-if="isAllowDel">-->
|
|
|
+ <!--<el-alert title="" description="确认要删除吗?" type="warning" :closable="false">-->
|
|
|
+ <!--</el-alert>-->
|
|
|
+ <!--<br />-->
|
|
|
+ <!--<div style="text-align: right; margin: 0">-->
|
|
|
+ <!--<el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>-->
|
|
|
+ <!--</div>-->
|
|
|
+ <!--<el-button slot="reference" plain type="danger" title="删除" style="margin-left:10px"-->
|
|
|
+ <!--size="mini">删除</el-button>-->
|
|
|
+ <!--</el-popover>-->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
@@ -152,6 +160,7 @@
|
|
|
|
|
|
data () {
|
|
|
return {
|
|
|
+ isAllowDel: false,
|
|
|
payVisible: false,
|
|
|
dialogVisible: false,
|
|
|
delevisble: false,
|
|
|
@@ -239,7 +248,7 @@
|
|
|
Object.assign(this.searchFormReset, this.searchForm)
|
|
|
// 查询列表
|
|
|
this.initDatas()
|
|
|
- // this.getDictOptions()
|
|
|
+ this.getDictOptions()
|
|
|
},
|
|
|
methods: {
|
|
|
savePayInfo () {
|
|
|
@@ -313,7 +322,7 @@
|
|
|
api.getDictList(this.$axios).then(res => {
|
|
|
// this.dictOptions.customerList = res.data.items['customerList']
|
|
|
// this.dictOptions.projectList = res.data.items['projectList']
|
|
|
-
|
|
|
+ this.isAllowDel = res.data.items['IsAllowDel']
|
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
@@ -378,21 +387,27 @@
|
|
|
})
|
|
|
},
|
|
|
deleteEntity (row) {
|
|
|
- api.deleteEntity(row.Id, this.$axios).then(res => {
|
|
|
- if (res.data.code === 0) {
|
|
|
- this.initDatas()
|
|
|
- this.$message({
|
|
|
- type: 'success',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: res.data.message
|
|
|
- })
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- console.error(err)
|
|
|
+ this.$confirm('此操作将永久删除该数据,删除后将不需要缴费直接到待入库中, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ api.deleteEntity(row.Id, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.initDatas()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
|