| | |
| | | orderProductTypeIds: [], |
| | | orderProductTypeList: [], |
| | | baseFormData: { |
| | | id: '', |
| | | memoExperience: '', |
| | | status: 0, |
| | | citysData: [], |
| | | cstmrType: '', |
| | | company: '', |
| | |
| | | text: '外销', |
| | | value: 2 |
| | | }], |
| | | id: 0, |
| | | citysData: [], |
| | | citysDataTemp: '' |
| | | citysDataTemp: '', |
| | | memoExperience: '', |
| | | status: 0 |
| | | } |
| | | }, |
| | | onReady() { |
| | |
| | | // 获取省市区 |
| | | this.citysData = test.citysData |
| | | this.getDetail() |
| | | }, |
| | | onLoad: function(option) { |
| | | let _this = this |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.emit('acceptDataFromOpenedPage', {data: 'data from test page'}); |
| | | eventChannel.emit('someEvent', {data: 'data from test page for someEvent'}); |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('saleManage', function(data) { |
| | | data = data.data |
| | | console.log(data); |
| | | _this.cstmrList = [{value: data.cstmrId$,id: data.cstmrId}] |
| | | _this.companyList = [{name: data.company$,id: data.company}] |
| | | _this.directorList = [{value: data.director$,id: data.director}] |
| | | _this.orderProductTypeList = [{value: data.orderProductTypeId$,id: data.orderProductTypeId}] |
| | | data.cstmrId = data.cstmrId$ |
| | | data.company = data.company$ |
| | | data.director = data.director$ |
| | | data.orderProductTypeId = data.orderProductTypeId$ |
| | | _this.citysDataTemp = data.pcd |
| | | _this.id = data.id |
| | | _this.memoExperience = data.memoExperience |
| | | _this.status = data.status |
| | | _this.baseFormData = data |
| | | }) |
| | | }, |
| | | methods: { |
| | | async getDetail() { |
| | |
| | | } |
| | | } |
| | | for (element of that.directorList) { |
| | | console.log(that.directorList); |
| | | console.log(that.baseFormData.director); |
| | | if (element.value == that.baseFormData.director) { |
| | | that.baseFormData.director = element.id |
| | | } |
| | |
| | | res.remarks = '' |
| | | } |
| | | res.pcd = this.citysDataTemp |
| | | res.id = this.id |
| | | res.memoExperience = this.memoExperience |
| | | res.status = this.status |
| | | uni.request({ |
| | | url: that.baseUrl + '/order/add/auth', |
| | | url: that.baseUrl + '/order/update/auth', |
| | | header: { |
| | | 'token': uni.getStorageSync('token'), |
| | | 'content-type': 'application/x-www-form-urlencoded', |
| | |
| | | success(result) { |
| | | var res = result.data |
| | | if (res.code === 200) { |
| | | uni.navigateBack() |
| | | uni.navigateBack({ |
| | | delta: 2 |
| | | }) |
| | | } else if (res.code === 403) { |
| | | uni.showToast({ |
| | | title: res.msg, |