@@ -158,7 +229,48 @@
findgoods: "/sys/user/findgoods"
},
-
+ labelCol: { span: 3 },
+ wrapperCol: { span: 21 },
+ other: '',
+ form: {
+ name: '',
+ region: undefined,
+ date1: undefined,
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+ },
+ form1: {
+ name: '',
+ region: undefined,
+ date1: undefined,
+ delivery: false,
+ type: [],
+ resource: '',
+ desc: '',
+ },
+ rules: {
+ name: [
+ { required: true, message: 'Please input Activity name', trigger: 'blur' },
+ { min: 3, max: 5, message: 'Length should be 3 to 5', trigger: 'blur' },
+ ],
+ region: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
+ date1: [{ required: true, message: 'Please pick a date', trigger: 'change' }],
+ type: [
+ {
+ type: 'array',
+ required: true,
+ message: 'Please select at least one activity type',
+ trigger: 'change',
+ },
+ ],
+ resource: [
+ { required: true, message: 'Please select activity resource', trigger: 'change' },
+ ],
+ desc: [{ required: true, message: 'Please input activity form', trigger: 'blur' }],
+ },
+ visible1: false,
};
},
@@ -175,6 +287,29 @@
}
},
methods: {
+ handleCancel(e) {
+ this.visible1 = false;
+ },
+ show() {
+ this.visible1 = true;
+ },
+ handleOk(e) {
+ console.log(e);
+ this.visible1 = false;
+ },
+ onSubmit() {
+ this.$refs.ruleForm.validate(valid => {
+ if (valid) {
+ alert('submit!');
+ } else {
+ console.log('error submit!!');
+ return false;
+ }
+ });
+ },
+ resetForm() {
+ this.$refs.ruleForm.resetFields();
+ },
getallgoods(){
getAction(this.url.findgoods).then((res) => {
if(res.success) {
@@ -258,6 +393,24 @@