feat: 完成履约管理模块全量功能迭代
本次迭代包含以下核心功能: 1. 新增履约时效总览可视化页面,支持多维度数据统计 2. 实现物料/客户/供应商的Excel批量导入导出功能 3. 新增订单批量结单功能,优化结单流程校验 4. 完善日志配置,新增文件日志落地 5. 修复分类查询逻辑,优化多租户数据隔离 6. 新增甲方履约结单管理页面与权限控制 7. 重构部分Mapper与Service接口,增强代码健壮性
This commit is contained in:
@@ -15,9 +15,8 @@
|
||||
<div class="filter-left">
|
||||
<el-input v-model="q.doNo" placeholder="搜索单号" clearable size="small" class="filter-input" @keyup.enter.native="handleSearch" />
|
||||
<el-select v-model="q.deliveryStatus" placeholder="状态" clearable size="small" style="width:100px" @change="getList">
|
||||
<el-option label="待发" value="pending" />
|
||||
<el-option label="在途" value="transit" />
|
||||
<el-option label="历史" value="history" />
|
||||
<el-option label="已签收(待结单)" value="history" />
|
||||
<el-option label="已结单" value="closed" />
|
||||
</el-select>
|
||||
<el-button type="primary" size="small" @click="handleSearch">搜索</el-button>
|
||||
<el-button size="small" @click="resetSearch">重置</el-button>
|
||||
@@ -31,7 +30,7 @@
|
||||
<!-- ═══ 左侧列表 ═══ -->
|
||||
<div class="cd-left">
|
||||
<div class="left-header">
|
||||
<span class="left-title">订单列表</span>
|
||||
<span class="left-title">已签收待结单</span>
|
||||
</div>
|
||||
<el-table ref="table" v-loading="loading" :data="list" border stripe size="small"
|
||||
@selection-change="onSelectionChange" class="jd-table"
|
||||
@@ -101,7 +100,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listDelivery, setCloseDate } from "@/api/bid/delivery"
|
||||
import { listDelivery, setCloseDate, batchSetCloseDate } from "@/api/bid/delivery"
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
@@ -111,7 +110,7 @@ export default {
|
||||
loading: false, list: [], total: 0, stats: {},
|
||||
selected: [],
|
||||
batchDate: null,
|
||||
q: { pageNum: 1, pageSize: 50, doNo: "", deliveryStatus: "" },
|
||||
q: { pageNum: 1, pageSize: 50, doNo: "", deliveryStatus: "history" },
|
||||
statCards: [
|
||||
{ key: "pendingClose", label: "已收货未结单", icon: "el-icon-document", color: "#e4393c" },
|
||||
{ key: "todayClosed", label: "今日结单", icon: "el-icon-circle-check", color: "#67c23a" },
|
||||
@@ -150,7 +149,9 @@ export default {
|
||||
calcRow(row) {
|
||||
if (!row.deliveryDate || !row._editDate) { row._cycleDays = null; row._diffDays = null; return }
|
||||
const cd = new Date(row._editDate)
|
||||
const dd = new Date(row.deliveryDate)
|
||||
// 履约周期以约定交货日为起点,存在延期日期时以延期日期替代计算差异
|
||||
const baseDate = row.delayDate || row.deliveryDate
|
||||
const dd = new Date(baseDate)
|
||||
row._cycleDays = Math.round((cd - dd) / 86400000)
|
||||
row._diffDays = row._cycleDays
|
||||
},
|
||||
@@ -169,8 +170,8 @@ export default {
|
||||
if (!this.selected.length) return
|
||||
if (!this.allHaveDate) { this.$modal.msgError("有订单未设置收货日期"); return }
|
||||
this.$modal.confirm("确认批量结单 " + this.selected.length + " 条?").then(() => {
|
||||
const promises = this.selected.map(r => setCloseDate(r.doId, r._editDate))
|
||||
return Promise.all(promises)
|
||||
const ids = this.selected.map(r => r.doId)
|
||||
return batchSetCloseDate(ids, this.selected[0]._editDate)
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("批量结单成功"); this.getList(); this.getStats(); this.selected = []
|
||||
}).catch(() => {})
|
||||
|
||||
Reference in New Issue
Block a user