|
@@ -1103,7 +1103,7 @@
|
|
|
<el-dialog :visible.sync="dialogVisible" width="80%">
|
|
|
<img width="100%" :src="dialogImageUrl" alt="" />
|
|
|
</el-dialog>
|
|
|
- <el-dialog :visible.sync="batchCarrierVisible" width="30%" center>
|
|
|
+ <el-dialog :visible.sync="batchCarrierVisible" width="55%" center>
|
|
|
<div class="batchCarrierClass">
|
|
|
<el-form :inline="true">
|
|
|
<span>批量授权承运商</span>
|
|
@@ -1139,13 +1139,79 @@
|
|
|
</el-autocomplete>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-button @click="batchCapacityVisible = false">取 消</el-button>
|
|
|
+ <el-button @click="batchCarrierVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="batchEditCapacity"
|
|
|
>确 定</el-button
|
|
|
>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
+ <div class="steelMapClass22">
|
|
|
+ <span>收货地址:</span>
|
|
|
+ <el-select
|
|
|
+ v-model="steelMap.addressProvince"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="onchangeProvince"
|
|
|
+ style="width:120px"
|
|
|
+ :disabled="notRoutList.includes('province')"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in provinceList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.addressProvince"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ v-model="steelMap.addressDistrict"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="onchangeCity"
|
|
|
+ style="width:120px"
|
|
|
+ :disabled="notRoutList.includes('city')"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in cityList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.addressDistrict"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ v-model="steelMap.addressTown"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="onchangeCounty"
|
|
|
+ style="width:120px"
|
|
|
+ :disabled="notRoutList.includes('country')"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in countyList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.addressTown"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-autocomplete
|
|
|
+ class="inline-input"
|
|
|
+ v-model="steelMap.place"
|
|
|
+ :fetch-suggestions="querySearch1"
|
|
|
+ placeholder="请输入具体收货地址"
|
|
|
+ :trigger-on-focus="false"
|
|
|
+ @select="handleSelect1"
|
|
|
+ style="width:250px"
|
|
|
+ :disabled="notRoutList.includes('place')"
|
|
|
+ >
|
|
|
+ </el-autocomplete>
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ circle
|
|
|
+ @click="batchUpdateCarAddress"
|
|
|
+ v-if="!notRoutList.includes('addressClick')"
|
|
|
+ >提交</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
<div class="dialog">
|
|
|
<el-dialog
|
|
@@ -1864,6 +1930,8 @@ export default {
|
|
|
this.scrollLeft = e.target.scrollLeft
|
|
|
this.scrollUpdateSelectFlag = 1
|
|
|
})
|
|
|
+ //基础数据查询
|
|
|
+ this.getAllProvince();
|
|
|
},
|
|
|
activated() {
|
|
|
this.maxHeight =
|
|
@@ -1876,7 +1944,7 @@ export default {
|
|
|
this.capacityId = null
|
|
|
this.batchCapacityList = []
|
|
|
console.log(this.$refs.tableRef.selection)
|
|
|
- //按照saleOrderMaterialId查询物资数量
|
|
|
+ //按照saleOrderMaterialId查询物资数量size,用于确定派车的线路ID
|
|
|
this.$refs.tableRef.selection.forEach(item1 => {
|
|
|
item1.size = this.visibleList.filter(item2 => {
|
|
|
return item1.saleOrderMaterialId == item2.saleOrderMaterialId
|
|
@@ -1884,21 +1952,22 @@ export default {
|
|
|
})
|
|
|
this.batchCapacityList = this.$refs.tableRef.selection
|
|
|
console.log(this.batchCapacityList)
|
|
|
- if (this.batchCapacityList.length > 0) {
|
|
|
- this.batchCapacityVisible = true
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '请选择要批量更改车牌号的订单',
|
|
|
- offset: '250',
|
|
|
- duration: '2500'
|
|
|
- })
|
|
|
- }
|
|
|
+ // if (this.batchCapacityList.length > 0) {
|
|
|
+ // this.batchCapacityVisible = true
|
|
|
+ // } else {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'warning',
|
|
|
+ // message: '请选择要批量更改车牌号的订单',
|
|
|
+ // offset: '250',
|
|
|
+ // duration: '2500'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
},
|
|
|
batchCapacitySelect(selection) {
|
|
|
this.capacityNo = selection.capacityNumber
|
|
|
this.capacityId = selection.capacityId
|
|
|
},
|
|
|
+ //批量修改车牌号
|
|
|
batchEditCapacity() {
|
|
|
if (this.capacityId && this.capacityNo) {
|
|
|
if (
|
|
@@ -1912,12 +1981,17 @@ export default {
|
|
|
this.$message.error('请输入正确格式的车牌号!')
|
|
|
return
|
|
|
}
|
|
|
+ console.log("this.batchCapacityList",this.batchCapacityList);
|
|
|
this.batchCapacityList.forEach(row => {
|
|
|
row.capacityId = this.capacityId
|
|
|
row.capacityNumber = this.capacityNo
|
|
|
//是否校验GPS
|
|
|
row.isCheckGPS = this.isCheckGPS
|
|
|
row.userId = getCookie('userId')
|
|
|
+ if (row.carrierIds == 0) {
|
|
|
+ this.$message.error('请先授权承运商!')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (row.capacityIds != 0) {
|
|
|
this.axios
|
|
|
.post('/api/v1/ams/updateCapacityNumberInFactory', row)
|
|
@@ -1929,10 +2003,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
- if (row.carrierIds == 0) {
|
|
|
- this.$message.error('请先授权承运商!')
|
|
|
- return
|
|
|
- }
|
|
|
row.lineId = this.lineSpelling[row.size]
|
|
|
let arr = []
|
|
|
arr.push(row)
|
|
@@ -2321,6 +2391,10 @@ export default {
|
|
|
batchCarrier() {
|
|
|
if (this.batchCarrierList.length > 0) {
|
|
|
this.batchCarrierVisible = true
|
|
|
+ this.showBatchCapacity();
|
|
|
+ this.onchangeProvince()
|
|
|
+ this.onchangeCity()
|
|
|
+ this.addressId = this.steelMap.shipperAddressId
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: 'warning',
|
|
@@ -3551,6 +3625,37 @@ export default {
|
|
|
loading.close()
|
|
|
})
|
|
|
},
|
|
|
+ //批量修改收货地址
|
|
|
+ batchUpdateCarAddress() {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '正在修改收货地址',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
+ })
|
|
|
+ this.batchCapacityList.forEach(row => {
|
|
|
+ let map = row
|
|
|
+ map.place = this.steelMap.place
|
|
|
+ map.isCloseEas = Number(1)
|
|
|
+ map.isNewCar = Number(1)
|
|
|
+ map.shipperAddressId = this.addressId
|
|
|
+ this.axios
|
|
|
+ .post('/api/v1/ams/updateCarAddress', map)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ this.$message.success('修改收货地址成功!')
|
|
|
+ } else {
|
|
|
+ this.$message.error('修改失败,请联系管理员!')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error('修改失败,请联系管理员!')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.getSteelReport()
|
|
|
+ loading.close()
|
|
|
+ this.batchCarrierVisible=false;
|
|
|
+ },
|
|
|
//将序号确定下来
|
|
|
// getNodeNum(data) {
|
|
|
// for (var i = 0; i < data.length; i++) {
|