126 lines
3.2 KiB
Vue
126 lines
3.2 KiB
Vue
<!--
|
|
* @Author: zhp
|
|
* @Date: 2023-02-21 14:44:31
|
|
* @LastEditTime: 2023-04-14 16:29:53
|
|
* @LastEditors: zhp
|
|
* @Description:
|
|
-->
|
|
<template>
|
|
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
|
<el-form-item prop="supplierName" :label="$t('supplier.supplierName')">
|
|
<el-input v-model="dataForm.supplierName" :placeholder="$t('supplier.supplierName')" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</template>
|
|
|
|
<script>
|
|
import debounce from "lodash/debounce";
|
|
import basicAdd from "@/mixins/basic-add";
|
|
export default {
|
|
mixins: [basicAdd],
|
|
data() {
|
|
return {
|
|
// urlOptions: {
|
|
// submitURL: "/sys/params/",
|
|
// infoURL: "/sys/params",
|
|
// },
|
|
visible: false,
|
|
options: [{
|
|
value: '0',
|
|
label: '不可用'
|
|
},
|
|
{
|
|
value: '1',
|
|
label: '可用'
|
|
}],
|
|
dataForm: {
|
|
supplierName: null
|
|
},
|
|
};
|
|
},
|
|
computed: {
|
|
// dataRule() {
|
|
// return {
|
|
// paramCode: [
|
|
// {
|
|
// required: true,
|
|
// message: this.$t("validate.required"),
|
|
// trigger: "blur",
|
|
// },
|
|
// ],
|
|
// paramValue: [
|
|
// {
|
|
// required: true,
|
|
// message: this.$t("validate.required"),
|
|
// trigger: "blur",
|
|
// },
|
|
// ],
|
|
// };
|
|
// },
|
|
},
|
|
methods: {
|
|
// init(id) {
|
|
// this.dataForm.id = id || "";
|
|
// this.visible = true;
|
|
// this.$nextTick(() => {
|
|
// this.$refs["dataForm"].resetFields();
|
|
// if (this.dataForm.id) {
|
|
// this.getInfo();
|
|
// }
|
|
// });
|
|
// },
|
|
// 获取信息
|
|
// getInfo() {
|
|
// this.$http
|
|
// .get(`/sys/params/${this.dataForm.id}`)
|
|
// .then(({ data: res }) => {
|
|
// if (res.code !== 0) {
|
|
// return this.$message.error(res.msg);
|
|
// }
|
|
// this.dataForm = {
|
|
// ...this.dataForm,
|
|
// ...res.data,
|
|
// };
|
|
// })
|
|
// .catch(() => {});
|
|
// },
|
|
// 表单提交
|
|
handleConditionSearch() {
|
|
this.$emit("successSubmit", this.dataForm);
|
|
},
|
|
// dataFormSubmitHandle: debounce(
|
|
// function () {
|
|
// // console.log(1111);
|
|
// // this.visible = false;
|
|
// this.$emit("successSubmit", this.dataForm.key);
|
|
// // this.$refs["dataForm"].validate((valid) => {
|
|
// // if (!valid) {
|
|
// // return false;
|
|
// // }
|
|
// // this.$http[!this.dataForm.id ? "post" : "put"](
|
|
// // "/sys/params",
|
|
// // this.dataForm
|
|
// // )
|
|
// // .then(({ data: res }) => {
|
|
// // if (res.code !== 0) {
|
|
// // return this.$message.error(res.msg);
|
|
// // }
|
|
// // this.$message({
|
|
// // message: this.$t("prompt.success"),
|
|
// // type: "success",
|
|
// // duration: 500,
|
|
// // onClose: () => {
|
|
|
|
// // },
|
|
// // });
|
|
// // })
|
|
// // .catch(() => {});
|
|
// // });
|
|
// },
|
|
// 1000,
|
|
// { leading: true, trailing: false }
|
|
// ),
|
|
},
|
|
};
|
|
</script>
|