|
@@ -130,7 +130,11 @@
|
|
|
<el-input v-model="planForm.shipperName" disabled></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="收货单位" prop="receiveId">
|
|
|
- <el-select v-model="planForm.receiveId" style="width:auto">
|
|
|
+ <el-select
|
|
|
+ v-model="planForm.receiveId"
|
|
|
+ style="width:auto"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in consigneeInfo"
|
|
|
:label="item.label"
|
|
@@ -145,6 +149,7 @@
|
|
|
v-model="planForm.saleRemark"
|
|
|
style="width:auto"
|
|
|
:disabled="planForm.receiveId == null ? true : false"
|
|
|
+ clearable
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in saleAreaInfo"
|
|
@@ -156,7 +161,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="业务员">
|
|
|
- <el-select v-model="planForm.saleMan" style="width:auto">
|
|
|
+ <el-select v-model="planForm.saleMan" style="width:auto" clearable>
|
|
|
<el-option
|
|
|
v-for="item in saleMans"
|
|
|
:label="item.label"
|
|
@@ -167,7 +172,11 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="是否自提">
|
|
|
- <el-select v-model="planForm.isSelfMention" style="width:auto">
|
|
|
+ <el-select
|
|
|
+ v-model="planForm.isSelfMention"
|
|
|
+ style="width:auto"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
<el-option label="是" value="是" :key="1"> </el-option>
|
|
|
<el-option label="否" value="否" :key="0"> </el-option>
|
|
|
</el-select>
|
|
@@ -193,6 +202,9 @@
|
|
|
filterable
|
|
|
placeholder="请选择"
|
|
|
@change="onchangeProvince"
|
|
|
+ :disabled="planForm.saleRemark == null"
|
|
|
+ no-data-text="无匹配项,请维护片区与直发城市对应关系"
|
|
|
+ no-match-text="请维护片区与该城市对应关系"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in provinceList"
|
|
@@ -209,6 +221,8 @@
|
|
|
placeholder="请选择"
|
|
|
@change="onchangeCity"
|
|
|
:disabled="planForm.province == null ? true : false"
|
|
|
+ no-data-text="无匹配项,请维护片区与直发城市对应关系"
|
|
|
+ no-match-text="请维护片区与该城市对应关系"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in cityList"
|
|
@@ -225,6 +239,8 @@
|
|
|
placeholder="请选择"
|
|
|
@change="onchangeCounty"
|
|
|
:disabled="planForm.city == null ? true : false"
|
|
|
+ no-data-text="请维护片区与直发城市对应关系"
|
|
|
+ no-match-text="请维护片区与该城市对应关系"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in countyList"
|
|
@@ -672,6 +688,10 @@ export default {
|
|
|
label: '件数',
|
|
|
slot: true
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: 'inventoryNumber',
|
|
|
+ label: '库存件数'
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'singleWeight',
|
|
|
label: '单重'
|
|
@@ -725,6 +745,10 @@ export default {
|
|
|
width: '60px',
|
|
|
slot: true
|
|
|
},
|
|
|
+ {
|
|
|
+ prop: 'inventoryNumber',
|
|
|
+ label: '库存件数'
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'isPound',
|
|
|
label: '是否磅重销售',
|
|
@@ -775,7 +799,10 @@ export default {
|
|
|
orgCode: '',
|
|
|
showSummaryList: ['materialNumber', 'materialWeight'],
|
|
|
userId: '',
|
|
|
- userName: ''
|
|
|
+ userName: '',
|
|
|
+ directlyCityList: [],
|
|
|
+ directlyProvinceList: [],
|
|
|
+ directlyTownList: []
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -790,6 +817,7 @@ export default {
|
|
|
saleRemark(val) {
|
|
|
console.log(val, 'val')
|
|
|
this.getOyeConsigneeId({ saleArea: val })
|
|
|
+ this.getDirectlyCity(val)
|
|
|
this.updateAddress(val)
|
|
|
},
|
|
|
receiveCompanyId(val) {
|
|
@@ -819,6 +847,15 @@ export default {
|
|
|
this.materialList1 = []
|
|
|
this.selectionList = []
|
|
|
}
|
|
|
+ },
|
|
|
+ directlyProvinceListLength(val) {
|
|
|
+ this.getAllProvince()
|
|
|
+ },
|
|
|
+ directlyCityListLength(val) {
|
|
|
+ this.onchangeProvince()
|
|
|
+ },
|
|
|
+ directlyTownListLength(val) {
|
|
|
+ this.onchangeCity()
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -836,10 +873,52 @@ export default {
|
|
|
},
|
|
|
county() {
|
|
|
return this.planForm.county
|
|
|
+ },
|
|
|
+ directlyProvinceListLength() {
|
|
|
+ return this.directlyProvinceList.length
|
|
|
+ },
|
|
|
+ directlyCityListLength() {
|
|
|
+ return this.directlyCityList.length
|
|
|
+ },
|
|
|
+ directlyTownListLength() {
|
|
|
+ return this.directlyTownList.length
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- updateAddress(val) {},
|
|
|
+ getDirectlyCity(val) {
|
|
|
+ if (val == '' || val == null) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.axios.post('/api/v1/rms/getDirectlySentCity?con' + val).then(res => {
|
|
|
+ console.log(res, 'res')
|
|
|
+ this.directlyProvinceList = res.data.data
|
|
|
+ .map(item => {
|
|
|
+ return item.addressProvince
|
|
|
+ })
|
|
|
+ .filter(item => {
|
|
|
+ return item != '' && item != null && item != undefined
|
|
|
+ })
|
|
|
+ this.directlyCityList = res.data.data
|
|
|
+ .map(item => {
|
|
|
+ return item.addressDistrict
|
|
|
+ })
|
|
|
+ .filter(item => {
|
|
|
+ return item != '' && item != null && item != undefined
|
|
|
+ })
|
|
|
+ this.directlyTownList = res.data.data
|
|
|
+ .map(item => {
|
|
|
+ return item.addressTown
|
|
|
+ })
|
|
|
+ .filter(item => {
|
|
|
+ return item != '' && item != null && item != undefined
|
|
|
+ })
|
|
|
+ console.log(
|
|
|
+ this.directlyProvinceList,
|
|
|
+ this.directlyCityList,
|
|
|
+ this.directlyTownList
|
|
|
+ )
|
|
|
+ })
|
|
|
+ },
|
|
|
getInfo() {
|
|
|
this.loginName = getCookie('loginName')
|
|
|
this.orgCode = getCookie('orgCode')
|
|
@@ -943,13 +1022,25 @@ export default {
|
|
|
getAllsaleMan() {
|
|
|
this.axios.get('/api/v1/uc/getSalerList').then(res => {
|
|
|
this.saleMans = res.data.data
|
|
|
+ if (this.orgCode == 'xiaoshouyewuyuan') {
|
|
|
+ this.saleMans = this.saleMans.filter(item => {
|
|
|
+ return item.label == this.loginName
|
|
|
+ })
|
|
|
+ if (this.saleMans.length == 1) {
|
|
|
+ this.planForm.saleMan = this.saleMans[0].value
|
|
|
+ }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
//获取所有省数据
|
|
|
getAllProvince() {
|
|
|
- this.axios.post('/api/v1/uc/getAllProvince').then(res => {
|
|
|
- this.provinceList = res.data.data
|
|
|
- })
|
|
|
+ this.axios
|
|
|
+ .post('/api/v1/uc/getAllProvince', {
|
|
|
+ directlyProvinceList: this.directlyProvinceList
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.provinceList = res.data.data
|
|
|
+ })
|
|
|
},
|
|
|
//省改变
|
|
|
onchangeProvince(val) {
|
|
@@ -958,7 +1049,10 @@ export default {
|
|
|
'/api/v1/uc/getDistrictByProvince?addressProvince=' +
|
|
|
val +
|
|
|
'&i=' +
|
|
|
- new Date()
|
|
|
+ new Date(),
|
|
|
+ {
|
|
|
+ directlyCityList: this.directlyCityList
|
|
|
+ }
|
|
|
)
|
|
|
.then(res => {
|
|
|
this.cityList = res.data.data
|
|
@@ -971,11 +1065,13 @@ export default {
|
|
|
'/api/v1/uc/getTownByDistrict?addressDistrict=' +
|
|
|
val +
|
|
|
'&i=' +
|
|
|
- new Date()
|
|
|
+ new Date(),
|
|
|
+ {
|
|
|
+ directlyTownList: this.directlyTownList
|
|
|
+ }
|
|
|
)
|
|
|
.then(res => {
|
|
|
this.countyList = res.data.data
|
|
|
- this.remarks = this.remarksPro + `,直发${this.city}`
|
|
|
})
|
|
|
},
|
|
|
//县(区)改变
|
|
@@ -1047,9 +1143,11 @@ export default {
|
|
|
map = JSON.parse(JSON.stringify(e))
|
|
|
map.isPound = getisPound
|
|
|
map.meterNumber = e.meter
|
|
|
+ map.inventoryNumber = e.materialNumber
|
|
|
map.Specification = `${e.materialSpe}(${e.materialModel})`
|
|
|
map.orderPlanWeight = null
|
|
|
map.carNumber = null
|
|
|
+
|
|
|
this.materialList.push(map)
|
|
|
})
|
|
|
console.log(this.materialList, 'materialList')
|
|
@@ -1154,6 +1252,7 @@ export default {
|
|
|
},
|
|
|
addMaterialToSaleOrderSingle() {
|
|
|
this.materialList.forEach(e => {
|
|
|
+ console.log(e, 'e')
|
|
|
var addmap = {
|
|
|
cxh: this.maxCxh,
|
|
|
materialName: e.materialName,
|
|
@@ -1163,6 +1262,7 @@ export default {
|
|
|
meterNumber: e.meterNumber,
|
|
|
isPound: e.isPound,
|
|
|
saleShipperAddressId: this.planForm.shipperAddressId,
|
|
|
+ inventoryNumber: e.inventoryNumber,
|
|
|
inboundWarehouse: e.inboundWarehouse,
|
|
|
inventoryId: e.inventoryId,
|
|
|
singleWeight: e.singleWeight,
|
|
@@ -1276,7 +1376,7 @@ export default {
|
|
|
inboundWarehouse: e.inboundWarehouse,
|
|
|
singleWeight: e.singleWeight,
|
|
|
inventoryId: e.inventoryId,
|
|
|
-
|
|
|
+ inventoryNumber: e.inventoryNumber,
|
|
|
place: this.planForm.place,
|
|
|
saleShipperAddressName:
|
|
|
this.planForm.province +
|
|
@@ -1313,7 +1413,7 @@ export default {
|
|
|
inboundWarehouse: e.inboundWarehouse,
|
|
|
singleWeight: e.singleWeight,
|
|
|
inventoryId: e.inventoryId,
|
|
|
-
|
|
|
+ inventoryNumber: e.inventoryNumber,
|
|
|
place: this.planForm.place,
|
|
|
saleShipperAddressName:
|
|
|
this.planForm.province +
|
|
@@ -1426,6 +1526,7 @@ export default {
|
|
|
map.deleted = 0
|
|
|
map.orderPlanWeight = item.materialNumber
|
|
|
map.inventoryId = item.inventoryId
|
|
|
+ map.userName = getCookie('loginName')
|
|
|
return map
|
|
|
})
|
|
|
this.$confirm('确认审核选中的转运计划', '提示', {
|
|
@@ -1457,6 +1558,8 @@ export default {
|
|
|
console.log(this.approvingList, 'arr')
|
|
|
let arr = this.approvingList.map(item => {
|
|
|
let map = {}
|
|
|
+ map.userName = getCookie('loginName')
|
|
|
+
|
|
|
map.orderStatus = this.activeName == 'first' ? 0 : 4
|
|
|
map.saleOrderId = item.saleOrderId
|
|
|
map.deleted = 1
|
|
@@ -1496,6 +1599,8 @@ export default {
|
|
|
map.deleted = 0
|
|
|
map.orderPlanWeight = item.materialNumber
|
|
|
map.inventoryId = item.inventoryId
|
|
|
+ map.userName = getCookie('loginName')
|
|
|
+
|
|
|
return map
|
|
|
})
|
|
|
this.$confirm('确认提交选中的转运计划', '提示', {
|