parent
9d3d68148e
commit
128b329ec7
3 changed files with 442 additions and 0 deletions
@ -0,0 +1,38 @@ |
||||
import request from '@/axios'; |
||||
|
||||
|
||||
|
||||
|
||||
// 获取配送记录列表
|
||||
export const getList = (current, size, params) => { |
||||
return request({ |
||||
url: '/blade-desk/order/page', |
||||
method: 'get', |
||||
params: { |
||||
...params, |
||||
current, |
||||
size, |
||||
}, |
||||
}); |
||||
}; |
||||
// 获取配送记录列表
|
||||
|
||||
// 获取作业中心
|
||||
export const getWorkOrderCenter = (params) => { |
||||
return request({ |
||||
url: '/blade-desk/order/bs-list', |
||||
method: 'get', |
||||
params: params, |
||||
}); |
||||
}; |
||||
|
||||
// 提交
|
||||
export const boxBinding = (data) => { |
||||
return request({ |
||||
url: '/blade-desk/order/box-binding', |
||||
method: 'post', |
||||
data: data, |
||||
}); |
||||
}; |
||||
|
||||
// 退回
|
||||
@ -0,0 +1,103 @@ |
||||
<template> |
||||
<el-dialog |
||||
title="新增配送" |
||||
append-to-body |
||||
:modelValue="openShow" |
||||
width="30%" |
||||
@close="closeDialog" |
||||
> |
||||
<el-form :model="form" ref="form" :rules="rules" label-width="auto"> |
||||
<el-form-item label="箱条码" prop="boxBarcode"> |
||||
<el-input |
||||
v-model="form.boxBarcode" |
||||
style="" |
||||
@keyup.enter.native="changeCode" |
||||
placeholder="请扫描箱条码" |
||||
/> |
||||
</el-form-item> |
||||
<el-form-item label="作业中心" prop="wcId"> |
||||
<el-select v-model="form.wcId" placeholder="请选择" filterable> |
||||
<el-option |
||||
v-for="item in workCenterOptions" |
||||
:key="item.id" |
||||
:label="item.wcName" |
||||
:value="item.id" |
||||
/> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-form> |
||||
|
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit" :loading="submitLoading">确 定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
// import { |
||||
// updateProcess, |
||||
// } from '../../api/flowManagement/index'; |
||||
|
||||
import { getWorkOrderCenter, boxBinding } from '@/api/logisticsManagement/logisticsDistribution'; |
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false, |
||||
}, |
||||
}, |
||||
data() { |
||||
return { |
||||
submitLoading:false, |
||||
openShow: false, |
||||
form: {}, |
||||
rules: { |
||||
boxBarcode: [{ required: true, message: '请扫描箱条码', trigger: 'blur' }], |
||||
wcId: [{ required: true, message: '请选择作业中心', trigger: 'blur' }], |
||||
}, |
||||
workCenterOptions: [], |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
this.getWorkOrderCenter(); |
||||
}, |
||||
methods: { |
||||
// 获取作业中心 |
||||
getWorkOrderCenter() { |
||||
getWorkOrderCenter().then(res => { |
||||
this.workCenterOptions = res.data.data; |
||||
}); |
||||
}, |
||||
changeCode() { |
||||
console.log(9999, this.form); |
||||
}, |
||||
closeDialog() { |
||||
this.openShow = false; |
||||
this.$emit('closeDialog'); |
||||
}, |
||||
submit() { |
||||
this.$refs.form.validate(async valid => { |
||||
if (valid) { |
||||
this.submitLoading = true |
||||
let params = { |
||||
boxBarcode: this.form.boxBarcode, |
||||
wcId: this.form.wcId, |
||||
}; |
||||
|
||||
boxBinding(params).then(res => { |
||||
this.$message.success('操作成功'); |
||||
this.submitLoading = false |
||||
this.closeDialog(); |
||||
}).catch(err=>{ |
||||
this.submitLoading = false |
||||
}) |
||||
} |
||||
}); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,301 @@ |
||||
<template> |
||||
<basic-container> |
||||
<avue-crud |
||||
:option="option" |
||||
:table-loading="loading" |
||||
:data="data" |
||||
v-model="form" |
||||
v-model:page="page" |
||||
ref="crud" |
||||
@row-del="rowDel" |
||||
@search-change="searchChange" |
||||
@search-reset="searchReset" |
||||
@selection-change="selectionChange" |
||||
@current-change="currentChange" |
||||
@size-change="sizeChange" |
||||
@refresh-change="refreshChange" |
||||
@on-load="onLoad" |
||||
> |
||||
<template #menu-left> |
||||
<el-button type="primary" @click="addFn">新增</el-button> |
||||
</template> |
||||
<template #menu-right> </template> |
||||
<template #menu="{ row }"> |
||||
<el-button type="text" @click="returnFn" v-if="row.status=='1'||row.status=='2'">退回</el-button> |
||||
</template> |
||||
</avue-crud> |
||||
<!-- 新增 --> |
||||
<addLogisticsDialog |
||||
v-if="showAddDialogd" |
||||
:showDialog="showAddDialogd" |
||||
@closeDialog="closeDialog" |
||||
></addLogisticsDialog> |
||||
</basic-container> |
||||
</template> |
||||
|
||||
<script> |
||||
import addLogisticsDialog from './components/addLogisticsDialog.vue'; |
||||
import { getList } from '@/api/logisticsManagement/logisticsDistribution'; |
||||
export default { |
||||
components: { |
||||
addLogisticsDialog, |
||||
}, |
||||
data() { |
||||
return { |
||||
showAddDialogd: false, |
||||
form: {}, |
||||
selectionList: [], |
||||
query: {}, |
||||
loading: false, |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
columnSort: true, |
||||
tip: false, |
||||
height: 'auto', |
||||
calcHeight: 32, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
searchIcon: true, |
||||
searchIndex: 3, |
||||
tree: false, |
||||
border: true, |
||||
index: true, |
||||
selection: false, |
||||
addBtn: false, |
||||
editBtn: false, |
||||
viewBtn: false, |
||||
delBtn: false, |
||||
editBtnText: '修改', |
||||
labelWidth: 120, |
||||
menuWidth: 80, |
||||
dialogWidth: 900, |
||||
dialogClickModal: false, |
||||
searchEnter: true, |
||||
excelBtn: false, |
||||
filterBtn: true, |
||||
searchShowBtn: false, |
||||
excelBtn: true, |
||||
showOverflowTooltip: true, |
||||
addBtnIcon: ' ', |
||||
viewBtnIcon: ' ', |
||||
delBtnIcon: ' ', |
||||
editBtnIcon: ' ', |
||||
gridBtn: false, |
||||
searchLabelPosition: 'left', |
||||
searchGutter: 24, |
||||
searchSpan: 6, |
||||
menuAlign: 'left', |
||||
gridBtn: false, |
||||
searchMenuPosition: 'right', |
||||
align: 'center', |
||||
menu: false, |
||||
column: [ |
||||
{ |
||||
label: '箱条码', |
||||
prop: 'boxBarcode', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '站点名称', |
||||
prop: 'stationId', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '作业中心', |
||||
prop: 'wcId', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '作业中心', |
||||
prop: 'wcId', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
hide:true, |
||||
type:'select', |
||||
filterable:true, |
||||
dicUrl:'/blade-desk/order/bs-list', |
||||
props: { |
||||
label: 'wcName', |
||||
value: 'id', |
||||
}, |
||||
}, |
||||
{ |
||||
label: '状态', |
||||
prop: 'taskStatus', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
type: 'select', |
||||
dicData: [ |
||||
{ label: '起点位置', value: 0 }, |
||||
{ label: '输送线起点', value: 1 }, |
||||
{ label: '退回(超重)', value: 2 }, |
||||
{ label: '输送线末尾', value: 3 }, |
||||
{ label: '站点', value: 4 }, |
||||
{ label: '库位', value: 5 }, |
||||
{ label: '等待', value: 6 }, |
||||
{ label: '站点接收', value: 7 }, |
||||
{ label: '回库', value: 8 }, |
||||
{ label: '结束', value: 9 }, |
||||
], |
||||
}, |
||||
{ |
||||
label: '创建时间', |
||||
prop: 'createTime', |
||||
search: false, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '时间范围', |
||||
prop: 'crDate', |
||||
sortable: true, |
||||
filter: true, |
||||
selectWidth: 150, |
||||
searchLabelWidth: 90, |
||||
span: 12, |
||||
search: true, |
||||
width: 150, |
||||
searchSpan: 8, |
||||
hide:true, |
||||
type: 'date', |
||||
format: 'YYYY-MM-DD', |
||||
valueFormat: 'YYYY-MM-DD', |
||||
startPlaceholder: '开始日期', |
||||
endPlaceholder: '结束日期', |
||||
rangeSeparator: '-', |
||||
searchRange: true, |
||||
}, |
||||
|
||||
|
||||
], |
||||
}, |
||||
|
||||
data: [], |
||||
}; |
||||
}, |
||||
methods: { |
||||
returnFn() {}, |
||||
addFn() { |
||||
this.showAddDialogd = true; |
||||
}, |
||||
closeDialog() { |
||||
this.showAddDialogd = false; |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
rowSave(row, done, loading) { |
||||
// addPersonAbility(row).then( |
||||
// () => { |
||||
// this.onLoad(this.page); |
||||
// this.$message({ |
||||
// type: 'success', |
||||
// message: '操作成功!', |
||||
// }); |
||||
// done(); |
||||
// }, |
||||
// error => { |
||||
// window.console.log(error); |
||||
// loading(); |
||||
// } |
||||
// ); |
||||
}, |
||||
rowUpdate(row, index, done, loading) { |
||||
// updatePersonAbility(row).then( |
||||
// () => { |
||||
// this.onLoad(this.page); |
||||
// this.$message({ |
||||
// type: 'success', |
||||
// message: '操作成功!', |
||||
// }); |
||||
// done(); |
||||
// }, |
||||
// error => { |
||||
// window.console.log(error); |
||||
// loading(); |
||||
// } |
||||
// ); |
||||
}, |
||||
rowDel(row) { |
||||
this.$confirm('确定将选择数据删除?', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}) |
||||
.then(() => { |
||||
// return removePersonAbility(row.id); |
||||
}) |
||||
.then(() => { |
||||
this.onLoad(this.page); |
||||
this.$message({ |
||||
type: 'success', |
||||
message: '操作成功!', |
||||
}); |
||||
}); |
||||
}, |
||||
|
||||
searchReset() { |
||||
this.query = {}; |
||||
this.onLoad(this.page); |
||||
}, |
||||
searchChange(params, done) { |
||||
this.query = params; |
||||
this.page.currentPage = 1; |
||||
this.onLoad(this.page, params); |
||||
done(); |
||||
}, |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
}, |
||||
selectionClear() { |
||||
this.selectionList = []; |
||||
this.$refs.crud.toggleSelection(); |
||||
}, |
||||
|
||||
currentChange(currentPage) { |
||||
this.page.currentPage = currentPage; |
||||
}, |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
}, |
||||
refreshChange() { |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
handleChange(file, fileList) { |
||||
// proxy.$Export.xlsx(file.raw).then((data) => { |
||||
// data.value = data.results; |
||||
// }); |
||||
this.$message({ |
||||
type: 'success', |
||||
message: '操作成功!', |
||||
}); |
||||
}, |
||||
|
||||
onLoad(page, params = {}) { |
||||
this.loading = true; |
||||
if(this.query.crDate.length>0){ |
||||
this.query.startTime = this.query.crDate[0]+" 00:00:00"; |
||||
this.query.endTime = this.query.crDate[1]+" 00:00:00"; |
||||
} |
||||
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
||||
this.data = res.data.data.records; |
||||
this.loading = false; |
||||
this.page.total = res.data.data.total; |
||||
}); |
||||
}, |
||||
}, |
||||
mounted() {}, |
||||
}; |
||||
</script> |
||||
d |
||||
Loading…
Reference in new issue