Browse Source

配送计划库管、备货区、班组调整

dev-warehouse
kilo 2 years ago
parent
commit
2479873ae4
  1. 15
      src/api/basicdata/basicdataGoodsArea.js
  2. 17
      src/api/basicdata/basicdataTeamGroup.js
  3. 13
      src/api/distribution/distributionDeliveryList.js
  4. 5
      src/views/distribution/reservation/reservationFrom.vue
  5. 175
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  6. 5
      src/views/distribution/turndelivery/deliveryInfo.vue

15
src/api/basicdata/basicdataGoodsArea.js

@ -100,6 +100,21 @@ export const getGoodsAreaList = () => {
})
}
/**
* 查询当前登录人所能操作的备货区
* @param params
* @returns {AxiosPromise}
*/
export const stockUpInfo = ( params) => {
return request({
url: '/api/logpm-basicdata/goodsArea/stockUpInfo',
method: 'get',
params: {
params,
}
})
}

17
src/api/basicdata/basicdataTeamGroup.js

@ -60,3 +60,20 @@ export const update = (row) => {
})
}
/**
* 查询当前操作人能够操作的班组信息
* @param current
* @param size
* @param params
* @returns {AxiosPromise}
*/
export const getListTeamInfo = (params) => {
return request({
url: '/api/logpm-basicdata/basicdataTeamGroup/listTeamInfo',
method: 'get',
params: {
params,
}
})
}

13
src/api/distribution/distributionDeliveryList.js

@ -137,5 +137,18 @@ export const getDeliveryList = (id) => {
})
}
/**
* 修改配送计划
* @param data
* @returns {AxiosPromise}
*/
export const updateDeliveryList = (data) => {
return request({
url: '/api/logpm-distribution/deliveryList/updateDeliveryList',
method: 'put',
data: data
})
}

5
src/views/distribution/reservation/reservationFrom.vue

@ -154,8 +154,9 @@
<el-button type="primary" link icon="el-icon-view"
@click="viewStockArticlePackage(row)">查看包件
</el-button>
<el-button type="primary" link icon="el-icon-delete" @click="addvalueServe(row)">增值服务
</el-button>
<!-- 2023 07 25 取消增值服务 -->
<!-- <el-button type="primary" link icon="el-icon-delete" @click="addvalueServe(row)">增值服务-->
<!-- </el-button>-->
<el-button type="primary" link icon="el-icon-edit" @click="removeStockArticle(row)">移除
</el-button>
</template>

175
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -180,7 +180,7 @@
v-for="item in tripartiteSourceData"
:key="item.dictKey"
:label="item.dictValue"
:value="item.dictValue"
:value="item.dictKey"
>
</el-option>
</el-select>
@ -193,7 +193,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="司机电话:" prop="goodsShelfId">
<el-input v-model="form.deiverPhone" placeholder="请输入本次费用"></el-input>
<el-input v-model="form.driverPhone" placeholder="请输入司机电话"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
@ -335,7 +335,7 @@
<!-- </el-radio-group>-->
<el-form-item label="配送类型:" prop="goodsAreaId">
<el-radio-group v-model="form.deliveryType">
<el-radio :label="'2'" :value="'2'">商配&emsp; </el-radio>
<el-radio :label="'1'" :value="'1'">商配&emsp; </el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -385,17 +385,27 @@
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="10">
<el-form-item label="备注:" prop="remarks">
<el-input type="textarea" :rows="1" placeholder="请输入内容" v-model="form.remarks">
</el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-col :span="8">
<el-form-item label="其他费用:" prop="collectFee" label-width="100px">
<el-input v-model="form.otherFee" placeholder="请输入其他费用" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="配车时间:" prop="collectFee" label-width="100px">
<el-date-picker v-model="form.taskTime"
type="datetime"
placeholder="请选择配车时间"
value-format="YYYY-MM-DD HH:mm:ss"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
@ -614,6 +624,7 @@
></el-table-column>
<template v-for="(item, index) in option.columnStockLists">
<el-table-column
v-if="item.hide !== true"
:prop="item.prop"
:label="item.label"
@ -701,6 +712,7 @@
v-if="option.selection"
width="55"
align="center"
></el-table-column>
<template v-for="(item, index) in option.columnDriverInfo">
<!-- table字段 -->
@ -710,6 +722,8 @@
:label="item.label"
:width="item.width"
:key="index"
style="height: 50px"
>
</el-table-column>
</template>
@ -733,6 +747,7 @@
:label="item.label"
:width="item.width"
:key="index"
style="height: 50px"
>
</el-table-column>
</template>
@ -762,18 +777,18 @@
<script>
import { getDictionaryBiz } from '@/api/system/dict';
import option from '@/option/distribution/distributionReservation';
import { getListTeam } from '@/api/basicdata/basicdataTeamGroup';
import { getListTeamInfo } from '@/api/basicdata/basicdataTeamGroup';
import { deliveryBusinessTask } from '@/api/distribution/distributionReservation';
import { getListUser } from '@/api/distribution/distributionStockup';
import { getPostList } from '@/api/system/post';
import { getListOwn } from '@/api/system/user';
import { getPackageList } from '@/api/distribution/distributionParcelList';
import { stockUp } from '@/api/basicdata/basicdataGoodsArea';
import { stockUpInfo } from '@/api/basicdata/basicdataGoodsArea';
import { getVehicleList } from '@/api/basicdata/basicdataVehicle';
import { getDriverList } from '@/api/basicdata/basicdataDriverArtery';
import { selectStockArticleList } from '@/api/distribution/distributionStockArticle';
import { getInventoryList } from '@/api/distribution/distributionStockList';
import { getDeliveryList } from '@/api/distribution/distributionDeliveryList';
import { getDeliveryList ,updateDeliveryList} from '@/api/distribution/distributionDeliveryList';
export default {
data() {
@ -871,25 +886,6 @@
tripartiteSourceData:[],
deliveryListId:'',
isDisable:false,
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
value1: [],
};
},
created() {
@ -956,15 +952,15 @@
},
//
async getTeam() {
let params = {
department: this.deptId
};
getListTeam(this.page.currentPage, this.page.pageSize, Object.assign(params, this.query)).then(res => {
let params = this.deptId;
console.log("%%%%%%%%%",params);
getListTeamInfo(params).then(res => {
console.log("aaaaaaaaa",res.data.data);
let fo = [];
res.data.data.records.forEach(i => {
res.data.data.forEach(i => {
let a = {
dictKey: i.id,
dictValue: i.name + '-' + i.groupName
dictValue: i.groupName
};
fo.push(a);
});
@ -973,15 +969,15 @@
},
//
async getStorageArea() {
let params = {
department: this.deptId
};
stockUp(params).then(res => {
let params = this.deptId ;
console.log("^^^^^^^^^^^^^",params);
stockUpInfo(params).then(res => {
console.log("=========================》",res);
let fo = [];
res.data.data.forEach(i => {
let v = {
dictKey: i.id,
dictValue: i.name + '-' + i.headline
dictValue: i.headline
};
fo.push(v);
});
@ -1125,8 +1121,9 @@
// this.form.orderInfo = this.orderData;
// }
const params = this.form;
console.log("--------------->params",params);
if (this.deliveryListId){
let data = {};
let tripartite = {};
let allocationInfo = [];
//
@ -1142,8 +1139,8 @@
if (params.driverName) {
tripartite.driverName = params.driverName;
}
if (params.deiverPhone) {
tripartite.deiverPhone = params.deiverPhone;
if (params.driverPhone) {
tripartite.driverPhone = params.driverPhone;
}
if (params.vehicleNum) {
tripartite.vehicleNum = params.vehicleNum;
@ -1153,16 +1150,15 @@
}
if (params.tripartiteSource) {
this.tripartiteSourceData.forEach(item => {
if (params.tripartiteSource === item.dictValue) {
if (params.tripartiteSource === item.dictKey) {
tripartite.distributionCompanyId = item.dictKey;
tripartite.distributionCompany = item.dictValue;
}
});
}
data.tripartite = tripartite;
} else {
//
console.log("this.driverList----------->",this.driverList);
console.log("this.vehticleList----------->",this.vehticleList);
if (this.driverList.length !== this.vehticleList.length) {
this.$message({
message: '司机车辆数量有误!!!',
@ -1183,21 +1179,26 @@
}
allocationInfo = info;
}
console.log(allocationInfo);
data.allocationInfo = allocationInfo;
}
let data = {};
data.masterDriverName = this.form.masterDriverName;
data.masterVehicleNub = this.form.masterVehicleNub;
data.allocationInfo = allocationInfo;
data.tripartite = tripartite;
data.stockArticle = this.orderData;
let reservation = {};
reservation.deliveryType = this.form.deliveryType;
reservation.deliveryWay = this.form.deliveryWay;
reservation.serveType = this.form.serveType;
reservation.otherFee = this.form.otherFee;
data.taskTime = this.form.taskTime;
data.reservation = reservation;
// data.reservationIds = this.ids;
data.id = this.deliveryListId;
console.log('data>>>>>>>>>>>', data);
updateDeliveryList(data).then(res=>{
this.$router.push({
path: '/distribution/deliverylist/distributionDeliveryListdis'
});
})
}else {
let stockup = {};
let tripartite = {};
@ -1243,7 +1244,7 @@
tripartite.driverName = params.driverName;
}
if (params.deiverPhone) {
tripartite.deiverPhone = params.deiverPhone;
tripartite.driverPhone = params.driverPhone;
}
if (params.vehicleNum) {
tripartite.vehicleNum = params.vehicleNum;
@ -1294,15 +1295,17 @@
reservation.deliveryWay = this.form.deliveryWay;
reservation.serveType = this.form.serveType;
reservation.otherFee = this.form.otherFee;
data.taskTime = this.form.taskTime;
data.reservation = reservation;
// data.reservationIds = this.ids;
console.log('data>>>>>>>>>>>', data);
deliveryBusinessTask(data).then((res) => {
this.$router.push({
path: '/distribution/deliverylist/distributionDeliveryListdis'
//
// data.reservationIds = this.ids;
console.log('data>>>>>>>>>>>', data);
//
deliveryBusinessTask(data).then((res) => {
this.$router.push({
path: '/distribution/deliverylist/distributionDeliveryListdis'
});
});
});
}
},
changeVehicle(params) {
@ -1418,18 +1421,42 @@
},
ccc() {
if (this.deliveryListId){
//
this.form.tripartiteSource = '';
this.form.driverName = '';
this.form.driverPhone = '';
this.form.vehicleNum = '';
this.form.deliveryFee = '';
}else {
this.loadAndUnload = [];
this.serveType=[];
this.form = {};
}
this.aaa = true;
this.bbb = false;
this.form = {};
this.loadAndUnload = [];
this.onLoad(this.page);
this.form.deliveryType="1";
this.form.deliveryWay="1";
this.form.stockupDate = new Date()
},
ddd() {
if (this.deliveryListId){
this.vehicleIds=[];
this.deliveryDriver=[];
this.form.masterDriverName = '';
this.form.masterVehicleNub = '';
}else {
this.loadAndUnload = [];
this.serveType=[];
this.form={};
}
this.aaa = false;
this.bbb = true;
this.form = {};
this.loadAndUnload = [];
this.onLoad(this.page);
this.form.deliveryType="1";
this.form.deliveryWay="1";
this.form.stockupDate = new Date()
},
handleAddOrder() {
this.query.typeService=1;
@ -1449,7 +1476,7 @@
this.orderShow = true;
},
handleAddInventory() {
this.form.deliveryType ='2';
this.form.deliveryType ='1';
let params = {};
let page = this.page;
getInventoryList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
@ -1479,10 +1506,9 @@
if (this.deliveryListId){
getDeliveryList(this.deliveryListId).then( async res=>{
let data = res.data.data;
Object.assign(this.form,data.reservationInfo)
Object.assign(this.form,data.stockupInfo)
this.form.deliveryType = '2';
this.form.deliveryType = '1';
this.form.deliveryWay = data.reservationInfo.deliveryWay;
this.serveType = data.reservationInfo.serveType.split(",");
if (data.stockupInfo){
@ -1491,7 +1517,12 @@
this.form.loader = data.stockupInfo.loaderName;
this.form.forklift = data.stockupInfo.forkliftName;
this.form.remarks = data.stockupInfo.remarks;
this.form.taskTime = data.taskTime;
this.orderData = data.stockArticleList;
if (data.teamResponsibility){
this.loadAndUnload =data.teamResponsibility.split(",");
}
console.log("data.kind",data.kind);
if (data.kind === "1"){
//
let self = data.deliverySelfVO;
@ -1530,17 +1561,27 @@
});
this.deliveryDriver = b;
this.driverInfo = driverInfo;
}else {
let deliveryTripartiteVO = data.deliveryTripartiteVO;
this.aaa = false;
this.bbb = true;
// this.form.tripartiteSource = deliveryTripartiteVO.distributionCompanyId;
this.form.tripartiteSource = "1";
this.form.driverName = deliveryTripartiteVO.driverName ;
this.form.vehicleNum = deliveryTripartiteVO.vehicleNum ;
this.form.driverPhone = deliveryTripartiteVO.driverPhone ;
this.form.deliveryFee = deliveryTripartiteVO.deliveryFee ;
//
}
console.log(">>>>>>>>this.form",this.form);
console.log(res.data.data);
})
this.isDisable=true;
}else {
this.form.deliveryType="1";
this.form.deliveryWay="1";
this.form.stockupDate = new Date()
}
this.isDisable=true;
this.loading = false;
// Object.assign(this.form, data.reservationInfo);

5
src/views/distribution/turndelivery/deliveryInfo.vue

@ -924,13 +924,8 @@
this.loading = false;
});
}
}
}
};
</script>

Loading…
Cancel
Save