123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351 |
- <template>
- <el-dialog
- :title="!dataForm.id ? '新增' : '修改'"
- :close-on-click-modal="false"
- :visible.sync="visible"
- >
- <el-form
- :model="dataForm"
- :rules="dataRule"
- ref="dataForm"
- @keyup.enter.native="dataFormSubmit()"
- label-width="150px"
- >
-
- <el-input v-model="dataForm.orderId" placeholder="订单号"></el-input>
- </el-form-item>-->
- <el-form-item label="参会人员" prop="attenders">
-
- <el-select
- style="width:220px"
- v-model="dataForm.attenders"
- filterable
- remote
- reserve-keyword
- placeholder="请输入关键词"
- :remote-method="remoteMethod"
- :loading="loading"
- >
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-input v-model="dataForm.feeId" placeholder="费用类型id"></el-input>
- </el-form-item>-->
- <el-form-item label="缴费时间" prop="payTime">
-
- <el-date-picker
- v-model="dataForm.payTime"
- type="datetime"
- placeholder="选择日期时间"
- value-format="yyyy-MM-dd HH:mm:ss"
- ></el-date-picker>
- </el-form-item>
- <el-form-item label="费用类型" prop="feeId">
- <el-select v-model="dataForm.feeId" placeholder="请选择">
- <el-option
- v-for="item in option"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="缴费方式" prop="payType">
-
-
- <el-option
- v-for="item in payTypeList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>-->
- <el-radio v-model="dataForm.payType" :label="1">线上缴费</el-radio>
- <el-radio v-model="dataForm.payType" :label="2">现场缴费</el-radio>
- </el-form-item>
- <el-form-item label="缴费项目" prop="payOption">
- <el-input v-model="dataForm.payOption" placeholder="缴费项目"></el-input>
- </el-form-item>
- <el-form-item label="金额" prop="money">
- <el-input v-model="dataForm.money" placeholder="金额"></el-input>
- </el-form-item>
- <el-form-item label="发票抬头" prop="taxTitle">
- <el-input v-model="dataForm.taxTitle" placeholder="发票抬头"></el-input>
- </el-form-item>
- <el-form-item label="纳税人税号" prop="taxNumber">
- <el-input v-model="dataForm.taxNumber" placeholder="纳税人税号"></el-input>
- </el-form-item>
- <el-form-item label="公司注册地址及电话" prop="addrPhone">
- <el-input v-model="dataForm.addrPhone" placeholder="电话"></el-input>
- </el-form-item>
- <el-form-item label="开户行及账号" prop="bankAddrAccount">
- <el-input v-model="dataForm.bankAddrAccount" placeholder="开户行及账号"></el-input>
- </el-form-item>
- <el-form-item label="邮寄地址" prop="taxAddress">
- <el-input v-model="dataForm.taxAddress" placeholder="邮寄地址"></el-input>
- </el-form-item>
- <el-form-item label="确认是否已缴费" prop="isPay">
-
- <el-radio v-model="dataForm.isPay" :label="1">是</el-radio>
- <el-radio v-model="dataForm.isPay" :label="0">否</el-radio>
- </el-form-item>
-
- <el-input v-model="dataForm.createTime" placeholder="创建时间"></el-input>
- </el-form-item>-->
-
- <el-input v-model="dataForm.isDel" placeholder="是否被删除 状态 0:正常 1:删除"></el-input>
- </el-form-item>-->
-
- <el-input v-model="dataForm.meetingId" placeholder="会议id"></el-input>
- </el-form-item>-->
-
- <el-input v-model="dataForm.taxType" placeholder="发票类型0普1专"></el-input>
- </el-form-item>-->
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="visible = false">取消</el-button>
- <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
- </span>
- </el-dialog>
- </template>
- <script>
- export default {
- data() {
- return {
- visible: false,
- dataForm: {
- id: 0,
- attenders: "",
- payTime: "",
- payType: "",
- payOption: "",
- feeId: "",
- money: "",
- isPay: "",
- taxType: "",
- taxTitle: "",
- taxNumber: "",
- addrPhone: "",
- bankAddrAccount: "",
- taxAddress: ""
- },
- dataRule: {
- orderId: [
- { required: true, message: "订单号不能为空", trigger: "blur" }
- ],
- attendersId: [
- { required: true, message: "参会人员id不能为空", trigger: "blur" }
- ],
- feeId: [
- { required: true, message: "费用类型id不能为空", trigger: "blur" }
- ],
- payTime: [
- { required: true, message: "缴费时间不能为空", trigger: "blur" }
- ],
- payType: [
- { required: true, message: "缴费方式不能为空", trigger: "blur" }
- ],
- payOption: [
- { required: true, message: "缴费项目不能为空", trigger: "blur" }
- ],
- money: [{ required: true, message: "金额不能为空", trigger: "blur" }],
- taxTitle: [
- { required: true, message: "发票抬头不能为空", trigger: "blur" }
- ],
- taxNumber: [
- { required: true, message: "纳税人税号不能为空", trigger: "blur" }
- ],
- addrPhone: [
- { required: true, message: "地址 电话不能为空", trigger: "blur" }
- ],
- bankAddrAccount: [
- { required: true, message: "开户行及账号不能为空", trigger: "blur" }
- ],
- taxAddress: [
- { required: true, message: "邮寄地址不能为空", trigger: "blur" }
- ],
- isPay: [
- { required: true, message: "确认是否已缴费不能为空", trigger: "blur" }
- ],
- createTime: [
- { required: true, message: "创建时间不能为空", trigger: "blur" }
- ],
- meetingId: [
- { required: true, message: "会议id不能为空", trigger: "blur" }
- ],
- taxType: [
- { required: true, message: "发票类型0普1专不能为空", trigger: "blur" }
- ]
- },
- loading: false,
- meetingList: [],
- list: [],
- options: [],
- payTypeList: [
- {
- value: "1",
- label: "线上缴费"
- },
- {
- value: "2",
- label: "现场缴费"
- }
- ],
- typesoffeeList: [],
- option: [],
- feeIdTypeList: [],
- option: [],
- page: 0,
- limit: 10,
- meetingId: this.$route.params.id
- };
- },
- created() {
- this.getPaymentByname();
- this.getTypesoffee();
- },
- methods: {
- init(id) {
- this.dataForm.id = id || 0;
- this.visible = true;
- this.$nextTick(() => {
- this.$refs["dataForm"].resetFields();
- if (this.dataForm.id) {
- this.$http({
- url: this.$http.adornUrl(`/admin/payment/info/${this.dataForm.id}`),
- method: "get",
- params: this.$http.adornParams()
- }).then(({ data }) => {
- window.console.log(data);
- if (data && data.code === 0) {
- this.dataForm.orderId = data.payment.orderId;
- this.dataForm.attenders = data.payment.attenders;
- this.dataForm.feeId = data.payment.feeId;
- this.dataForm.payTime = data.payment.payTime;
- this.dataForm.payType = data.payment.payType;
- this.dataForm.payOption = data.payment.payOption;
- this.dataForm.money = data.payment.money;
- this.dataForm.taxTitle = data.payment.taxTitle;
- this.dataForm.taxNumber = data.payment.taxNumber;
- this.dataForm.addrPhone = data.payment.addrPhone;
- this.dataForm.bankAddrAccount = data.payment.bankAddrAccount;
- this.dataForm.taxAddress = data.payment.taxAddress;
- this.dataForm.isCheck = data.payment.isCheck;
- this.dataForm.createTime = data.payment.createTime;
- this.dataForm.isPay = data.payment.isPay;
- this.dataForm.meetingId = data.payment.meetingId;
- this.dataForm.taxType = data.payment.taxType;
- }
- });
- }
- });
- },
-
- dataFormSubmit() {
- this.$refs["dataForm"].validate(valid => {
- if (valid) {
- this.$http({
- url: this.$http.adornUrl(
- `/admin/payment/${!this.dataForm.id ? "save" : "update"}`
- ),
- method: "post",
- data: this.$http.adornData({
- id: this.dataForm.id || undefined,
- attenders: this.dataForm.attenders,
- feeId: this.dataForm.feeId,
- payTime: this.dataForm.payTime,
- payType: this.dataForm.payType,
- payOption: this.dataForm.payOption,
- money: this.dataForm.money,
- taxTitle: this.dataForm.taxTitle,
- taxNumber: this.dataForm.taxNumber,
- addrPhone: this.dataForm.addrPhone,
- bankAddrAccount: this.dataForm.bankAddrAccount,
- taxAddress: this.dataForm.taxAddress,
- isPay: this.dataForm.isPay,
- createTime: this.dataForm.createTime,
- meetingId: this.dataForm.meetingId,
- taxType: this.dataForm.taxType
- })
- }).then(({ data }) => {
- if (data && data.code === 0) {
- this.$message({
- message: "操作成功",
- type: "success",
- duration: 1500,
- onClose: () => {
- this.visible = false;
- this.$emit("refreshDataList");
- }
- });
- } else {
- this.$message.error(data.msg);
- }
- });
- }
- });
- },
- getPaymentByname(name = "") {
- this.loading = true;
- this.$http({
- url: this.$http.adornUrl(`/admin/attenders/selectbyname`),
- method: "get",
- params: this.$http.adornParams({
- name: name,
- meetingId: this.$route.params.id
- })
- }).then(({ data }) => {
- if (data) {
- this.loading = false;
- this.meetingList = data.list;
- this.list = this.meetingList.map(item => {
- return { value: `${item.id}`, label: `${item.name}` };
- });
- }
- });
- },
- remoteMethod(query) {
- if (query !== "") {
- this.loading = true;
- setTimeout(() => {
- this.loading = false;
- this.options = this.list.filter(item => {
- return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
- });
- }, 300);
- } else {
- this.options = [];
- }
- },
- getTypesoffee() {
- this.$http({
- url: this.$http.adornUrl(
- `/admin/typesoffee/listbymid/${this.meetingId}`
- ),
- methods: "get",
- params: {}
- }).then(({ data }) => {
- if (data && data.code === 0) {
- this.typesoffeeList = data.list;
- this.option = this.typesoffeeList.map(item => {
- return {
- value: item.id,
- label: item.name
- };
- });
- }
- });
- }
- }
- };
- </script>
|