二手交易提交页面必填校验无效问题修复,地址自动回填
| | |
| | | //获取打金店、二手车交易、二手手机维修详情 |
| | | export const getLabelReportingDetail = (params) => { |
| | | return http.request({ |
| | | url: '/blade-taskLabelReportingEvent/taskLabelReportingEvent/detail', |
| | | url: '/blade-taskLabelReportingEvent/taskLabelReportingEvent/getDetail', |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | |
| | | getLabelReportingDetail, |
| | | setLabelReporting |
| | | } from "@/api/reporting/reporting"; |
| | | import { |
| | | getPlaceDetail |
| | | } from "@/api/place/place" |
| | | export default { |
| | | mixins: [uploadMixin], |
| | | data() { |
| | |
| | | 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: '请输入交易人手机号', |
| | |
| | | trigger: ['change', 'blur'] |
| | | } |
| | | ], |
| | | 'info.idCard': [{ |
| | | idCard: [{ |
| | | type: 'string', |
| | | required: false, |
| | | message: '请输入身份证号码', |
| | |
| | | } |
| | | ], |
| | | |
| | | '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: '请输入交易过程', |
| | |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | console.log(option); |
| | | console.log(option,99999); |
| | | const {houseCode} = option; |
| | | if (option.id) { |
| | | this.isEdit = true; |
| | | this.id = option.id; |
| | |
| | | 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 |