You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

809 lines
29 KiB

  1. <template>
  2. <div class="mod-config">
  3. <!-- 条件查询 -->
  4. <el-card :class="['search-card', { 'collapsed': !searchExpanded }]" shadow="hover">
  5. <div slot="header" class="search-header">
  6. <div class="header-left">
  7. <i class="el-icon-search"></i>
  8. <span class="header-title">Search</span>
  9. </div>
  10. <div class="header-right">
  11. <el-button
  12. type="text"
  13. size="small"
  14. @click="toggleSearchExpand"
  15. class="collapse-btn">
  16. <span>{{ searchExpanded ? '收起' : '展开' }}</span>
  17. <i :class="searchExpanded ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"></i>
  18. </el-button>
  19. </div>
  20. </div>
  21. <el-form
  22. :inline="true"
  23. label-position="top"
  24. :model="searchData"
  25. class="search-form"
  26. @keyup.enter.native="getDataList">
  27. <template v-if="searchExpanded">
  28. <el-row :gutter="16">
  29. <el-col :span="2">
  30. <el-form-item label="BU">
  31. <el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 100%">
  32. <el-option
  33. v-for="i in userBuList"
  34. :key="i.buNo"
  35. :label="i.buDesc"
  36. :value="i.buNo">
  37. </el-option>
  38. </el-select>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :span="2">
  42. <el-form-item label="变动类型">
  43. <el-select v-model="searchData.documentType" placeholder="请选择" clearable style="width: 100%">
  44. <el-option
  45. v-for="item in documentTypeList"
  46. :key="item.value"
  47. :label="item.label"
  48. :value="item.value">
  49. </el-option>
  50. </el-select>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :span="4">
  54. <el-form-item label="变动单号">
  55. <el-input v-model="searchData.transactionId" clearable placeholder="请输入"></el-input>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="4">
  59. <el-form-item label="标签条码">
  60. <el-input v-model="searchData.rollNo" clearable placeholder="请输入"></el-input>
  61. </el-form-item>
  62. </el-col>
  63. <el-col :span="4">
  64. <el-form-item label="物料编码">
  65. <el-input v-model="searchData.partNo" clearable placeholder="请输入"></el-input>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="4">
  69. <el-form-item label="物料名称">
  70. <el-input v-model="searchData.partDesc" clearable placeholder="请输入"></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="4">
  74. <el-form-item label="规格型号">
  75. <el-input v-model="searchData.spec" clearable placeholder="请输入"></el-input>
  76. </el-form-item>
  77. </el-col>
  78. </el-row>
  79. <el-row :gutter="16">
  80. <el-col :span="3">
  81. <el-form-item label="传输状态">
  82. <el-select v-model="searchData.syncedFlag" placeholder="请选择" clearable style="width: 100%">
  83. <el-option label="已传输" value="Y"></el-option>
  84. <el-option label="待传输" value="N"></el-option>
  85. </el-select>
  86. </el-form-item>
  87. </el-col>
  88. <el-col :span="3">
  89. <el-form-item label="通知单号">
  90. <el-input v-model="searchData.documentNo" clearable placeholder="请输入"></el-input>
  91. </el-form-item>
  92. </el-col>
  93. <el-col :span="3">
  94. <el-form-item label="关联单号">
  95. <el-input v-model="searchData.orderNo" clearable placeholder="请输入"></el-input>
  96. </el-form-item>
  97. </el-col>
  98. <el-col :span="3">
  99. <el-form-item label="关联单行号">
  100. <el-input v-model="searchData.orderLineNo" clearable placeholder="请输入"></el-input>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :span="4">
  104. <el-form-item label="合约号码">
  105. <el-input v-model="searchData.batchNo" clearable placeholder="请输入"></el-input>
  106. </el-form-item>
  107. </el-col>
  108. <el-col :span="8">
  109. <el-form-item label="变动日期">
  110. <el-date-picker
  111. v-model="searchData.startDate"
  112. type="datetime"
  113. value-format="yyyy-MM-dd HH:mm"
  114. format="yyyy-MM-dd HH:mm"
  115. placeholder="开始日期"
  116. style="width: 44%">
  117. </el-date-picker>
  118. <span style="margin: 0 8px; color: #DCDFE6;">~</span>
  119. <el-date-picker
  120. v-model="searchData.endDate"
  121. type="datetime"
  122. value-format="yyyy-MM-dd HH:mm"
  123. format="yyyy-MM-dd HH:mm"
  124. placeholder="结束日期"
  125. style="width: 44%">
  126. </el-date-picker>
  127. </el-form-item>
  128. </el-col>
  129. </el-row>
  130. </template>
  131. <!-- 操作按钮区域 -->
  132. <el-row :gutter="16">
  133. <el-col :span="24">
  134. <div class="search-actions">
  135. <div class="action-left">
  136. <el-button
  137. type="primary"
  138. icon="el-icon-search"
  139. :loading="dataListLoading"
  140. @click="getDataList">
  141. 查询
  142. </el-button>
  143. <el-button
  144. icon="el-icon-refresh-left"
  145. @click="resetSearch">
  146. 重置
  147. </el-button>
  148. </div>
  149. <div class="action-right">
  150. <el-button
  151. v-if="isAuth('105006:try')"
  152. type="warning"
  153. icon="el-icon-refresh-right"
  154. @click="batchRetryHandle">
  155. 手动重试
  156. </el-button>
  157. <el-button
  158. icon="el-icon-download"
  159. @click="exportData">
  160. 导出
  161. </el-button>
  162. </div>
  163. </div>
  164. </el-col>
  165. </el-row>
  166. </el-form>
  167. </el-card>
  168. <!-- 页签列表 -->
  169. <el-tabs v-model="activeTab" @tab-click="handleTabClick">
  170. <el-tab-pane label="变动明细" name="all"></el-tab-pane>
  171. <el-tab-pane label="采购入库" name="采购入库"></el-tab-pane>
  172. <el-tab-pane label="采购退货" name="采购退货"></el-tab-pane>
  173. <el-tab-pane label="生产领料" name="生产领料"></el-tab-pane>
  174. <el-tab-pane label="生产退仓" name="生产退仓"></el-tab-pane>
  175. <el-tab-pane label="生产入库" name="生产入库"></el-tab-pane>
  176. <el-tab-pane label="销售出库" name="销售出库"></el-tab-pane>
  177. <el-tab-pane label="销售退货" name="销售退货"></el-tab-pane>
  178. <el-tab-pane label="其他入库" name="其他入库"></el-tab-pane>
  179. <el-tab-pane label="其他出库" name="其他出库"></el-tab-pane>
  180. <el-tab-pane label="移库调拨" name="移库调拨"></el-tab-pane>
  181. </el-tabs>
  182. <!-- 展示列表 -->
  183. <el-table
  184. :height="height"
  185. :data="dataList"
  186. border
  187. v-loading="dataListLoading"
  188. @selection-change="selectionChangeHandle"
  189. style="width: 100%;">
  190. <el-table-column
  191. type="selection"
  192. header-align="center"
  193. align="center"
  194. width="50">
  195. </el-table-column>
  196. <el-table-column prop="buNo" label="BU" header-align="center" align="center" width="80"></el-table-column>
  197. <el-table-column prop="transactionId" label="变动单号" header-align="center" align="left" min-width="150" show-overflow-tooltip></el-table-column>
  198. <el-table-column prop="documentType" label="变动类型" header-align="center" align="center" width="100"></el-table-column>
  199. <el-table-column prop="documentNo" label="通知单号" header-align="center" align="left" min-width="150" show-overflow-tooltip></el-table-column>
  200. <el-table-column prop="orderNo" label="关联单号" header-align="center" align="left" min-width="150" show-overflow-tooltip></el-table-column>
  201. <el-table-column prop="orderLineNo" label="关联单行号" header-align="center" align="center" width="100"></el-table-column>
  202. <el-table-column prop="rollNo" label="标签条码" header-align="center" align="left" min-width="180" show-overflow-tooltip></el-table-column>
  203. <el-table-column prop="rollQty" label="变动数量" header-align="center" align="right" width="100"></el-table-column>
  204. <el-table-column prop="batchNo" label="合约号码" header-align="center" align="left" min-width="150" show-overflow-tooltip></el-table-column>
  205. <el-table-column prop="partNo" label="物料编码" header-align="center" align="left" min-width="150" show-overflow-tooltip></el-table-column>
  206. <el-table-column prop="partDesc" label="物料名称" header-align="center" align="left" min-width="180" show-overflow-tooltip></el-table-column>
  207. <el-table-column prop="spec" label="规格型号" header-align="center" align="left" min-width="120" show-overflow-tooltip></el-table-column>
  208. <el-table-column prop="warehouseId" label="仓库编码" header-align="center" align="center" width="100"></el-table-column>
  209. <el-table-column prop="warehouseName" label="仓库名称" header-align="center" align="left" min-width="120" show-overflow-tooltip></el-table-column>
  210. <el-table-column prop="locationId" label="库位编码" header-align="center" align="center" width="100"></el-table-column>
  211. <el-table-column prop="locationName" label="库位名称" header-align="center" align="left" min-width="120" show-overflow-tooltip></el-table-column>
  212. <el-table-column prop="syncedFlag" label="传输状态" header-align="center" align="center" width="90">
  213. <template slot-scope="scope">
  214. <el-tag :type="scope.row.syncedFlag === '已传输' ? 'success' : 'warning'" size="small">
  215. {{ scope.row.syncedFlag }}
  216. </el-tag>
  217. </template>
  218. </el-table-column>
  219. <el-table-column prop="syncedTime" label="传输时间" header-align="center" align="center" width="160"></el-table-column>
  220. <el-table-column prop="syncedErrorMsg" label="传输消息" header-align="center" align="left" min-width="150" show-overflow-tooltip></el-table-column>
  221. <el-table-column v-if="showBomItemNo" prop="bomItemNo" label="Bom行号" header-align="center" align="center" width="100"></el-table-column>
  222. <el-table-column prop="transactionBy" label="操作员" header-align="center" align="center" width="100"></el-table-column>
  223. <el-table-column prop="transactionDate" label="变动日期" header-align="center" align="center" width="160"></el-table-column>
  224. </el-table>
  225. <!-- 分页 -->
  226. <el-pagination
  227. style="margin-top: 10px"
  228. @size-change="sizeChangeHandle"
  229. @current-change="currentChangeHandle"
  230. :current-page="pageIndex"
  231. :page-sizes="[20, 50, 100, 200, 500]"
  232. :page-size="pageSize"
  233. :total="totalPage"
  234. layout="total, sizes, prev, pager, next, jumper">
  235. </el-pagination>
  236. </div>
  237. </template>
  238. <script>
  239. import { labelTransactionLogList, labelTransactionLogRetry } from '@/api/warehouse/labelTransactionLog.js'
  240. import { getSiteAndBuByUserName2 } from '@/api/qc/qc.js'
  241. import excel from '@/utils/excel-util.js' // 导入导出工具类
  242. export default {
  243. data() {
  244. return {
  245. height: window.innerHeight - 313,
  246. searchExpanded: true,
  247. searchData: {
  248. buNo: '',
  249. documentType: '',
  250. rollNo: '',
  251. partNo: '',
  252. partDesc: '',
  253. spec: '',
  254. startDate: '',
  255. endDate: '',
  256. transactionId: '',
  257. documentNo: '',
  258. orderNo: '',
  259. orderLineNo: '',
  260. batchNo: '',
  261. syncedFlag: ''
  262. },
  263. // 变动类型列表(不包含"变动明细")
  264. documentTypeList: [
  265. { label: '采购入库', value: '采购入库' },
  266. { label: '采购退货', value: '采购退货' },
  267. { label: '生产领料', value: '生产领料' },
  268. { label: '生产退仓', value: '生产退仓' },
  269. { label: '生产入库', value: '生产入库' },
  270. { label: '销售出库', value: '销售出库' },
  271. { label: '销售退货', value: '销售退货' },
  272. { label: '其他入库', value: '其他入库' },
  273. { label: '其他出库', value: '其他出库' },
  274. { label: '移库调拨', value: '移库调拨' }
  275. ],
  276. activeTab: 'all',
  277. dataList: [],
  278. dataListLoading: false,
  279. dataListSelections: [],
  280. pageIndex: 1,
  281. pageSize: 20,
  282. totalPage: 0,
  283. userBuList: [],
  284. // 导出列配置
  285. exportColumnList: [
  286. { columnProp: 'buNo', columnLabel: 'BU', headerAlign: 'center', align: 'center', columnWidth: 80 },
  287. { columnProp: 'transactionId', columnLabel: '变动单号', headerAlign: 'center', align: 'left', columnWidth: 150 },
  288. { columnProp: 'documentType', columnLabel: '变动类型', headerAlign: 'center', align: 'center', columnWidth: 100 },
  289. { columnProp: 'documentNo', columnLabel: '通知单号', headerAlign: 'center', align: 'left', columnWidth: 150 },
  290. { columnProp: 'orderNo', columnLabel: '关联单号', headerAlign: 'center', align: 'left', columnWidth: 150 },
  291. { columnProp: 'orderLineNo', columnLabel: '关联单行号', headerAlign: 'center', align: 'center', columnWidth: 100 },
  292. { columnProp: 'rollNo', columnLabel: '标签条码', headerAlign: 'center', align: 'left', columnWidth: 180 },
  293. { columnProp: 'rollQty', columnLabel: '变动数量', headerAlign: 'center', align: 'right', columnWidth: 100 },
  294. { columnProp: 'batchNo', columnLabel: '合约号码', headerAlign: 'center', align: 'left', columnWidth: 150 },
  295. { columnProp: 'partNo', columnLabel: '物料编码', headerAlign: 'center', align: 'left', columnWidth: 150 },
  296. { columnProp: 'partDesc', columnLabel: '物料名称', headerAlign: 'center', align: 'left', columnWidth: 180 },
  297. { columnProp: 'spec', columnLabel: '规格型号', headerAlign: 'center', align: 'left', columnWidth: 120 },
  298. { columnProp: 'warehouseId', columnLabel: '仓库编码', headerAlign: 'center', align: 'center', columnWidth: 100 },
  299. { columnProp: 'warehouseName', columnLabel: '仓库名称', headerAlign: 'center', align: 'left', columnWidth: 120 },
  300. { columnProp: 'locationId', columnLabel: '库位编码', headerAlign: 'center', align: 'center', columnWidth: 100 },
  301. { columnProp: 'locationName', columnLabel: '库位名称', headerAlign: 'center', align: 'left', columnWidth: 120 },
  302. { columnProp: 'syncedFlag', columnLabel: '传输状态', headerAlign: 'center', align: 'center', columnWidth: 90 },
  303. { columnProp: 'syncedTime', columnLabel: '传输时间', headerAlign: 'center', align: 'center', columnWidth: 160 },
  304. { columnProp: 'syncedErrorMsg', columnLabel: '传输消息', headerAlign: 'center', align: 'left', columnWidth: 150 },
  305. { columnProp: 'bomItemNo', columnLabel: 'Bom行号', headerAlign: 'center', align: 'center', columnWidth: 100 },
  306. { columnProp: 'transactionBy', columnLabel: '操作员', headerAlign: 'center', align: 'center', columnWidth: 100 },
  307. { columnProp: 'transactionDate', columnLabel: '变动日期', headerAlign: 'center', align: 'center', columnWidth: 160 }
  308. ]
  309. }
  310. },
  311. computed: {
  312. // 只有生产领料和生产退仓页签才显示Bom行号列
  313. showBomItemNo() {
  314. return this.activeTab === '生产领料' || this.activeTab === '生产退仓'
  315. }
  316. },
  317. mounted() {
  318. this.initBuList()
  319. this.initDefaultDate()
  320. this.getDataList()
  321. this.handleResize();
  322. window.addEventListener('resize', this.handleResize)
  323. },
  324. beforeDestroy() {
  325. window.removeEventListener('resize', this.handleResize)
  326. },
  327. methods: {
  328. handleResize() {
  329. this.$nextTick(() => {
  330. const windowHeight = window.innerHeight;
  331. const headerHeight = this.searchExpanded ? 340 : 220;
  332. this.height = windowHeight - headerHeight - 85;
  333. });
  334. },
  335. // 切换搜索区域展开/收起
  336. toggleSearchExpand() {
  337. this.searchExpanded = !this.searchExpanded;
  338. this.handleResize();
  339. },
  340. // 初始化BU列表
  341. initBuList() {
  342. const tempData = {
  343. username: this.$store.state.user.name
  344. }
  345. getSiteAndBuByUserName2(tempData).then(({ data }) => {
  346. if (data.code === 0) {
  347. this.userBuList = data.rows || []
  348. }
  349. })
  350. },
  351. // 初始化默认日期为今天
  352. initDefaultDate() {
  353. const today = this.formatDate(new Date())
  354. this.searchData.startDate = today + ' 00:00'
  355. this.searchData.endDate = today + ' 23:59'
  356. },
  357. // 格式化日期
  358. formatDate(date) {
  359. const year = date.getFullYear()
  360. const month = String(date.getMonth() + 1).padStart(2, '0')
  361. const day = String(date.getDate()).padStart(2, '0')
  362. return `${year}-${month}-${day}`
  363. },
  364. // 页签切换
  365. handleTabClick(tab) {
  366. this.pageIndex = 1
  367. this.getDataList()
  368. },
  369. // 查询列表
  370. getDataList() {
  371. this.dataListLoading = true
  372. const params = {
  373. buNo: this.searchData.buNo,
  374. documentType: this.activeTab === 'all' ? this.searchData.documentType : this.activeTab,
  375. rollNo: this.searchData.rollNo,
  376. partNo: this.searchData.partNo,
  377. partDesc: this.searchData.partDesc,
  378. spec: this.searchData.spec,
  379. startDate: this.searchData.startDate || '',
  380. endDate: this.searchData.endDate || '',
  381. transactionId: this.searchData.transactionId,
  382. documentNo: this.searchData.documentNo,
  383. orderNo: this.searchData.orderNo,
  384. orderLineNo: this.searchData.orderLineNo,
  385. batchNo: this.searchData.batchNo,
  386. syncedFlag: this.searchData.syncedFlag,
  387. page: this.pageIndex,
  388. limit: this.pageSize
  389. }
  390. labelTransactionLogList(params).then(({ data }) => {
  391. this.dataListLoading = false
  392. if (data && data.code === 0) {
  393. this.dataList = data.page.list || []
  394. this.totalPage = data.page.totalCount || 0
  395. } else {
  396. this.dataList = []
  397. this.totalPage = 0
  398. this.$message.error(data.msg || '查询失败')
  399. }
  400. }).catch(() => {
  401. this.dataListLoading = false
  402. this.dataList = []
  403. this.totalPage = 0
  404. })
  405. },
  406. // 重置查询条件
  407. resetSearch() {
  408. this.searchData = {
  409. buNo: this.userBuList.length > 0 ? this.userBuList[0].buNo : '',
  410. documentType: '',
  411. rollNo: '',
  412. partNo: '',
  413. partDesc: '',
  414. spec: '',
  415. startDate: '',
  416. endDate: '',
  417. transactionId: '',
  418. documentNo: '',
  419. orderNo: '',
  420. orderLineNo: '',
  421. batchNo: '',
  422. syncedFlag: ''
  423. }
  424. this.initDefaultDate()
  425. this.activeTab = 'all'
  426. this.pageIndex = 1
  427. this.getDataList()
  428. },
  429. // 导出数据
  430. exportData() {
  431. // 构造导出参数(与查询一致,但不分页)
  432. const exportParams = {
  433. buNo: this.searchData.buNo,
  434. documentType: this.activeTab === 'all' ? this.searchData.documentType : this.activeTab,
  435. rollNo: this.searchData.rollNo,
  436. partNo: this.searchData.partNo,
  437. partDesc: this.searchData.partDesc,
  438. spec: this.searchData.spec,
  439. startDate: this.searchData.startDate || '',
  440. endDate: this.searchData.endDate || '',
  441. transactionId: this.searchData.transactionId,
  442. documentNo: this.searchData.documentNo,
  443. orderNo: this.searchData.orderNo,
  444. orderLineNo: this.searchData.orderLineNo,
  445. batchNo: this.searchData.batchNo,
  446. syncedFlag: this.searchData.syncedFlag,
  447. userName: this.$store.state.user.name,
  448. page: 1,
  449. limit: 999999 // 使用大数字代替-1,SQL Server的FETCH子句不支持负数
  450. }
  451. // 根据当前页签生成文件名
  452. const tabName = this.activeTab === 'all' ? '全部' : this.activeTab
  453. const fileName = `标签变动记录_${tabName}_${this.dayjs().format('YYYYMMDDHHmmss')}.xlsx`
  454. // 使用excel工具类导出
  455. excel.exportTable({
  456. url: '/warehouse/labelTransactionLog/list', // 使用list接口,传limit=999999导出所有数据
  457. columnMapping: this.exportColumnList, // 使用导出列配置
  458. mergeSetting: [], // 需要合并的列
  459. params: exportParams, // 查询参数
  460. fileName: fileName, // 文件名
  461. rowFetcher: res => res.data.page.list, // 数据提取路径
  462. columnFormatter: [], // 列格式化
  463. dropColumns: [] // 不需要剔除的列
  464. })
  465. },
  466. // 每页数量变化
  467. sizeChangeHandle(val) {
  468. this.pageSize = val
  469. this.pageIndex = 1
  470. this.getDataList()
  471. },
  472. // 页码变化
  473. currentChangeHandle(val) {
  474. this.pageIndex = val
  475. this.getDataList()
  476. },
  477. // 多选变化
  478. selectionChangeHandle(val) {
  479. this.dataListSelections = val
  480. },
  481. // 批量手动重试
  482. batchRetryHandle() {
  483. if (this.dataListSelections.length === 0) {
  484. this.$message.warning('请选择要重试的记录!')
  485. return
  486. }
  487. // 校验:只能选择待传输(syncedFlag不为'已传输')且有错误消息的记录
  488. const invalidItems = this.dataListSelections.filter(item =>
  489. item.syncedFlag === '已传输'
  490. // || !item.syncedErrorMsg || item.syncedErrorMsg.trim() === ''
  491. )
  492. if (invalidItems.length > 0) {
  493. this.$message.warning('只能选择待传输的记录进行手动重试!')
  494. return
  495. }
  496. const count = this.dataListSelections.length
  497. this.$confirm(`确定要手动重试选中的 ${count} 条记录吗?`, '提示', {
  498. confirmButtonText: '确定',
  499. cancelButtonText: '取消',
  500. type: 'warning'
  501. }).then(() => {
  502. const loading = this.$loading({
  503. lock: true,
  504. text: `正在重试 ${count} 条记录,请稍候...`,
  505. spinner: 'el-icon-loading',
  506. background: 'rgba(0, 0, 0, 0.7)'
  507. })
  508. // 构造批量重试参数
  509. const retryList = this.dataListSelections.map(item => ({
  510. site: item.site,
  511. buNo: item.buNo,
  512. transactionId: item.transactionId
  513. }))
  514. // 调用批量重试接口
  515. labelTransactionLogRetry({ retryList }).then(({ data }) => {
  516. loading.close()
  517. if (data && data.code === 0) {
  518. const result = data.result || {}
  519. const successCount = result.successCount || 0
  520. const failureCount = result.failureCount || 0
  521. let message = `重试完成!成功:${successCount},失败:${failureCount}`
  522. if (successCount === count) {
  523. this.$message.success(message)
  524. } else if (successCount > 0) {
  525. this.$message.warning(message)
  526. } else {
  527. this.$message.error(message)
  528. }
  529. // 显示详细结果对话框
  530. if (result.details && result.details.length > 0) {
  531. this.showRetryResultDialog(result.details)
  532. }
  533. // 刷新列表
  534. this.getDataList()
  535. } else {
  536. this.$message.error(data.msg || '重试失败')
  537. }
  538. }).catch(error => {
  539. loading.close()
  540. this.$message.error('重试失败:' + (error.message || '网络错误'))
  541. })
  542. }).catch(() => {})
  543. },
  544. // 显示重试结果详情对话框
  545. showRetryResultDialog(details) {
  546. const successList = details.filter(d => d.status === 'success')
  547. const failureList = details.filter(d => d.status === 'failure')
  548. const errorList = details.filter(d => d.status === 'error')
  549. let messageHtml = '<div style="max-height: 400px; overflow-y: auto;">'
  550. if (successList.length > 0) {
  551. messageHtml += '<div style="margin-bottom: 15px;"><strong style="color: #67C23A;">成功 (' + successList.length + '):</strong><ul style="margin: 5px 0; padding-left: 20px;">'
  552. successList.forEach(item => {
  553. messageHtml += '<li>事务ID:' + item.transactionId + (item.u8CCode ? ' - U8单号:' + item.u8CCode : '') + '</li>'
  554. })
  555. messageHtml += '</ul></div>'
  556. }
  557. if (failureList.length > 0) {
  558. messageHtml += '<div style="margin-bottom: 15px;"><strong style="color: #E6A23C;">失败 (' + failureList.length + '):</strong><ul style="margin: 5px 0; padding-left: 20px;">'
  559. failureList.forEach(item => {
  560. messageHtml += '<li>事务ID:' + item.transactionId + ':' + (item.message || '未知错误') + '</li>'
  561. })
  562. messageHtml += '</ul></div>'
  563. }
  564. if (errorList.length > 0) {
  565. messageHtml += '<div><strong style="color: #F56C6C;">异常 (' + errorList.length + '):</strong><ul style="margin: 5px 0; padding-left: 20px;">'
  566. errorList.forEach(item => {
  567. messageHtml += '<li>事务ID:' + item.transactionId + ':' + (item.message || '未知异常') + '</li>'
  568. })
  569. messageHtml += '</ul></div>'
  570. }
  571. messageHtml += '</div>'
  572. this.$alert(messageHtml, '批量重试结果详情', {
  573. confirmButtonText: '确定',
  574. dangerouslyUseHTMLString: true
  575. })
  576. }
  577. }
  578. }
  579. </script>
  580. <style scoped>
  581. .mod-config {
  582. padding: 0px;
  583. }
  584. /* 搜索卡片样式 */
  585. .search-card {
  586. margin-bottom: 12px;
  587. border-radius: 8px;
  588. overflow: hidden;
  589. transition: all 0.3s ease;
  590. }
  591. .search-card:hover {
  592. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  593. }
  594. .search-card /deep/ .el-card__header {
  595. padding: 5px 20px;
  596. background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%);
  597. border-bottom: none;
  598. }
  599. .search-header {
  600. display: flex;
  601. justify-content: space-between;
  602. align-items: center;
  603. }
  604. .header-left {
  605. display: flex;
  606. align-items: center;
  607. color: #fff;
  608. }
  609. .header-left i {
  610. font-size: 16px;
  611. margin-right: 8px;
  612. }
  613. .header-title {
  614. font-size: 14px;
  615. font-weight: 600;
  616. }
  617. .header-right {
  618. display: flex;
  619. align-items: center;
  620. }
  621. .collapse-btn {
  622. color: #fff !important;
  623. font-size: 12px;
  624. padding: 4px 8px;
  625. }
  626. .collapse-btn:hover {
  627. background: rgba(255, 255, 255, 0.1);
  628. border-radius: 4px;
  629. }
  630. .collapse-btn i {
  631. margin-left: 4px;
  632. }
  633. /* 搜索表单样式 */
  634. .search-form {
  635. padding: 6px 0;
  636. min-height: 0;
  637. }
  638. /* 卡片主体样式 */
  639. .search-card /deep/ .el-card__body {
  640. padding: 10px;
  641. transition: all 0.3s ease;
  642. }
  643. /* 收起时的样式 */
  644. .search-card.collapsed /deep/ .el-card__body {
  645. padding: 10px 20px;
  646. }
  647. .search-form /deep/ .el-form-item {
  648. margin-bottom: 12px;
  649. }
  650. .search-form /deep/ .el-form-item__label {
  651. font-weight: 500;
  652. color: #606266;
  653. padding-bottom: 4px;
  654. }
  655. .search-form /deep/ .el-input__inner,
  656. .search-form /deep/ .el-textarea__inner {
  657. border-radius: 6px;
  658. border: 1px solid #DCDFE6;
  659. transition: all 0.3s ease;
  660. }
  661. .search-form /deep/ .el-input__inner:focus,
  662. .search-form /deep/ .el-textarea__inner:focus {
  663. border-color: #9ac3d0;
  664. box-shadow: 0 0 0 2px rgba(154, 195, 208, 0.1);
  665. }
  666. .search-form /deep/ .el-select {
  667. width: 100%;
  668. }
  669. .search-form /deep/ .el-date-editor.el-input,
  670. .search-form /deep/ .el-date-editor--daterange.el-input__inner {
  671. width: 100%;
  672. }
  673. .search-form /deep/ .el-date-editor--daterange {
  674. width: 100% !important;
  675. }
  676. .search-form /deep/ .el-range-input {
  677. width: 42%;
  678. }
  679. .search-form /deep/ .el-range-separator {
  680. width: 16%;
  681. padding: 0;
  682. }
  683. /* 操作按钮区域 */
  684. .search-actions {
  685. display: flex;
  686. justify-content: space-between;
  687. align-items: center;
  688. padding: 8px 0 2px 0;
  689. }
  690. /* 展开时显示上边框 */
  691. .search-card:not(.collapsed) .search-actions {
  692. border-top: 1px solid #f0f0f0;
  693. margin-top: 6px;
  694. }
  695. /* 收起时不显示上边框和上边距 */
  696. .search-card.collapsed .search-actions {
  697. border-top: none;
  698. margin-top: 0;
  699. padding-top: 0;
  700. }
  701. .action-left,
  702. .action-right {
  703. display: flex;
  704. gap: 8px;
  705. }
  706. .search-actions .el-button {
  707. border-radius: 4px;
  708. padding: 5px 10px;
  709. font-size: 12px;
  710. font-weight: 500;
  711. transition: all 0.3s ease;
  712. }
  713. /* 页签样式 */
  714. /deep/ .el-tabs__header {
  715. margin-bottom: 10px;
  716. }
  717. /deep/ .el-tabs__nav-wrap::after {
  718. height: 1px;
  719. }
  720. /deep/ .el-tabs__item {
  721. padding: 0 15px;
  722. height: 36px;
  723. line-height: 36px;
  724. }
  725. /deep/ .el-tabs__item.is-active {
  726. color: #17B3A3;
  727. }
  728. /deep/ .el-tabs__active-bar {
  729. background-color: #17B3A3;
  730. }
  731. /* 分页样式 */
  732. /deep/ .el-pagination {
  733. margin-top: 10px;
  734. padding: 0;
  735. }
  736. </style>