|
|
@@ -43,7 +43,6 @@
|
|
|
<el-table-column label="操作" width="220" align="right" fixed="right">
|
|
|
<template #default="scope">
|
|
|
<el-button-group>
|
|
|
- <el-button text type="warning" size="small" @click="table_bind(scope.row)">绑定门店</el-button>
|
|
|
<el-button text type="success" size="small" @click="table_print(scope.row)">打印测试</el-button>
|
|
|
<el-popconfirm title="确定删除并解绑该打印机吗?" @confirm="table_del(scope.row, scope.$index)">
|
|
|
<template #reference>
|
|
|
@@ -55,16 +54,13 @@
|
|
|
</el-table-column>
|
|
|
</scTable>
|
|
|
<formMain ref="formMain" @success="handleSuccess"></formMain>
|
|
|
- <storeData ref="storeData" :multiple="false" @success="handleStore"></storeData>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import formMain from './form';
|
|
|
-import storeData from "@/views/manage/components/store";
|
|
|
export default {
|
|
|
components: {
|
|
|
- formMain,
|
|
|
- storeData
|
|
|
+ formMain
|
|
|
},
|
|
|
data(){
|
|
|
return {
|
|
|
@@ -87,25 +83,6 @@ export default {
|
|
|
}
|
|
|
this.$message.success(resp.msg);
|
|
|
},
|
|
|
- async handleStore(data){
|
|
|
- var loading = this.$loading();
|
|
|
- var resp = await this.$API.print.edit.post({"sn":this.bindData.sn,'id':this.bindData.id,'agent_id':data.agent_id,'store_id':data.store_id});
|
|
|
- loading.close();
|
|
|
- if (resp.code == 0) {
|
|
|
- return this.$message.error(resp.msg);
|
|
|
- }
|
|
|
- this.$message.success(resp.msg);
|
|
|
- var that = this;
|
|
|
- setTimeout(function(){
|
|
|
- that.refresh()
|
|
|
- },1500);
|
|
|
- },
|
|
|
- table_bind(data){
|
|
|
- this.bindData = data;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.storeData.open()
|
|
|
- })
|
|
|
- },
|
|
|
refresh(){
|
|
|
this.$refs.table.refresh()
|
|
|
},
|