feat():增加支付接口和页面

master
86191 2024-08-09 10:04:30 +08:00
parent 370ffba5c1
commit 99c95f1409
1 changed files with 20 additions and 7 deletions

View File

@ -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);
});
},
}
}