|
|
@@ -0,0 +1,123 @@
|
|
|
+<template>
|
|
|
+ <el-dialog title="维护年费费用" :visible.sync="show" center width="600px">
|
|
|
+ <el-form
|
|
|
+ hide-required-asterisk
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ ref="form"
|
|
|
+ label-width="140px"
|
|
|
+ style="padding-right: 130px"
|
|
|
+ >
|
|
|
+ <el-form-item prop="annualFee" label="金额">
|
|
|
+ <el-input-number type="number" v-model="form.annualFee"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="feePaymentPeriod" label="支付期限">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="form.feePaymentPeriod"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="bill" label="账单">
|
|
|
+ <el-input v-model="form.bill"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="账单图片" prop="attachment1">
|
|
|
+ <attachment-upload
|
|
|
+ v-model="form.attachment1"
|
|
|
+ :fileSize.sync="form.attachment1.size"
|
|
|
+ ></attachment-upload>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button style="width: 150px" size="normal" type="primary" @click="onSubmit">提交</el-button>
|
|
|
+ <el-button style="width: 120px" size="normal" @click="show = false">取消</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import logoPatent from '@/mixins/logoPatent';
|
|
|
+export default {
|
|
|
+ mixins: [logoPatent],
|
|
|
+ props: {
|
|
|
+ info: {}
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ form: {
|
|
|
+ attachment1: { attachmentName: '账单图片', fileName: '', url: '', remark: '', size: '' }
|
|
|
+ },
|
|
|
+ show: false,
|
|
|
+ rules: {
|
|
|
+ attachment1: {
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ if (!value.url) {
|
|
|
+ callback(new Error('请上传账单图片'));
|
|
|
+ } else {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ trigger: 'change'
|
|
|
+ },
|
|
|
+ annualFee: { required: true, message: '请输入金额', trigger: 'change' },
|
|
|
+ feePaymentPeriod: { required: true, message: '请选择支付期限', trigger: 'blur' },
|
|
|
+ bill: { required: true, message: '请输入账单', trigger: 'change' }
|
|
|
+ },
|
|
|
+ supplierPartnerIdOptions: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.$http
|
|
|
+ .post('/partner/all', { size: 1000, query: { del: false, type: 'SUPPLIER' } }, { body: 'json' })
|
|
|
+ .then(res => {
|
|
|
+ if (res.content.length > 0) {
|
|
|
+ this.supplierPartnerIdOptions = res.content.map(item => {
|
|
|
+ return {
|
|
|
+ label: item.name,
|
|
|
+ value: item.id
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onSubmit() {
|
|
|
+ this.$refs.form.validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.submit();
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ let info = { ...this.info };
|
|
|
+ info.annualFee = this.form.annualFee;
|
|
|
+ info.feePaymentPeriod = this.form.feePaymentPeriod;
|
|
|
+ info.bill = this.form.bill;
|
|
|
+ this.$emit('uploadAttement', this.form.attachment1);
|
|
|
+
|
|
|
+ info.workflow = 'COMPLETED';
|
|
|
+
|
|
|
+ this.$emit('submit', info);
|
|
|
+ this.show = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.el-select {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+.el-date-editor.el-input {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+</style>
|