|
@@ -90,8 +90,6 @@
|
|
|
<script>
|
|
|
import {
|
|
|
saveAndEdit,
|
|
|
- getSelectById,
|
|
|
- getInvoiceInfo
|
|
|
} from '@/api/order/groupBuyingMr';
|
|
|
import Editor from "@/components/Editor";
|
|
|
|
|
@@ -145,64 +143,25 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- /**
|
|
|
- * 打开弹框
|
|
|
- * @date 2023-11-22
|
|
|
- * @param {any} obj
|
|
|
- * @returns {any}
|
|
|
- */
|
|
|
+ // 打开弹框
|
|
|
openDialog(title, obj, type) {
|
|
|
this.isShow = true;
|
|
|
- // this.$set(this.form, 'handlerType', 2);
|
|
|
// this.reset();
|
|
|
this.$set(this.aduitForm, 'invoiceAmount', obj.realPrice || obj.invoiceAmount);
|
|
|
this.$set(this.aduitForm, 'id', type ? obj.orderId: obj.id);
|
|
|
this.$set(this.aduitForm, 'handlerType', 2);
|
|
|
this.$nextTick(() => {
|
|
|
if (this.$refs["aduitForm"]) {
|
|
|
- console.log('表单已初始化');
|
|
|
+ // console.log('表单已初始化');
|
|
|
+ this.$refs["aduitForm"].clearValidate();
|
|
|
}
|
|
|
});
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs["aduitForm"].clearValidate();
|
|
|
- // });
|
|
|
- // if (obj) {
|
|
|
- // // this.getSelectByIdApi(obj);
|
|
|
- // } else {
|
|
|
- // this.$nextTick(() => {
|
|
|
- // this.$refs["aduitForm"].clearValidate();
|
|
|
- // });
|
|
|
- // }
|
|
|
- },
|
|
|
- /** 获取开票信息 */
|
|
|
- getSelectByIdApi(row) {
|
|
|
- const id = row.id
|
|
|
- getInvoiceInfo(id).then(response => {
|
|
|
- const obj = response.data;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$set(this.aduitForm, 'id', obj.id);
|
|
|
- this.$set(this.aduitForm, 'handlerType', obj.handlerType);
|
|
|
- this.$set(this.aduitForm, 'name', obj.name);
|
|
|
- this.$set(this.aduitForm, 'invoiceLine', obj.invoiceLine)
|
|
|
- this.$set(this.aduitForm, 'email', obj.email);
|
|
|
- this.$set(this.aduitForm, 'invoiceAmount', obj.invoiceAmount);
|
|
|
- this.$set(this.aduitForm, 'creditCode', obj.creditCode);
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs["aduitForm"].clearValidate();
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
- });
|
|
|
},
|
|
|
// 保存
|
|
|
submitForm() {
|
|
|
- console.log(this.formRules,'55555');
|
|
|
- console.log(this.$refs["aduitForm"], '111'); // 检查表单引用
|
|
|
+ // console.log(this.$refs["aduitForm"], '111'); // 检查表单引用
|
|
|
this.$refs["aduitForm"].validate((valid) => {
|
|
|
- console.log('校验结果:', valid); // 检查校验结果
|
|
|
if (valid) {
|
|
|
- console.log(3333, '111333'); // 校验通过后的逻辑
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
let params = {
|
|
@@ -225,12 +184,12 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
} catch (error) {
|
|
|
- console.error(error);
|
|
|
+ // console.error(error);
|
|
|
} finally {
|
|
|
this.loading = false;
|
|
|
}
|
|
|
} else {
|
|
|
- console.error('表单校验失败');
|
|
|
+ // console.error('表单校验失败');
|
|
|
}
|
|
|
});
|
|
|
},
|