|
|
@@ -57,6 +57,14 @@
|
|
|
修改库存
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="viewRejectReason(scope.row)"
|
|
|
+ v-if="canShowButton(scope.row.status, OPERATION_PERMISSIONS.查看拒绝原因)"
|
|
|
+ >
|
|
|
+ 查看拒绝原因
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
link
|
|
|
@click="toDetail(scope.row)"
|
|
|
@@ -101,6 +109,40 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <!-- 查看拒绝原因弹窗 -->
|
|
|
+ <el-dialog v-model="rejectReasonDialogVisible" title="查看拒绝原因" width="600px">
|
|
|
+ <div class="reject-reason-content">
|
|
|
+ <div class="reject-reason-item">
|
|
|
+ <div class="reject-reason-label">团购名称:</div>
|
|
|
+ <div class="reject-reason-value">
|
|
|
+ {{ rejectReasonData.groupName || "--" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="reject-reason-item">
|
|
|
+ <div class="reject-reason-label">团购编号:</div>
|
|
|
+ <div class="reject-reason-value">
|
|
|
+ {{ rejectReasonData.groupNo || "--" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="reject-reason-item">
|
|
|
+ <div class="reject-reason-label">拒绝原因:</div>
|
|
|
+ <div class="reject-reason-value reject-reason-text">
|
|
|
+ {{
|
|
|
+ rejectReasonData.rejectReason ||
|
|
|
+ rejectReasonData.rejectionReason ||
|
|
|
+ rejectReasonData.refuseReason ||
|
|
|
+ rejectReasonData.auditReason ||
|
|
|
+ "暂无拒绝原因"
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="closeRejectReasonDialog"> 确定 </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -124,6 +166,16 @@ const formInventory: any = ref({
|
|
|
});
|
|
|
const rowData = ref<any>();
|
|
|
const activeName = ref("");
|
|
|
+// 查看拒绝原因弹窗相关
|
|
|
+const rejectReasonDialogVisible = ref(false);
|
|
|
+const rejectReasonData = ref<any>({
|
|
|
+ groupName: "",
|
|
|
+ groupNo: "",
|
|
|
+ rejectReason: "",
|
|
|
+ rejectionReason: "",
|
|
|
+ refuseReason: "",
|
|
|
+ auditReason: ""
|
|
|
+});
|
|
|
|
|
|
// 定义表单类型
|
|
|
interface RuleForm {
|
|
|
@@ -182,7 +234,9 @@ const OPERATION_PERMISSIONS = {
|
|
|
// 编辑:草稿、审核拒绝、已售罄、已下架、已结束
|
|
|
编辑: [STATUS.草稿, STATUS.审核拒绝, STATUS.已售罄, STATUS.已下架, STATUS.已结束],
|
|
|
// 删除:草稿、未开始、审核拒绝、已售罄、已结束
|
|
|
- 删除: [STATUS.草稿, STATUS.未开始, STATUS.审核拒绝, STATUS.已售罄, STATUS.已结束]
|
|
|
+ 删除: [STATUS.草稿, STATUS.未开始, STATUS.审核拒绝, STATUS.已售罄, STATUS.已结束],
|
|
|
+ // 查看拒绝原因:审核拒绝
|
|
|
+ 查看拒绝原因: [STATUS.审核拒绝]
|
|
|
} as const;
|
|
|
|
|
|
// 判断按钮是否显示的工具函数
|
|
|
@@ -269,7 +323,8 @@ const columns = reactive<ColumnProps<any>[]>([
|
|
|
},
|
|
|
{
|
|
|
prop: "status",
|
|
|
- label: "状态"
|
|
|
+ label: "状态",
|
|
|
+ width: 200
|
|
|
},
|
|
|
{ prop: "operation", label: "操作", fixed: "right", width: 330 }
|
|
|
]);
|
|
|
@@ -406,6 +461,30 @@ const closeDialog = () => {
|
|
|
newInventory: ""
|
|
|
};
|
|
|
};
|
|
|
+// 查看拒绝原因
|
|
|
+const viewRejectReason = (row: any) => {
|
|
|
+ rejectReasonData.value = {
|
|
|
+ groupName: row.groupName || "",
|
|
|
+ groupNo: row.groupNo || "",
|
|
|
+ rejectReason: row.rejectReason || "",
|
|
|
+ rejectionReason: row.rejectionReason || "",
|
|
|
+ refuseReason: row.refuseReason || "",
|
|
|
+ auditReason: row.auditReason || ""
|
|
|
+ };
|
|
|
+ rejectReasonDialogVisible.value = true;
|
|
|
+};
|
|
|
+// 关闭拒绝原因弹窗
|
|
|
+const closeRejectReasonDialog = () => {
|
|
|
+ rejectReasonDialogVisible.value = false;
|
|
|
+ rejectReasonData.value = {
|
|
|
+ groupName: "",
|
|
|
+ groupNo: "",
|
|
|
+ rejectReason: "",
|
|
|
+ rejectionReason: "",
|
|
|
+ refuseReason: "",
|
|
|
+ auditReason: ""
|
|
|
+ };
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@@ -435,4 +514,35 @@ const closeDialog = () => {
|
|
|
align-items: flex-start;
|
|
|
}
|
|
|
}
|
|
|
+.reject-reason-content {
|
|
|
+ padding: 20px 0;
|
|
|
+ .reject-reason-item {
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+ .reject-reason-label {
|
|
|
+ flex-shrink: 0;
|
|
|
+ min-width: 100px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #606266;
|
|
|
+ }
|
|
|
+ .reject-reason-value {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #303133;
|
|
|
+ word-break: break-word;
|
|
|
+ &.reject-reason-text {
|
|
|
+ min-height: 80px;
|
|
|
+ padding: 12px;
|
|
|
+ line-height: 1.6;
|
|
|
+ white-space: pre-wrap;
|
|
|
+ background-color: #f5f7fa;
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|