From c41ba9575e72dda93085759ad48882d055313005 Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期四, 16 四月 2026 09:03:02 +0800
Subject: [PATCH] #
---
src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html | 126 ++++++++++++++++++++++++++++++++++++++----
1 files changed, 114 insertions(+), 12 deletions(-)
diff --git a/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html b/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
index d71cd92..cd8b1a5 100644
--- a/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
+++ b/src/main/webapp/views/orderCargoGrouping/orderCargoGroupingOperate.html
@@ -120,7 +120,7 @@
v-model="searchForm.orderNo"
placeholder="璇疯緭鍏ヨ鍗曞彿"
clearable
- style="width: 150px;"
+ style="width: 250px;"
@keyup.enter.native="handleSearch"
></el-input>
</div>
@@ -157,6 +157,18 @@
<el-option label="閲嶆柊涓嬪彂" value="99"></el-option>
</el-select>
</div>
+ <div class="search-item">
+ <span class="search-label">鍒涘缓鏃ユ湡:</span>
+ <el-date-picker
+ v-model="selectedDate"
+ type="date"
+ value-format="yyyy-MM-dd"
+ placeholder="閫夋嫨鏃ユ湡"
+ clearable
+ style="width: 150px;"
+ @change="handleDateChange"
+ ></el-date-picker>
+ </div>
<div class="search-actions">
<el-button type="primary" icon="el-icon-search" @click="handleSearch">鎼滅储</el-button>
<el-button icon="el-icon-refresh" @click="handleReset">閲嶇疆</el-button>
@@ -178,11 +190,24 @@
<!-- <el-table-column prop="itemName" label="缁勮揣鍗曞彿" width="120" align="center" sortable="custom"></el-table-column>-->
<el-table-column prop="cstmrName" label="璐т富" min-width="120" align="center"></el-table-column>
<el-table-column prop="settle$" label="鐘舵��" min-width="100" align="center" :formatter="formatStatus"></el-table-column>
+ <el-table-column prop="issueComplete" label="涓嬪彂瀹屾垚" width="100" align="center">
+ <template slot-scope="scope">
+ <el-tag v-if="scope.row.issueComplete === 1" type="success">宸插叏涓嬪彂</el-tag>
+ <el-tag v-else type="info">鏈畬鎴�</el-tag>
+ </template>
+ </el-table-column>
<el-table-column prop="createTime" label="鍒涘缓鏃堕棿" min-width="100" align="center" :formatter="formatDateColumn"></el-table-column>
<el-table-column prop="updateTime" label="鏇存柊鏃ユ湡" min-width="100" align="center" :formatter="formatDateColumn"></el-table-column>
- <el-table-column label="鎿嶄綔" width="150" align="center" fixed="right">
+ <el-table-column label="鎿嶄綔" width="220" align="center" fixed="right">
<template slot-scope="scope">
<div class="operation-cell">
+ <el-button
+ type="warning"
+ size="mini"
+ :disabled="scope.row.issueComplete === 1"
+ @click="oneKeyIssue(scope.row)">
+ 涓�閿笅鍙�
+ </el-button>
<el-button
type="primary"
size="mini"
@@ -357,6 +382,7 @@
cstmrName: '',
settle: ''
},
+ selectedDate: '',
detailSearch: {
standby3: '',
boxType3: ''
@@ -456,6 +482,10 @@
if (that.orderByField) {
params.orderByField = that.orderByField;
params.orderByType = that.orderByType;
+ }
+
+ if (that.selectedDate) {
+ params['create_time'] = that.selectedDate + ' 00:00:00 - ' + that.selectedDate + ' 23:59:59';
}
Object.keys(that.searchForm).forEach(key => {
@@ -841,7 +871,7 @@
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
instance.confirmButtonLoading = true;
- this.confirmReport(orderNo, done);
+ this.confirmReport(orderNo, instance, done);
} else {
done();
}
@@ -858,13 +888,21 @@
},
// 纭涓婃姤
- confirmReport(orderNo, done) {
+ confirmReport(orderNo, instance, done) {
this.reportLoading = true;
+ const finish = () => {
+ this.reportLoading = false;
+ if (instance) {
+ instance.confirmButtonLoading = false;
+ }
+ if (typeof done === 'function') {
+ done();
+ }
+ };
const rowsToIssue = (this.tableDataB || []).filter(item => parseInt(item.inspect) === 1);
if (rowsToIssue.length === 0) {
- this.reportLoading = false;
- if (typeof done === 'function') done();
+ finish();
this.$message.error('娌℃湁寰呬笅鍙戦」');
return;
}
@@ -896,8 +934,7 @@
Promise.all(updates).then(results => {
const failed = results.find(r => !r.ok);
if (failed) {
- this.reportLoading = false;
- if (typeof done === 'function') done();
+ finish();
this.$message.error(failed.msg || '鍚屾beBatch澶辫触');
return;
}
@@ -908,8 +945,7 @@
data: { orderNo: orderNo },
method: 'POST',
success: (res) => {
- this.reportLoading = false;
- if (typeof done === 'function') done();
+ finish();
if (res.code === 200 || res.success) {
this.$message({
message: `璁㈠崟鍙� ${orderNo} 涓嬪彂鎴愬姛`,
@@ -926,8 +962,7 @@
}
},
error: (error) => {
- this.reportLoading = false;
- if (typeof done === 'function') done();
+ finish();
console.error('涓嬪彂澶辫触:', error);
this.$message.error('涓嬪彂澶辫触锛岃妫�鏌ョ綉缁滆繛鎺�');
}
@@ -956,6 +991,11 @@
this.getTableDataA();
},
+ handleDateChange() {
+ this.currentPage = 1;
+ this.getTableDataA();
+ },
+
// 閲嶇疆鎼滅储鏉′欢
handleReset() {
this.searchForm = {
@@ -963,12 +1003,74 @@
cstmrName: '',
settle: ''
};
+ this.selectedDate = '';
this.orderByField = '';
this.orderByType = 'asc';
this.currentPage = 1;
this.getTableDataA();
},
+ oneKeyIssue(row) {
+ if (!row || !row.orderNo) {
+ this.$message.error('璁㈠崟鍙蜂负绌�');
+ return;
+ }
+ const orderNo = row.orderNo;
+ this.$confirm(
+ `纭涓�閿笅鍙戣鍗曞彿 <strong style="color: #F56C6C; font-size: 16px;">${orderNo}</strong> 鐨勫叏閮ㄦ槑缁嗗悧锛焋,
+ '涓�閿笅鍙�',
+ {
+ confirmButtonText: '纭涓嬪彂',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ dangerouslyUseHTMLString: true
+ }
+ ).then(() => {
+ const loadingInstance = this.$loading({
+ lock: true,
+ text: '涓嬪彂涓�...',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
+ $.ajax({
+ url: baseUrl + "/order/pakin/order/oneKey/issue/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: { orderNo: orderNo },
+ method: 'POST',
+ success: (res) => {
+ loadingInstance.close();
+ if (res.code === 200 || res.success) {
+ this.$message({
+ message: `璁㈠崟鍙� ${orderNo} 涓嬪彂鎴愬姛`,
+ type: 'success',
+ duration: 3000
+ });
+ this.getTableDataA();
+ } else {
+ if (res.msg && (String(res.msg).indexOf('\n') !== -1 || String(res.msg).indexOf('锛�') !== -1)) {
+ this.$alert(res.msg, '灏哄鏍¢獙澶辫触', {
+ confirmButtonText: '鐭ラ亾浜�',
+ type: 'error',
+ dangerouslyUseHTMLString: false
+ });
+ } else {
+ this.$message.error(res.msg || '涓嬪彂澶辫触');
+ }
+ }
+ },
+ error: () => {
+ loadingInstance.close();
+ this.$message.error('涓嬪彂澶辫触锛岃妫�鏌ョ綉缁滆繛鎺�');
+ }
+ });
+ }).catch(() => {
+ this.$message({
+ type: 'info',
+ message: '宸插彇娑堟搷浣�'
+ });
+ });
+ },
+
// 鏄剧ず璇︽儏寮圭獥
showDetail(row) {
this.currentRow = row;
--
Gitblit v1.9.1