|
@@ -3,7 +3,7 @@ import { FormSchema } from '/@/components/Form/index';
|
|
|
import { adapt } from '/@/utils/adapt';
|
|
|
import { h } from 'vue';
|
|
|
import { Tag } from 'ant-design-vue';
|
|
|
-import CustomInput from './customCom/CustomInput.vue';
|
|
|
+// import CustomInput from './customCom/CustomInput.vue';
|
|
|
import CustomApiSelect from './customCom/CustomApiSelect.vue';
|
|
|
import CustomApiTypeSelect from './customCom/CustomApiTypeSelect.vue';
|
|
|
import YearPicker from './customCom/YearPicker.vue';
|
|
@@ -11,6 +11,7 @@ import moment from 'moment';
|
|
|
import { getYearFee } from '/@/api/sys/money';
|
|
|
import UploadFile from '/@/views/general/config/customComponents/UploadFile.vue';
|
|
|
import { getAccountList, getTypeList } from '/@/api/sys/money';
|
|
|
+import { getUserList } from '/@/api/sys/member';
|
|
|
|
|
|
const adaptWidth = adapt();
|
|
|
|
|
@@ -399,25 +400,36 @@ export const schemas: FormSchema[] = [
|
|
|
colProps: {
|
|
|
span: adaptWidth.elContainer,
|
|
|
},
|
|
|
+ // render: ({ model, field }) => {
|
|
|
+ // return h(CustomInput, {
|
|
|
+ // value: model.user,
|
|
|
+ // placeholder: '添加会员',
|
|
|
+ // onChange(value) {
|
|
|
+ // model[field] = value;
|
|
|
+ // if (model.user.id && model.year) {
|
|
|
+ // let year = 0;
|
|
|
+ // if (model.year.year) {
|
|
|
+ // year = model.year.year;
|
|
|
+ // } else {
|
|
|
+ // year = model.year;
|
|
|
+ // }
|
|
|
+ // getYearFee({ user_id: model.user.id, year }).then((res) => {
|
|
|
+ // if (res.money) {
|
|
|
+ // model.money = res.money;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+ // },
|
|
|
render: ({ model, field }) => {
|
|
|
- return h(CustomInput, {
|
|
|
+ return h(CustomApiSelect, {
|
|
|
+ placeholder: '相关会员',
|
|
|
+ api: getUserList,
|
|
|
value: model.user,
|
|
|
- placeholder: '添加会员',
|
|
|
+ // immediate: false,
|
|
|
onChange(value) {
|
|
|
model[field] = value;
|
|
|
- if (model.user.id && model.year) {
|
|
|
- let year = 0;
|
|
|
- if (model.year.year) {
|
|
|
- year = model.year.year;
|
|
|
- } else {
|
|
|
- year = model.year;
|
|
|
- }
|
|
|
- getYearFee({ user_id: model.user.id, year }).then((res) => {
|
|
|
- if (res.money) {
|
|
|
- model.money = res.money;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
},
|
|
|
});
|
|
|
},
|