|
@@ -142,7 +142,7 @@
|
|
<div class="btn_grooup">
|
|
<div class="btn_grooup">
|
|
<el-button type="primary" size="mini" @click="addAddress">新增</el-button>
|
|
<el-button type="primary" size="mini" @click="addAddress">新增</el-button>
|
|
|
|
|
|
- <el-dropdown size="mini" @command="handleCommand">
|
|
|
|
|
|
+ <!-- <el-dropdown size="mini" @command="handleCommand">
|
|
<el-button size="mini" type="primary" style="margin-left: 10px;">
|
|
<el-button size="mini" type="primary" style="margin-left: 10px;">
|
|
导入<i class="el-icon-arrow-down el-icon--right"></i>
|
|
导入<i class="el-icon-arrow-down el-icon--right"></i>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -160,12 +160,12 @@
|
|
<el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
|
|
<el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
|
|
<el-dropdown-item command="导出明细">导出明细</el-dropdown-item>
|
|
<el-dropdown-item command="导出明细">导出明细</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
- </el-dropdown>
|
|
|
|
|
|
+ </el-dropdown> -->
|
|
|
|
|
|
- <el-button type="primary" size="mini">启用</el-button>
|
|
|
|
- <el-button type="primary" size="mini">停用</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="startUse">启用</el-button>
|
|
|
|
+ <el-button type="primary" size="mini" @click="stopUse">停用</el-button>
|
|
<el-button type="primary" size="mini" @click="toNC">同步NC</el-button>
|
|
<el-button type="primary" size="mini" @click="toNC">同步NC</el-button>
|
|
- <el-button type="primary" size="mini">删除</el-button>
|
|
|
|
|
|
+ <el-button type="primary" size="mini" @click="deletes">删除</el-button>
|
|
</div>
|
|
</div>
|
|
<el-table
|
|
<el-table
|
|
:data="tableList"
|
|
:data="tableList"
|
|
@@ -236,7 +236,7 @@
|
|
<script>
|
|
<script>
|
|
import Add from './add.vue'
|
|
import Add from './add.vue'
|
|
import CollapseTransition from '@/components/MyCollapse/collapse.vue'
|
|
import CollapseTransition from '@/components/MyCollapse/collapse.vue'
|
|
-import {getAddressList, delAddress, toNc } from '@/api/purchase/deliveryAddress.js'
|
|
|
|
|
|
+import {getAddressList, delAddress, toNc, enable } from '@/api/purchase/deliveryAddress.js'
|
|
import Refers from '@/components/Refers/refers.vue'
|
|
import Refers from '@/components/Refers/refers.vue'
|
|
import TreeRefers from '@/components/Refers/treeRefer.vue'
|
|
import TreeRefers from '@/components/Refers/treeRefer.vue'
|
|
export default {
|
|
export default {
|
|
@@ -350,6 +350,50 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ startUse() {
|
|
|
|
+ if (this.allSelection.length == 0 || this.allSelection.length > 1) {
|
|
|
|
+ this.$modal.msgWarning("启用停用只能进行单条操作!");
|
|
|
|
+ } else {
|
|
|
|
+ console.log('参数', this.allSelection)
|
|
|
|
+ let param = {id: this.allSelection[0].id, status: 'Y' }
|
|
|
|
+ enable(param).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("操作成功!");
|
|
|
|
+ this.getList(this.queryParams)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ stopUse() {
|
|
|
|
+ if (this.allSelection.length == 0 || this.allSelection.length > 1) {
|
|
|
|
+ this.$modal.msgWarning("启用停用只能进行单条操作!");
|
|
|
|
+ } else {
|
|
|
|
+ console.log('参数', this.allSelection)
|
|
|
|
+ let param = { id: this.allSelection[0].id, status: 'N' }
|
|
|
|
+ enable(param).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("操作成功!");
|
|
|
|
+ this.getList(this.queryParams)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ deletes() {
|
|
|
|
+ if (this.allSelection.length == 0) {
|
|
|
|
+ this.$modal.msgWarning("请至少选择一条数据!");
|
|
|
|
+ } else {
|
|
|
|
+ let param = this.allSelection.map(item => item.id)
|
|
|
|
+ let rows = param.join()
|
|
|
|
+ this.$modal.confirm('确认删除选择数据?').then(() => {
|
|
|
|
+ delAddress(rows).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
|
+ this.getList(this.queryParams)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => { })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
console.log('选中', selection)
|
|
console.log('选中', selection)
|
|
this.allSelection = selection
|
|
this.allSelection = selection
|
|
@@ -376,7 +420,7 @@ export default {
|
|
},
|
|
},
|
|
deleteids(row) {
|
|
deleteids(row) {
|
|
console.log('row', row)
|
|
console.log('row', row)
|
|
- this.$modal.confirm('确认信息').then(() => {
|
|
|
|
|
|
+ this.$modal.confirm('确认删除选择数据').then(() => {
|
|
delAddress(row.id).then(res => {
|
|
delAddress(row.id).then(res => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
this.$modal.msgSuccess("删除成功");
|
|
this.$modal.msgSuccess("删除成功");
|