| | |
| | | <el-table-column label="发货车牌号" prop="shippingCarNumber" show-overflow-tooltip /> |
| | | <el-table-column label="快递公司" prop="expressCompany" show-overflow-tooltip /> |
| | | <el-table-column label="快递单号" prop="expressNumber" show-overflow-tooltip /> |
| | | <el-table-column label="审核状态" prop="status" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <el-tag :type="getApprovalStatusType(scope.row.status)"> |
| | | {{ getApprovalStatusText(scope.row.status) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="200" align="center"> |
| | | <el-table-column fixed="right" label="操作" width="220" align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | size="small" |
| | | :disabled="!isApproved(scope.row.status)" |
| | | type="primary" |
| | | :disabled="!canSupplement(scope.row)" |
| | | @click="openForm('edit', scope.row)">补充发货信息</el-button> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | size="small" |
| | | style="color: #67C23A" |
| | | @click="openDetail(scope.row)" |
| | | >详情</el-button> |
| | | <el-button |
| | | link |
| | | type="danger" |
| | | size="small" |
| | | type="danger" |
| | | :disabled="isApproving(scope.row.status)" |
| | | @click="handleDeleteSingle(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | v-model="form.type" |
| | | placeholder="请选择发货类型" |
| | | style="width: 100%" |
| | | disabled |
| | | @change="handleShippingTypeChange" |
| | | > |
| | | <el-option label="货车" value="货车" /> |
| | |
| | | |
| | | // 打开弹框 |
| | | const openForm = async (type, row) => { |
| | | // 补充发货信息:仅“审核通过”允许编辑 |
| | | if (type === 'edit' && row && !isApproved(row.status)) { |
| | | proxy.$modal.msgWarning("只有审核通过的数据才可以补充发货信息"); |
| | | return; |
| | | } |
| | | |
| | | operationType.value = type; |
| | | const baseUrl = import.meta.env.VITE_APP_BASE_API; |
| | | |
| | |
| | | }; |
| | | deliveryFileList.value = []; |
| | | } |
| | | |
| | | dialogFormVisible.value = true; |
| | | }; |
| | | |
| | |
| | | return statusStr === '审核通过' || statusStr === '3'; |
| | | }; |
| | | |
| | | // 检查是否可以补充发货信息(审核通过且没有发货车牌号或快递单号) |
| | | const canSupplement = (row) => { |
| | | // 如果有发货车牌号或快递单号,则不能补充 |
| | | if (row?.shippingCarNumber || row?.expressNumber) { |
| | | return false; |
| | | } |
| | | return true; |
| | | }; |
| | | |
| | | // 检查审核状态是否为"审核中" |
| | | const isApproving = (status) => { |
| | | if (status === null || status === undefined || status === '') { |