|
|
|
@ -42,24 +42,27 @@
|
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新 增</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-edit" @click="handleEdit">编 辑</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAddDistrilbution" |
|
|
|
|
>添加提货数据</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="el-icon-check" @click="handleDistributionConfirm" |
|
|
|
|
>提货完成</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="el-icon-close" @click="handleCloseConfirm" |
|
|
|
|
>取消完成</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="el-icon-close" @click="handleDistributionClose" |
|
|
|
|
>取消提货</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="el-icon-check" @click="handleSettleAccounts" |
|
|
|
|
>结 算</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="el-icon-close" @click="handleCloseSettleAccounts" |
|
|
|
|
>取消结算</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAddDistrilbution"> |
|
|
|
|
添加提货数据 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="Check" @click="handleEditBillladingStatus(1)"> |
|
|
|
|
开始提货 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-close" @click="handleEditBillladingStatus(6)"> |
|
|
|
|
取消提货 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-check" @click="handleEditBillladingStatus(2)"> |
|
|
|
|
提货完成 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-close" @click="handleEditBillladingStatus(3)"> |
|
|
|
|
取消完成 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-check" @click="handleEditBillladingStatus(4)"> |
|
|
|
|
结 算 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="primary" icon="el-icon-close" @click="handleEditBillladingStatus(5)"> |
|
|
|
|
取消结算 |
|
|
|
|
</el-button> |
|
|
|
|
<!-- <el-button type="danger" icon="el-icon-download" @click="handleExportInfo" plain |
|
|
|
|
>导出 |
|
|
|
|
</el-button> --> |
|
|
|
@ -73,48 +76,44 @@
|
|
|
|
|
</div> |
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<!-- 表格 --> |
|
|
|
|
<el-row> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
:columnList="columnList" |
|
|
|
|
:tableData="data" |
|
|
|
|
:loading="loading" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<template v-if="slotProps.scope.column.label === '提货批次'"> |
|
|
|
|
<el-text size="small" text @click="handleLike(slotProps.scope)">{{ |
|
|
|
|
slotProps.scope.row.pickupBatch |
|
|
|
|
}}</el-text> |
|
|
|
|
<el-text |
|
|
|
|
type="primary" |
|
|
|
|
text |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="handleShowDetail(slotProps.scope)" |
|
|
|
|
>明 细</el-text |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
:columnList="columnList" |
|
|
|
|
:tableData="data" |
|
|
|
|
:loading="loading" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
<template v-if="slotProps.scope.column.label === '提货批次'"> |
|
|
|
|
<el-text size="small" text @click="handleLike(slotProps.scope)">{{ |
|
|
|
|
slotProps.scope.row.pickupBatch |
|
|
|
|
}}</el-text> |
|
|
|
|
<el-text |
|
|
|
|
type="primary" |
|
|
|
|
text |
|
|
|
|
icon="el-icon-edit" |
|
|
|
|
@click="handleShowDetail(slotProps.scope)" |
|
|
|
|
>明 细</el-text |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template v-if="slotProps.scope.column.label === '操作'"> |
|
|
|
|
<el-text size="small" text @click="handleLike(slotProps.scope)">查 看</el-text> |
|
|
|
|
<el-text type="primary" text icon="el-icon-edit" @click="handleEdits(slotProps.scope)" |
|
|
|
|
>明 细</el-text |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
<template v-if="slotProps.scope.column.label === '操作'"> |
|
|
|
|
<el-text size="small" text @click="handleLike(slotProps.scope)">查 看</el-text> |
|
|
|
|
<el-text type="primary" text icon="el-icon-edit" @click="handleEdits(slotProps.scope)" |
|
|
|
|
>明 细</el-text |
|
|
|
|
> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
</el-row> |
|
|
|
|
</template> |
|
|
|
|
</tablecmt> |
|
|
|
|
|
|
|
|
|
<!-- 统计 --> |
|
|
|
|
<el-row> |
|
|
|
|
<!-- <el-row> |
|
|
|
|
<div>选择数: , 运单数: , 件数: , 重量: , 体积: , 提货费: ,</div> |
|
|
|
|
<div>总计: 总数: , 运单数: , 件数: , 重量: , 体积: , 提货费: ,</div> |
|
|
|
|
</el-row> |
|
|
|
|
</el-row> --> |
|
|
|
|
|
|
|
|
|
<!-- 分页模块 --> |
|
|
|
|
<el-row class="el-fy"> |
|
|
|
@ -305,7 +304,6 @@
|
|
|
|
|
:loading="loadingObj.oldListLoading" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
@ -348,7 +346,6 @@
|
|
|
|
|
:loading="loadingObj.oldListLoading" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
@ -748,7 +745,6 @@
|
|
|
|
|
:loading="loading" |
|
|
|
|
@inputTxt="inputsc" |
|
|
|
|
@timeCheck="timesc" |
|
|
|
|
@btnCheck="btnsc" |
|
|
|
|
@selectCheck="selectsc" |
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
@ -782,7 +778,7 @@
|
|
|
|
|
></edittablehead> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
<script lang="ts"> |
|
|
|
|
import { |
|
|
|
|
remove, |
|
|
|
|
getListOwn, |
|
|
|
@ -1063,9 +1059,6 @@ export default {
|
|
|
|
|
selectionsc(value) { |
|
|
|
|
console.log(value); |
|
|
|
|
}, |
|
|
|
|
btnsc(index, row) { |
|
|
|
|
console.log(index, row); |
|
|
|
|
}, |
|
|
|
|
selectsc(index, row) { |
|
|
|
|
console.log('index :>> ', index); |
|
|
|
|
console.log('row :>> ', row); |
|
|
|
@ -1117,20 +1110,20 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
init() { |
|
|
|
|
this.height = this.setPx(document.body.clientHeight - 160); |
|
|
|
|
//字典 |
|
|
|
|
getDictionaryBiz('delivery_cost').then(res => { |
|
|
|
|
this.clientType = res.data.data; |
|
|
|
|
}); |
|
|
|
|
//字典 |
|
|
|
|
getDictionaryBiz('certificate_type').then(res => { |
|
|
|
|
this.certificateType = res.data.data; |
|
|
|
|
this.$functions.checkcColumnList('certificateTypeName', this.columnList).checkarr = |
|
|
|
|
res.data.data.map(item => { |
|
|
|
|
item.value = item.dictKey; |
|
|
|
|
item.label = item.dictValue; |
|
|
|
|
return item; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
// //字典 |
|
|
|
|
// getDictionaryBiz('delivery_cost').then(res => { |
|
|
|
|
// this.clientType = res.data.data; |
|
|
|
|
// }); |
|
|
|
|
// //字典 |
|
|
|
|
// getDictionaryBiz('certificate_type').then(res => { |
|
|
|
|
// this.certificateType = res.data.data; |
|
|
|
|
// this.$functions.checkcColumnList('certificateTypeName', this.columnList).checkarr = |
|
|
|
|
// res.data.data.map(item => { |
|
|
|
|
// item.value = item.dictKey; |
|
|
|
|
// item.label = item.dictValue; |
|
|
|
|
// return item; |
|
|
|
|
// }); |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
checkcColumnList(prop, columnList) { |
|
|
|
|
return columnList.find(item => item.prop === prop); |
|
|
|
@ -1182,6 +1175,34 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 编辑提货数据的状态 */ |
|
|
|
|
handleEditBillladingStatus(type: number) { |
|
|
|
|
if (this.selectionList.length === 0) return this.$message.error('最少选择一条数据'); |
|
|
|
|
|
|
|
|
|
if (this.selectionList.length > 1) return this.$message.error('暂时只支持单条数据操作'); |
|
|
|
|
|
|
|
|
|
this.$confirm('确定将选择数据提货完成?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'success', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return postUpdateBillladingStatus({ |
|
|
|
|
id: this.selectionList[0].id, |
|
|
|
|
type, |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
// 清空复选框 |
|
|
|
|
this.selectionClear(); |
|
|
|
|
// 刷新表格 |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 开启添加提货数据弹窗 */ |
|
|
|
|
handleAddDistrilbution() { |
|
|
|
|
if (this.selectionList.length === 0) return this.$message.error('最少选择一条数据'); |
|
|
|
@ -1431,15 +1452,16 @@ export default {
|
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
|
|
// 请求页面数据 |
|
|
|
|
const res = await postPageList(page, { ...this.query, ...params }); |
|
|
|
|
const res = await postPageList({ ...page, ...this.query, ...params }); |
|
|
|
|
|
|
|
|
|
console.log('res :>> ', res); |
|
|
|
|
const { code, data } = res.data; |
|
|
|
|
if (code !== 200) return; |
|
|
|
|
|
|
|
|
|
this.data = data.records; |
|
|
|
|
this.page.total = res.total; |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
this.loading = false; |
|
|
|
|
} |
|
|
|
@ -1499,124 +1521,14 @@ export default {
|
|
|
|
|
// this.selectionClear(); |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
async getMenDian(row, num) { |
|
|
|
|
// console.log("值阿德飒飒的",row); |
|
|
|
|
if (num == 1) { |
|
|
|
|
const obj = this.options.find(item => item.value === row); |
|
|
|
|
console.log('obj>>>>>>>>>>>', obj); |
|
|
|
|
this.options = [ |
|
|
|
|
{ |
|
|
|
|
key: obj.value, |
|
|
|
|
value: obj.value, |
|
|
|
|
label: obj.label, |
|
|
|
|
code: obj.code, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
this.form.customerCode = obj.code; |
|
|
|
|
} else { |
|
|
|
|
const obj = this.options.find(item => item.value === row); |
|
|
|
|
console.log('obj>>>>>>>>>>>', obj); |
|
|
|
|
this.options = [ |
|
|
|
|
{ |
|
|
|
|
key: obj.value, |
|
|
|
|
value: obj.value, |
|
|
|
|
label: obj.label, |
|
|
|
|
code: obj.code, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
this.form.clientId = obj.value; |
|
|
|
|
} |
|
|
|
|
this.form.serviceType = null; |
|
|
|
|
let aa = ''; |
|
|
|
|
this.options.some(i => { |
|
|
|
|
// console.log(">><><><<>",i); |
|
|
|
|
if (i.value == row) { |
|
|
|
|
this.form.customerName = i.label; |
|
|
|
|
this.form.clientCode = i.code; |
|
|
|
|
//查询客户服务类型 |
|
|
|
|
aa = i.value; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
let bu = await getListName(this.page.pageNum, this.page.pageSize, { |
|
|
|
|
clientId: aa, |
|
|
|
|
typeService: '3', |
|
|
|
|
}); |
|
|
|
|
// console.log("bububu",bu.data.data.records); |
|
|
|
|
if (bu.data.data?.records.length > 0) { |
|
|
|
|
this.form.serviceType = bu.data.data.records[0].mold; |
|
|
|
|
} |
|
|
|
|
let cl = await getListClient(this.page.pageNum, this.page.pageSize, { pid: row }); |
|
|
|
|
// console.log(">>>>",cl.data.data.records); |
|
|
|
|
this.shop = []; |
|
|
|
|
cl.data.data.records.forEach(i => { |
|
|
|
|
let st = { |
|
|
|
|
label: i.clientName, |
|
|
|
|
value: i.id, |
|
|
|
|
}; |
|
|
|
|
this.shop.push(st); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
async getMenDian(row, num) {}, |
|
|
|
|
//客户编号 |
|
|
|
|
async remoteCodeMethod(query) { |
|
|
|
|
if (query) { |
|
|
|
|
// this.loading = true; |
|
|
|
|
this.options = []; |
|
|
|
|
this.form.clientId = null; |
|
|
|
|
let cl = await getListClient(this.page.pageNum, this.page.pageSize, { |
|
|
|
|
clientCode: query, |
|
|
|
|
}); |
|
|
|
|
console.log('客户信息1234>>>>', cl.data.data.records); |
|
|
|
|
cl.data.data.records.forEach(i => { |
|
|
|
|
let st = { |
|
|
|
|
label: i.clientName, |
|
|
|
|
value: i.id, |
|
|
|
|
code: i.clientCode, |
|
|
|
|
}; |
|
|
|
|
this.options.push(st); |
|
|
|
|
}); |
|
|
|
|
// setTimeout(() => { |
|
|
|
|
// this.loading = false |
|
|
|
|
// this.loading = this.list.filter((item) => { |
|
|
|
|
// return item.label.toLowerCase().includes(query.toLowerCase()) |
|
|
|
|
// }) |
|
|
|
|
// }, 200) |
|
|
|
|
} else { |
|
|
|
|
this.options = []; |
|
|
|
|
} |
|
|
|
|
console.log('query :>> ', query); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
<style scope lang="scss"> |
|
|
|
|
.foot { |
|
|
|
|
position: fixed; |
|
|
|
|
right: 0; |
|
|
|
|
bottom: 0; |
|
|
|
|
left: 0; |
|
|
|
|
z-index: 999; |
|
|
|
|
height: 60px; |
|
|
|
|
} |
|
|
|
|
.foot .dialog-footer { |
|
|
|
|
margin-bottom: 130px; |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
.ca .el-radio__inner { |
|
|
|
|
top: -18px; |
|
|
|
|
left: -19px; |
|
|
|
|
border-radius: 0; |
|
|
|
|
border: 0; |
|
|
|
|
width: 170px; |
|
|
|
|
height: 34px; |
|
|
|
|
background-color: transparent; |
|
|
|
|
cursor: pointer; |
|
|
|
|
box-sizing: border-box; |
|
|
|
|
position: absolute; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.ca .el-radio__input.is-checked .el-radio__inner { |
|
|
|
|
background: transparent; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
/* .el-input { |
|
|
|
@ -1663,7 +1575,6 @@ export default {
|
|
|
|
|
flex-direction: column; |
|
|
|
|
} |
|
|
|
|
.el-fy { |
|
|
|
|
flex: 1; |
|
|
|
|
display: flex; |
|
|
|
|
align-items: flex-end; |
|
|
|
|
} |
|
|
|
|