新版交易所前段管理后台
1
PC-20250623MANY\Administrator
2025-07-06 0363875eb333c67529c8b27221a6da45d1a50bfa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<template>
  <!-- 发货信息,用于导出代发货订单的excel交给快递公司 -->
  <el-dialog :modal="false"
             title="请输入发货信息"
             :close-on-click-modal="false"
             :visible.sync="visible"
             width="38%">
    <el-form :model="dataForm"
             :rules="dataRule"
             ref="dataForm"
             @keyup.enter.native="dataFormSubmit()"
             label-width="120px">
      <el-form-item label="发件人姓名"
                    prop="consignmentName">
        <el-input v-model="dataForm.consignmentName"
                  controls-position="right"
                  label="发件人姓名"></el-input>
      </el-form-item>
      <el-form-item label="发货人手机号"
                    prop="consignmentMobile">
        <el-input v-model="dataForm.consignmentMobile"
                  controls-position="right"
                  label="发货人手机号"></el-input>
      </el-form-item>
      <el-form-item label="发货地址"
                    prop="consignmentAddr">
        <el-input v-model="dataForm.consignmentAddr"
                  controls-position="right"
                  label="发货地址"></el-input>
      </el-form-item>
    </el-form>
    <span slot="footer"
          class="dialog-footer">
      <el-button size="small" @click="visible = false">取消</el-button>
      <el-button type="primary" size = "small"
                 @click="dataFormSubmit()">确定</el-button>
    </span>
  </el-dialog>
</template>
<script>
export default {
  data () {
    return {
      visible: false,
      dataForm: {
        consignmentName: '',
        consignmentMobile: '',
        consignmentAddr: ''
      },
      dataRule: {
        consignmentName: [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        consignmentMobile: [
          { required: true, message: '不能为空', trigger: 'blur' }
        ],
        consignmentAddr: [
          { required: true, message: '不能为空', trigger: 'blur' }
        ]
      }
    }
  },
  methods: {
    init (orderNumber, dvyId, dvyFlowId) {
      this.visible = true
      this.$nextTick(() => {
        this.$refs['dataForm'].resetFields()
      })
    },
    // 表单提交
    dataFormSubmit () {
      this.$refs['dataForm'].validate((valid) => {
        if (valid) {
          this.visible = false
          this.$emit('inputCallback', this.dataForm)
        }
      })
    }
  }
}
</script>