123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <div>
- <BaseDialog
- width="600px"
- :isShow.sync="isShow"
- title="修改备注"
- @submit="submitForm"
- >
- <el-input
- :rows="6"
- type="textarea"
- placeholder="请输入备注"
- v-model="value"
- ></el-input>
- </BaseDialog>
- </div>
- </template>
- <script>
- import { updateRemark, updateMonthRemark } from "@/api/financed/index";
- export default {
- name: "remarks",
- props: {
- dialogVisible: {
- type: Boolean,
- default: false,
- },
- info: {
- type: Object,
- default: () => {
- return {};
- },
- },
- },
- data() {
- return {
- value: "",
- };
- },
- mounted() {},
- methods: {
- init() {
- this.value = this.info.remark;
- },
- submitForm() {
- let { orderSn, id } = this.info;
- let fn = orderSn ? updateRemark : updateMonthRemark;
- fn({
- orderSn: orderSn,
- remark: this.value,
- id: id,
- }).then((res) => {
- this.$message.success("修改备注成功");
- this.isShow = false;
- this.info.remark = this.value;
- // this.$emit("search");
- });
- },
- },
- computed: {
- isShow: {
- get() {
- if (this.dialogVisible) {
- this.init();
- }
- return this.dialogVisible;
- },
- set(val) {
- this.$emit("update:dialogVisible", false);
- },
- },
- },
- };
- </script>
- <style lang="scss" scoped></style>
|