| | |
| | | }).then(res => { |
| | | let response = res.data |
| | | if (response.code == 1) { |
| | | if (response.data.length == 0) { |
| | | this.$modal.msgError("未获取到指定承运合同数据,请检查【" + this.form.HContractTransportBillNo + "】对应的承运合同是否维护!!!"); |
| | | this.form.HMoney = 0 |
| | | return |
| | | } |
| | | if (response.data.length == 0) { |
| | | this.$modal.msgError("请检查【" + this.form.HContractTransportBillNo + "】对应的承运合同是否维护!!!"); |
| | | this.form.HMoney = 0 |
| | | return |
| | | } |
| | | this.form.HContractTransportEntryID = response.data[0].HEntryID |
| | | this.form.HCarrierID = response.data[0].HSupID |
| | | this.form.HCarrierName = response.data[0].供应商名称 |
| | |
| | | }, |
| | | checkHCarTypeNameList() { |
| | | if (this.HCarTypeNameList.length === 0) { |
| | | this.$message.warning('请先选择运输线路') |
| | | this.$message.warning('请先选择运输方式') |
| | | } |
| | | }, |
| | | transLineNameChange() { |
| | |
| | | if (val == 'line') { |
| | | this.transTypeList = [...new Set(response.data.map(item => item.运输类型))] |
| | | } else if (val == 'type') { |
| | | const carTypeMap = new Map() |
| | | response.data.forEach(item => { |
| | | const key = item.运输方式名称 |
| | | if (!carTypeMap.has(key)) { |
| | | carTypeMap.set(key, { value: item.运输方式名称, id: item.运输方式 }) |
| | | } |
| | | }) |
| | | this.HCarTypeNameList = Array.from(carTypeMap.values()) |
| | | } else if (val == 'car') { |
| | | const carTypeMap = new Map() |
| | | response.data.forEach(item => { |
| | | const key = item.运输方式名称 |
| | | if (!carTypeMap.has(key)) { |
| | | carTypeMap.set(key, { value: item.运输方式名称, id: item.运输方式 }) |
| | | } |
| | | }) |
| | | this.HCarTypeNameList = Array.from(carTypeMap.values()) |
| | | } else if (val == 'car') { |
| | | this.form.HDistance = response.data[0].距离 |
| | | this.form.HTransportTimes = response.data[0].运输时效 |
| | | this.form.HTransportTyep = response.data[0].运输类型 |