feat():增加支付接口和页面
parent
370ffba5c1
commit
99c95f1409
|
@ -83,10 +83,10 @@
|
|||
title="你确定要删除此支付客户嘛?"
|
||||
@confirm="handleDelete(customer.id)"
|
||||
>
|
||||
<el-button style="float: right;padding: 5px;margin: 0 5px" type="primary" slot="reference" icon="el-icon-edit"
|
||||
<el-button style="float: right;padding: 5px;margin: 0 5px" type="danger" slot="reference" icon="el-icon-delete"
|
||||
circle></el-button>
|
||||
</el-popconfirm>
|
||||
<el-button style="float: right;padding: 5px;margin: 0 5px" type="danger" icon="el-icon-delete"
|
||||
<el-button style="float: right;padding: 5px;margin: 0 5px" type="primary" icon="el-icon-edit"
|
||||
@click="handleUpdate(customer.id)"
|
||||
circle></el-button>
|
||||
</div>
|
||||
|
@ -164,7 +164,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button @click="open = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
@ -172,7 +172,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {customerAll, disable, enable, save, selectList, update} from "@/api/pay/customer";
|
||||
import {customerAll, disable, enable, save, selectList, update, del, get} from "@/api/pay/customer";
|
||||
|
||||
export default {
|
||||
name: "Customer",
|
||||
|
@ -283,13 +283,23 @@ export default {
|
|||
if (row.status == 'Y'){
|
||||
enable(row.id).then(response=>{
|
||||
this.$modal.msgSuccess("启用成功");
|
||||
row.status = 'Y'; // 显式地更新状态
|
||||
this.getList();
|
||||
})
|
||||
}).catch(error => {
|
||||
this.$modal.msgError("启用失败");
|
||||
row.status = 'N'; // 回退状态
|
||||
console.error(error);
|
||||
});
|
||||
}else {
|
||||
disable(row.id).then(response=>{
|
||||
this.$modal.msgSuccess("禁用成功");
|
||||
row.status = 'N'; // 显式地更新状态
|
||||
this.getList();
|
||||
})
|
||||
}).catch(error => {
|
||||
this.$modal.msgError("禁用失败");
|
||||
row.status = 'Y'; // 回退状态
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
|
@ -305,7 +315,10 @@ export default {
|
|||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改支付单客户信息";
|
||||
})
|
||||
}).catch(error => {
|
||||
this.$modal.msgError("获取客户信息失败");
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue