|
@@ -164,7 +164,7 @@
|
|
|
|
|
|
<el-button type="primary" size="mini">启用</el-button>
|
|
<el-button type="primary" size="mini">启用</el-button>
|
|
<el-button type="primary" size="mini">停用</el-button>
|
|
<el-button type="primary" size="mini">停用</el-button>
|
|
- <el-button type="primary" size="mini">同步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">删除</el-button>
|
|
</div>
|
|
</div>
|
|
<el-table
|
|
<el-table
|
|
@@ -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} from '@/api/purchase/deliveryAddress.js'
|
|
|
|
|
|
+import {getAddressList, delAddress, toNc } 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 {
|
|
@@ -296,7 +296,8 @@ export default {
|
|
tableList: [],
|
|
tableList: [],
|
|
total: 0,
|
|
total: 0,
|
|
rowDetail: {},
|
|
rowDetail: {},
|
|
- disable: false
|
|
|
|
|
|
+ disable: false,
|
|
|
|
+ allSelection:[]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -336,7 +337,23 @@ export default {
|
|
}
|
|
}
|
|
this.getList(this.queryParams)
|
|
this.getList(this.queryParams)
|
|
},
|
|
},
|
|
- handleSelectionChange() {},
|
|
|
|
|
|
+ toNC() {
|
|
|
|
+ if (this.allSelection.length == 0 || this.allSelection.length > 1) {
|
|
|
|
+ this.$modal.msgWarning("同步NC只能进行单条操作!");
|
|
|
|
+ } else {
|
|
|
|
+ console.log('参数', this.allSelection)
|
|
|
|
+ toNc(this.allSelection[0]).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$modal.msgSuccess("操作成功!");
|
|
|
|
+ this.getList(this.queryParams)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ handleSelectionChange(selection) {
|
|
|
|
+ console.log('选中', selection)
|
|
|
|
+ this.allSelection = selection
|
|
|
|
+ },
|
|
handleCommand(command) {
|
|
handleCommand(command) {
|
|
alert(command)
|
|
alert(command)
|
|
},
|
|
},
|