zhongrj
2024-03-21 542f2f5f4e8097bd9d436a52119feeeec63bdfaa
二手交易提交页面必填校验无效问题修复,地址自动回填
2 files modified
47 ■■■■ changed files
api/reporting/reporting.js 2 ●●● patch | view | raw | blame | history
subPackage/label/form.vue 45 ●●●● patch | view | raw | blame | history
api/reporting/reporting.js
@@ -106,7 +106,7 @@
//获取打金店、二手车交易、二手手机维修详情
export const getLabelReportingDetail = (params) => {
    return http.request({
        url: '/blade-taskLabelReportingEvent/taskLabelReportingEvent/detail',
        url: '/blade-taskLabelReportingEvent/taskLabelReportingEvent/getDetail',
        method: 'get',
        params: {
            ...params
subPackage/label/form.vue
@@ -96,6 +96,9 @@
        getLabelReportingDetail,
        setLabelReporting
    } from "@/api/reporting/reporting";
    import {
        getPlaceDetail
    } from "@/api/place/place"
    export default {
        mixins: [uploadMixin],
        data() {
@@ -116,22 +119,30 @@
                    reportType: ""
                },
                rules: {
                    'info.districtName': {
                    districtName: {
                        required: true,
                        message: '请输入场所名称',
                        trigger: ['blur', 'change']
                    },
                    'info.transactionObject': {
                    transactionObject: {
                        required: true,
                        message: '请输入物品名称',
                        trigger: ['blur', 'change']
                    },
                    'info.owner': {
                    owner: {
                        required: true,
                        message: '请输入交易人姓名',
                        trigger: ['blur', 'change']
                    },
                    'info.phoneNumber': [{
                    goodsNums:[
                        {
                                type: 'number',
                                required: true,
                                message: '请输入物品数量',
                                trigger: ['blur', 'change']
                            }
                    ],
                    phoneNumber: [{
                            type: 'number',
                            required: true,
                            message: '请输入交易人手机号',
@@ -145,7 +156,7 @@
                            trigger: ['change', 'blur']
                        }
                    ],
                    'info.idCard': [{
                    idCard: [{
                            type: 'string',
                            required: false,
                            message: '请输入身份证号码',
@@ -163,18 +174,18 @@
                        }
                    ],
                    'info.transactionMoney': {
                    transactionMoney: {
                        required: true,
                        message: '请输入交易金额',
                        trigger: ['blur', 'change']
                    },
                    'info.localtion': {
                    localtion: {
                        type: 'string',
                        required: true,
                        message: '请输入交易位置',
                        trigger: ['blur', 'change']
                    },
                    'info.transactionProcess': {
                    transactionProcess: {
                        type: 'string',
                        required: false,
                        message: '请输入交易过程',
@@ -190,7 +201,8 @@
            }
        },
        onLoad(option) {
            console.log(option);
            console.log(option,99999);
            const {houseCode} = option;
            if (option.id) {
                this.isEdit = true;
                this.id = option.id;
@@ -218,9 +230,22 @@
                this.$set(this.info, "userId", userInfo.user_id);
            }
            if(houseCode){
                // 获取地址
                this.getPlaceDetail(houseCode)
            }
        },
        methods: {
            getPlaceDetail(houseCode){
                getPlaceDetail({
                    houseCode: houseCode
                }).then(res => {
                    if (res.code == 200) {
                        let data = res.data;
                        this.info.localtion = data.location;
                    }
                })
            },
            getDetail(id) {
                getLabelReportingDetail({
                    taskId: id