Przeglądaj źródła

fix 订单和提醒地区和数据接口对接

haveyou 1 rok temu
rodzic
commit
d8f5772ded

+ 52 - 76
src/components/CommonPage/ProSearch.vue

@@ -1,111 +1,87 @@
 <script setup>
-  import DictData from '@/components/DictData/index.vue';
-  import { ref, watch } from 'vue';
-  //组件的属性
-  let props = defineProps({
+import DictData from '@/components/DictData/index.vue';
+import { ref, watch } from 'vue';
+//组件的属性
+let props = defineProps({
     form: {
-      //表单参数详情
-      type: Object,
-      default: () => ({})
+        //表单参数详情
+        type: Object,
+        default: () => ({})
     },
     columns: {
-      type: Array,
-      default: () => []
+        type: Array,
+        default: () => []
     },
     marginBottom: {
-      type: String,
-      default: '10px'
+        type: String,
+        default: '10px'
     }
-  });
-  const emit = defineEmits(['update:form']);
+});
+const emit = defineEmits(['update:form']);
 
-  let model = ref({});
-  watch(
+let model = ref({});
+watch(
     () => props.form,
     (val) => {
-      model.value = val;
+        model.value = val;
     },
     { deep: true }
-  );
+);
 
-  watch(
+watch(
     () => model.value,
     (val) => {
-      let data = Object.assign(props.form, val);
-      emit('update:form', data);
+        let data = Object.assign(props.form, val);
+        emit('update:form', data);
     },
     { deep: true }
-  );
+);
 
-  //tag上 placeholder的显示
-  const getPlaceholder = (row) => {
+//tag上 placeholder的显示
+const getPlaceholder = (row) => {
     if (row.placeholder) return row.placeholder;
     if (typeof row.tag == 'object') return;
     return row.label;
-  };
-  //插槽函数
-  const slotFunction = (val) => {
+};
+//插槽函数
+const slotFunction = (val) => {
     return typeof val == 'function' ? val() : val;
-  };
+};
 
-  let formRef = ref(null);
+let formRef = ref(null);
 
-  defineExpose({
+defineExpose({
     form: props.model
-  });
+});
 </script>
 
 <style lang="scss">
-  .search-form {
+.search-form {
     ::v-deep .el-date-editor.el-input,
     .el-date-editor.el-input__wrapper {
-      width: 100%;
+        width: 100%;
     }
-  }
+}
 </style>
 
 <template>
-  <el-form
-    ref="formRef"
-    v-bind="$attrs"
-    :labelWidth="0"
-    :model="model"
-    class="search-form"
-  >
-    <el-row :gutter="12" justify="start">
-      <el-col
-        v-for="element in columns"
-        :span="element.span || 6"
-        :key="element.prop"
-      >
-        <el-form-item
-          class="custom-class"
-          :class="element.customClass"
-          :prop="element.prop"
-          v-bind="element.formItemAttrs"
-          :style="{ marginBottom: marginBottom }"
-        >
-          <template v-if="element.type == 'slot'">
-            <slot
-              :name="element.prop"
-              :data="model"
-              :item="element.tagAttrs"
-            ></slot>
-          </template>
-          <component
-            v-else
-            :is="element.tag"
-            v-bind="element.tagAttrs"
-            v-model="model[element.prop]"
-            :placeholder="getPlaceholder(element)"
-          >
-            <template v-for="(val, key, i) in element.tagSlots" :key="i" #[key]>
-              {{ slotFunction(val) }}
-            </template>
-          </component>
-        </el-form-item>
-      </el-col>
-      <slot></slot>
-    </el-row>
-  </el-form>
+    <el-form ref="formRef" v-bind="$attrs" :labelWidth="0" :model="model" class="search-form">
+        <el-row :gutter="12" justify="start">
+            <el-col v-for="element in columns" :span="element.span || 6" :key="element.prop">
+                <el-form-item class="custom-class" :class="element.customClass" :prop="element.prop"
+                    v-bind="element.formItemAttrs" :style="{ marginBottom: marginBottom }">
+                    <template v-if="element.type == 'slot'">
+                        <slot :name="element.prop" :data="model" :item="element.tagAttrs"></slot>
+                    </template>
+                    <component v-else :is="element.tag" v-bind="element.tagAttrs" v-model="model[element.prop]"
+                        :placeholder="getPlaceholder(element)">
+                        <template v-for="(val, key, i) in element.tagSlots" :key="i" #[key]>
+                            {{ slotFunction(val) }}
+                        </template>
+                    </component>
+                </el-form-item>
+            </el-col>
+            <slot></slot>
+        </el-row>
+    </el-form>
 </template>

+ 52 - 65
src/components/CommonPage/ProSearch2.vue

@@ -1,93 +1,80 @@
 <!-- 显示 4 列的搜索表单, 操作按钮所在的 el-col 自动计算 offset 保证一直靠右 -->
 <template>
-  <pro-form
-    :class="isShowLabel ? 'search-form' : 'search-form no-label-search'"
-    ref="proFormRef"
-    :model="form"
-    :items="items"
-    @updateValue="setFieldValue"
-    :grid="{ span: gridSpan }"
-    :rowProps="{ gutter: 12 }"
-    :footer="true"
-    :footer-props="{ labelWidth: '0px' }"
-    :footer-col-props="{
-      span: 4,
-      offset: 0
-    }"
-  >
-    <template #footer>
-      <div class="flex-1 flex items-center">
-        <el-button style="width: 90px" type="primary" @click="search"
-          >查询</el-button
-        >
-        <el-button style="width: 90px" type="info" @click="reset"
-          >重置</el-button
-        >
-      </div>
-    </template>
-  </pro-form>
+    <pro-form :class="isShowLabel ? 'search-form' : 'search-form no-label-search'" ref="proFormRef" :model="form"
+        :items="items" @updateValue="setFieldValue" :grid="{ span: gridSpan }" :rowProps="{ gutter: 12 }" :footer="true"
+        :footer-props="{ labelWidth: '0px' }" :footer-col-props="{
+            span: 4,
+            offset: 0
+        }">
+        <template #footer>
+            <div class="flex-1 flex items-center">
+                <el-button style="width: 90px" type="primary" @click="search">查询</el-button>
+                <el-button style="width: 90px" type="info" @click="reset">重置</el-button>
+            </div>
+        </template>
+    </pro-form>
 </template>
 
 <script setup>
-  import { ref, computed } from 'vue';
-  import { useFormData } from '@/utils/use-form-data';
-  import ProForm from '@/components/ProForm/index.vue';
-  import { ArrowDown, ArrowUp } from '@/components/icons';
-  /** 列数 */
-  const gridNumber = 6;
-  /** 列数转为 el-col 的 span 值 */
-  const gridSpan = 24 / gridNumber;
+import { ref, computed } from 'vue';
+import { useFormData } from '@/utils/use-form-data';
+import ProForm from '@/components/ProForm/index.vue';
+import { ArrowDown, ArrowUp } from '@/components/icons';
+/** 列数 */
+const gridNumber = 6;
+/** 列数转为 el-col 的 span 值 */
+const gridSpan = 24 / gridNumber;
 
-  const emit = defineEmits(['search']);
-  /** 表单实例 */
-  const proFormRef = ref(null);
+const emit = defineEmits(['search']);
+/** 表单实例 */
+const proFormRef = ref(null);
 
-  const props = defineProps({
+const props = defineProps({
     items: {
-      // 表单项
-      type: Array,
-      default: () => []
+        // 表单项
+        type: Array,
+        default: () => []
     },
     initKeys: {
-      // 初始化时需要显示的字段
-      type: Object,
-      default: () => ({})
+        // 初始化时需要显示的字段
+        type: Object,
+        default: () => ({})
     },
     offset: {
-      // 操作按钮的 offset 值
-      type: Number,
-      default: 0
+        // 操作按钮的 offset 值
+        type: Number,
+        default: 0
     },
     isShowLabel: {
-      // 是否显示 label
-      type: Boolean,
-      default: true
+        // 是否显示 label
+        type: Boolean,
+        default: true
     }
-  });
+});
 
-  /** 表单数据 */
-  const [form, resetFields, assignFields, setFieldValue] = useFormData({
+/** 表单数据 */
+const [form, resetFields, assignFields, setFieldValue] = useFormData({
     ...props.initKeys
-  });
+});
 
-  /** 搜索 */
-  const search = () => {
+/** 搜索 */
+const search = () => {
     emit('search', { ...form });
-  };
+};
 
-  function setData(data) {
+function setData(data) {
     Object.keys(data).forEach((key) => {
-      setFieldValue(key, data[key]);
+        setFieldValue(key, data[key]);
     });
-  }
+}
 
-  /** 重置 */
-  const reset = () => {
+/** 重置 */
+const reset = () => {
     resetFields();
     search();
-  };
+};
 
-  defineExpose({
+defineExpose({
     setData
-  });
+});
 </script>

+ 187 - 179
src/styles/index.scss

@@ -1,302 +1,310 @@
 /** 全局样式 */
-@use 'element-plus/theme-chalk/src/mixins/function.scss'as *;
-@use './transition.scss'as *;
+@use 'element-plus/theme-chalk/src/mixins/function.scss' as *;
+@use './transition.scss' as *;
 
 .ele-page,
 .ele-admin-tabs {
-  --ele-page-padding: 12px;
+    --ele-page-padding: 12px;
 }
 
 * {
-  outline: none;
+    outline: none;
 }
 
 html {
-  overflow-x: hidden;
-  height: 100%;
+    overflow-x: hidden;
+    height: 100%;
 }
 
 body {
-  margin: 0;
-  line-height: 1.58;
-  color: getCssVar('text-color', 'regular');
-  font-size: getCssVar('font-size', 'base');
-  font-family: getCssVar('font-family');
-  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-  overflow-x: hidden;
-  overflow-y: auto;
-  height: 100%;
-  width: 100% !important;
+    margin: 0;
+    line-height: 1.58;
+    color: getCssVar('text-color', 'regular');
+    font-size: getCssVar('font-size', 'base');
+    font-family: getCssVar('font-family');
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+    overflow-x: hidden;
+    overflow-y: auto;
+    height: 100%;
+    width: 100% !important;
 }
 
 /* 按钮加图标减少间距 */
 .ele-btn-icon.el-button,
 .ele-btn-icon.el-button.is-round {
-  padding-left: 12px;
-  padding-right: 12px;
-
-  &>.el-icon {
-    margin-left: -2px;
-    margin-right: -2px;
-  }
-
-  &.el-button--small {
-    padding-left: 6px;
-    padding-right: 6px;
-  }
-
-  &.el-button--large {
-    padding-left: 16px;
-    padding-right: 16px;
-  }
+    padding-left: 12px;
+    padding-right: 12px;
+
+    &>.el-icon {
+        margin-left: -2px;
+        margin-right: -2px;
+    }
+
+    &.el-button--small {
+        padding-left: 6px;
+        padding-right: 6px;
+    }
+
+    &.el-button--large {
+        padding-left: 16px;
+        padding-right: 16px;
+    }
 }
 
 .demo-timeline {
-  .el-timeline {
-    padding: 0;
-    padding-left: 20px;
-  }
+    .el-timeline {
+        padding: 0;
+        padding-left: 20px;
+    }
 }
 
 //订单详情
 .order-detail {
-  .el-step.is-center .el-step__description {
-    padding: 0;
-  }
+    .el-step.is-center .el-step__description {
+        padding: 0;
+    }
 }
 
 /* 级联选择器增加高度 */
 .ele-popper-higher .el-cascader-menu__wrap.el-scrollbar__wrap {
-  height: 280px;
+    height: 280px;
 }
 
 /* 间距组件样式优化 */
 .el-space--horizontal>.el-space__item:last-child {
-  margin-right: 0 !important;
+    margin-right: 0 !important;
 }
 
 .el-space--vertical>.el-space__item:last-child {
-  padding-bottom: 0 !important;
+    padding-bottom: 0 !important;
 }
 
 /* echarts */
 .echarts>div>div {
-  max-width: 100%;
-  overflow: hidden;
+    max-width: 100%;
+    overflow: hidden;
 }
 
 /* 小屏幕时分页去掉一些组件 */
 @media screen and (max-width: 768px) {
-  .ele-pro-table .el-pagination {
+    .ele-pro-table .el-pagination {
 
-    .el-pagination__sizes,
-    .el-pagination__jump {
-      display: none;
+        .el-pagination__sizes,
+        .el-pagination__jump {
+            display: none;
+        }
     }
-  }
 }
 
 /* 表单验证气泡形式 */
 .pro-form-error-popper.el-form-item>.el-form-item__content {
-  &>.el-form-item__error {
-    position: absolute;
-    left: 0;
-    top: auto;
-    bottom: calc(100% + 3px);
-    width: max-content;
-    color: #fff;
-    font-size: 12px;
-    background: getCssVar('color-danger');
-    transition: all 0.2s;
-    padding: 4px 6px;
-    border-radius: 3px;
-    z-index: 999;
-    transform: none;
-
-    &:after {
-      content: '';
-      border: 4px solid transparent;
-      border-top-color: getCssVar('color-danger');
-      position: absolute;
-      left: 8px;
-      bottom: -7px;
+    &>.el-form-item__error {
+        position: absolute;
+        left: 0;
+        top: auto;
+        bottom: calc(100% + 3px);
+        width: max-content;
+        color: #fff;
+        font-size: 12px;
+        background: getCssVar('color-danger');
+        transition: all 0.2s;
+        padding: 4px 6px;
+        border-radius: 3px;
+        z-index: 999;
+        transform: none;
+
+        &:after {
+            content: '';
+            border: 4px solid transparent;
+            border-top-color: getCssVar('color-danger');
+            position: absolute;
+            left: 8px;
+            bottom: -7px;
+        }
     }
-  }
 }
 
 //上传组件样式
 .upload-image {
-  margin-right: 10px;
+    margin-right: 10px;
 
-  .el-upload {
-    width: 100px;
-    height: 100px;
-  }
+    .el-upload {
+        width: 100px;
+        height: 100px;
+    }
 }
 
 //表单下编辑器样式
 .simple-form {
-  .tox-tinymce {
-    width: 100% !important;
-  }
+    .tox-tinymce {
+        width: 100% !important;
+    }
 }
 
 //table操作按钮
 .ele-pro-table {
-  .el-table .cell.el-tooltip {
-    white-space: wrap;
-  }
-
-  .el-button {
-    margin-right: 8px;
-    &:nth-child(even){
-        margin-right: 0;
+    .el-table .cell.el-tooltip {
+        white-space: wrap;
     }
-  }
-
-  .el-button+.el-button {
-    margin-left: 0;
-  }
-
-  .el-text {
-    align-self: flex-start;
-    text-align: left;
-  }
-
-  //toolbar的状态选择
-  .ele-toolbar-body {
-    .el-radio-group {
-      position: relative;
-      top: -3px;
+
+    // .action-btns {
+    //     .el-button {
+    //         margin-right: 8px;
+    //         margin-left: 0;
+    //         &:nth-child(even) {
+    //             margin-right: 0;
+    //         }
+    //     }
+    //     .el-button+.el-button {
+    //         margin-left: 0;
+    //     }
+    // }
+    .el-button {
+        margin-right: 5px;
+    }
+    .el-button+.el-button {
+        margin-left: 0;
     }
 
-    .el-radio-button {
-      min-width: 120px;
+    .el-text {
+        align-self: flex-start;
+        text-align: left;
     }
 
-    .el-radio-button__inner {
-      width: 100%;
-      padding: 9px 15px;
+    //toolbar的状态选择
+    .ele-toolbar-body {
+        .el-radio-group {
+            position: relative;
+            top: -3px;
+        }
+
+        .el-radio-button {
+            min-width: 120px;
+        }
+
+        .el-radio-button__inner {
+            width: 100%;
+            padding: 9px 15px;
+        }
     }
-  }
 
-  .el-tag__content {
-    display: flex;
-    width: 100%;
-  }
+    .el-tag__content {
+        display: flex;
+        width: 100%;
+    }
 }
 
 //搜索况下时间选择框的样式
 .search-form {
-  .el-form-item {
-    margin-bottom: 12px;
-    position: relative;
-
-    .el-form-item__label {
-      position: absolute;
-      top: -10px;
-      right: 12px;
-      font-size: 14px;
-      display: inline-block;
-      z-index: 2;
-      height: 18px;
-      line-height: 18px;
-      padding: 0;
-      width: fit-content !important;
+    .el-form-item {
+        margin-bottom: 12px;
+        position: relative;
+
+        .el-form-item__label {
+            position: absolute;
+            top: -10px;
+            right: 12px;
+            font-size: 14px;
+            display: inline-block;
+            z-index: 2;
+            height: 18px;
+            line-height: 18px;
+            padding: 0;
+            width: fit-content !important;
+        }
     }
-  }
 
-  //不显示label
-  &.no-label-search .el-form-item .el-form-item__label {
-    display: none;
-  }
+    //不显示label
+    &.no-label-search .el-form-item .el-form-item__label {
+        display: none;
+    }
 
-  .el-date-editor.el-input,
-  .el-date-editor.el-input__wrapper {
-    width: 100%
-  }
+    .el-date-editor.el-input,
+    .el-date-editor.el-input__wrapper {
+        width: 100%
+    }
 }
 
 /* 主题切换过渡 */
 ::view-transition-old(root),
 ::view-transition-new(root) {
-  animation: none;
-  mix-blend-mode: normal;
+    animation: none;
+    mix-blend-mode: normal;
 }
 
 ::view-transition-new(root),
 html.dark::view-transition-old(root) {
-  z-index: 1;
+    z-index: 1;
 }
 
 ::view-transition-old(root),
 html.dark::view-transition-new(root) {
-  z-index: 2147483646;
+    z-index: 2147483646;
 }
 
 html.disabled-transition,
 html.disabled-transition :not(.view-transition-trigger) * {
-  transition: none !important;
+    transition: none !important;
 }
 
 
 //基础信息展示样式
 .common-row {
-  padding-left: 12px;
+    padding-left: 12px;
 
-  .el-col {
-    line-height: 32px;
-    margin-bottom: 6px;
-  }
+    .el-col {
+        line-height: 32px;
+        margin-bottom: 6px;
+    }
 }
 
 //表单中基础样式
 .el-form {
-  .is-without-controls {
-    .el-input .el-input__wrapper {
-      padding-left: 10px;
+    .is-without-controls {
+        .el-input .el-input__wrapper {
+            padding-left: 10px;
+        }
+
+        .el-input-number .el-input__inner {
+            text-align: left !important;
+        }
     }
-
-    .el-input-number .el-input__inner {
-      text-align: left !important;
-    }
-  }
 }
 
 .common-title {
-  font-size: 18px;
-  font-weight: 550;
+    font-size: 18px;
+    font-weight: 550;
 }
 
 .el-statistic {
-  .el-statistic__head {
-    font-size: 14px;
-  }
+    .el-statistic__head {
+        font-size: 14px;
+    }
 }
 
 
 .common-section {
-  padding: 12px 30px;
-  background-color: #fcfbfa;
-  border-radius: 6px;
+    padding: 12px 30px;
+    background-color: #fcfbfa;
+    border-radius: 6px;
 
-  .el-form-item {
-    margin-bottom: 10px;
-  }
+    .el-form-item {
+        margin-bottom: 10px;
+    }
 }
 
 
 .custom-select {
-  .el-select__wrapper {
-    .el-select__placeholder {
-      position: relative;
-      white-space: pre-wrap;
-      top: 0;
-      transform: translateY(0);
+    .el-select__wrapper {
+        .el-select__placeholder {
+            position: relative;
+            white-space: pre-wrap;
+            top: 0;
+            transform: translateY(0);
+        }
     }
-  }
 
-  .el-select-dropdown .el-select-dropdown__item {
-    white-space: normal;
-  }
-}
+    .el-select-dropdown .el-select-dropdown__item {
+        white-space: normal;
+    }
+}

+ 26 - 92
src/views/recycle/remindArea/components/page-edit.vue

@@ -1,106 +1,40 @@
 <!-- 搜索表单 -->
 <template>
-  <simple-form-modal
-    :title="title"
-    :items="formItems"
-    ref="editRef"
-    :baseUrl="baseUrl"
-    @success="(data) => emit('success', data)"
-  ></simple-form-modal>
+    <simple-form-modal title="新增提醒地区" :items="formItems" ref="editRef" :baseUrl="baseUrl"
+        @success="(data) => emit('success', data)"></simple-form-modal>
 </template>
 
 <script setup>
-  import { reactive, ref, defineEmits, getCurrentInstance } from 'vue';
-  import { useFormData } from '@/utils/use-form-data';
-  import SimpleFormModal from '@/components/CommonPage/SimpleFormModal.vue';
-  const { proxy } = getCurrentInstance();
+import { reactive, ref, defineEmits } from 'vue';
+import SimpleFormModal from '@/components/CommonPage/SimpleFormModal.vue';
 
-  //获取省市
-  const provinceList = ref([]);
-  const cityList = ref([]);
-  const title = ref('新增高校');
-  const emit = defineEmits(['success']);
+//获取省市
+const emit = defineEmits(['success']);
 
-  const formItems = computed(() => {
+const formItems = computed(() => {
     return [
-      { type: 'input', label: '学校名称', prop: 'schoolName', required: true },
-      {
-        type: 'select',
-        label: '省份',
-        prop: 'provinceId',
-        required: true,
-        options: provinceList.value.map((d) => {
-          return { label: d.district, value: d.id };
-        }),
-        props: {
-          filterable: true,
-          onChange: (val) => {
-            getProviceList(val).then((res) => {
-              cityList.value = res.data.data;
-            });
-          }
-        }
-      },
-      {
-        type: 'select',
-        label: '所在市',
-        prop: 'cityId',
-        required: true,
-        options: cityList.value.map((d) => {
-          return { label: d.district, value: d.id };
-        }),
-        props: {
-          filterable: true
-        }
-      },
-      {
-        type: 'dictSelect',
-        label: '办学层次',
-        prop: 'schoolLevel',
-        props: { code: 'school_level' },
-        required: true
-      },
-      {
-        type: 'input',
-        label: '主管部门',
-        prop: 'departmentName',
-        required: true
-      },
-      {
-        type: 'dictSelect',
-        label: '标记',
-        prop: 'schoolTag',
-        props: { code: 'school_tag' },
-        required: true
-      }
+        { type: 'input', label: '提醒地区', prop: 'areaInfo', required: true },
+        {
+            type: 'dictRadio',
+            label: '状态',
+            prop: 'useStatus',
+            props: { code: 'use_status' },
+            required: true
+        },
     ];
-  });
-  //默认值
-  const baseUrl = reactive({
-    add: '/baseinfo/schoolInfo/save',
-    update: '/baseinfo/schoolInfo/edit'
-  });
-  const formData = ref({ schoolTag: '1' });
+});
+//默认值
+const baseUrl = reactive({
+    add: '/book/checkWarn/addCheckWarnArea',
+    update: ''
+});
+const formData = ref({ useStatus: '1' });
+const editRef = ref(null);
 
-  const editRef = ref(null);
-
-  function handleOpen(data = {}) {
-    title.value = data && data.id ? '编辑高校' : '新增高校';
-    formData.value = Object.assign(formData.value, data || {});
-    getProviceList().then((res) => {
-      provinceList.value = res.data.data;
-    });
-    if (data && data.provinceId) {
-      getProviceList(data.provinceId).then((res) => {
-        cityList.value = res.data.data;
-      });
-    }
+function handleOpen() {
     editRef.value?.handleOpen(formData.value);
-  }
+}
 
-  function getProviceList(id = 1) {
-    return proxy.$http.get(`/baseinfo/districtInfo/findInfo/${id}`);
-  }
 
-  defineExpose({ handleOpen });
+defineExpose({ handleOpen });
 </script>

+ 40 - 57
src/views/recycle/remindArea/components/page-search.vue

@@ -1,74 +1,57 @@
 <!-- 搜索表单 -->
 <template>
-  <ele-card :body-style="{ paddingBottom: '8px' }">
-    <ProSearch
-      :items="formItems"
-      ref="searchRef"
-      @search="search"
-      :initKeys="initKeys"
-    ></ProSearch>
-  </ele-card>
+    <ele-card :body-style="{ paddingBottom: '8px' }">
+        <ProSearch :items="formItems" ref="searchRef" @search="search" :initKeys="initKeys"></ProSearch>
+    </ele-card>
 </template>
 
 <script setup>
-  import { reactive, ref, defineEmits } from 'vue';
-  import ProSearch from '@/components/CommonPage/ProSearch2.vue';
+import { reactive, ref, defineEmits } from 'vue';
+import ProSearch from '@/components/CommonPage/ProSearch2.vue';
 
-  let { proxy } = getCurrentInstance();
-  const emit = defineEmits(['search']);
-  const godownList = ref([]);
+let { proxy } = getCurrentInstance();
+const emit = defineEmits(['search']);
+const godownList = ref([]);
 
-  const formItems = computed(() => {
+const formItems = computed(() => {
     return [
-      { type: 'input', label: '关键字', prop: 'keywords' },
-      {
-        type: 'select',
-        label: '收货仓库',
-        prop: 'godownId',
-        options: godownList.value.map((d) => {
-          return { label: d.godownName, value: d.id };
-        }),
-        props: {
-          filterable: true
+        { type: 'input', label: '关键字', prop: 'areaInfoLike' },
+        {
+            type: 'datetimerange',
+            label: '添加时间',
+            prop: 'time',
+            props: {
+                format: 'YYYY-MM-DD HH:mm:ss',
+                valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                onChange: (value) => {
+                    initKeys.createTimeStart = value ? value[0] : '';
+                    initKeys.createTimeEnd = value ? value[1] : '';
+                    searchRef.value?.setData(initKeys);
+                }
+            },
+            colProps: {
+                span: 6
+            }
         }
-      },
-      {
-        type: 'datetimerange',
-        label: '建单时间',
-        prop: 'time',
-        props: {
-          format: 'YYYY-MM-DD HH:mm:ss',
-          valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          onChange: (value) => {
-            initKeys.startTime = value ? value[0] : '';
-            initKeys.endTime = value ? value[1] : '';
-            searchRef.value?.setData(initKeys);
-          }
-        },
-        colProps: {
-          span: 6
-        }
-      }
     ];
-  });
+});
 
-  function getStoreList(name = '') {
+function getStoreList(name = '') {
     return proxy.$http.post(`/baseinfo/godown/searchGodown?name=${name}`);
-  }
-  getStoreList().then((res) => {
+}
+getStoreList().then((res) => {
     godownList.value = res.data.data;
-  });
+});
 
-  const initKeys = reactive({
-    keywords: '',
-    godownId: '',
-    startTime: '',
-    endTime: ''
-  });
+const initKeys = reactive({
+    createTimeStart: '',
+    createTimeEnd: '',
+    areaInfoLike: ''
+});
 
-  const searchRef = ref(null);
-  /** 搜索 */
-  const search = (data) => {
+const searchRef = ref(null);
+/** 搜索 */
+const search = (data) => {
     emit('search', { ...data });
-  };
+};
 </script>

+ 104 - 122
src/views/recycle/remindArea/index.vue

@@ -1,155 +1,137 @@
 <template>
-  <ele-page flex-table>
-    <page-search @search="reload"></page-search>
+    <ele-page flex-table>
+        <page-search @search="reload"></page-search>
 
-    <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns">
-      <template #toolbar>
-        <el-button
-          type="primary"
-          plain
-          :icon="PlusOutlined"
-          v-permission="'recycle:remindArea:add'"
-          @click="handleUpdate()"
-        >
-          新增
-        </el-button>
-        <el-button
-          type="danger"
-          plain
-          :icon="DeleteOutlined"
-          v-permission="'recycle:remindArea:batchDelete'"
-          @click="handleBatchDelete()"
-        >
-          批量删除
-        </el-button>
-      </template>
+        <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns">
+            <template #toolbar>
+                <el-button type="primary" plain :icon="PlusOutlined" v-permission="'recycle:remindArea:add'"
+                    @click="handleUpdate()">
+                    新增
+                </el-button>
+                <el-button type="danger" plain :icon="DeleteOutlined" v-permission="'recycle:remindArea:batchDelete'"
+                    @click="handleBatchDelete()">
+                    批量删除
+                </el-button>
+            </template>
 
-      <template #action="{ row }">
-        <div>
-          <el-button
-            type="primary"
-            link
-            v-permission="'recycle:remindArea:update'"
-            @click="handleUpdate(row)"
-          >
-            编辑
-          </el-button>
-          <el-button
-            type="danger"
-            link
-            v-permission="'recycle:remindArea:delete'"
-            @click="handleBatchDelete(row)"
-          >
-            删除
-          </el-button>
-          <el-button
-            :type="row.schoolTag == 2 ? 'success' : 'warning'"
-            link
-            v-permission="'recycle:remindArea:changeStatus'"
-            @click="handleChangeStatus(row)"
-          >
-            {{ row.schoolTag == 2 ? '启用' : '停用' }}
-          </el-button>
-        </div>
-      </template>
-    </common-table>
+            <template #action="{ row }">
+                <div>
+                    <el-button type="primary" link v-permission="'recycle:remindArea:update'"
+                        @click="handleUpdate(row)">
+                        编辑
+                    </el-button>
+                    <el-button type="danger" link v-permission="'recycle:remindArea:delete'" @click="handleDelete(row)">
+                        删除
+                    </el-button>
+                    <el-button :type="row.useStatus == 2 ? 'success' : 'warning'" link
+                        v-permission="'recycle:remindArea:changeStatus'" @click="handleChangeStatus(row)">
+                        {{ row.useStatus == 2 ? '启用' : '停用' }}
+                    </el-button>
+                </div>
+            </template>
+        </common-table>
 
-    <page-edit ref="editRef" @success="reload()"></page-edit>
-  </ele-page>
+        <page-edit ref="editRef" @success="reload()"></page-edit>
+    </ele-page>
 </template>
 
 <script setup>
-  import { ref, reactive } from 'vue';
-  import { ElMessageBox } from 'element-plus/es';
-  import { EleMessage } from 'ele-admin-plus/es';
-  import { PlusOutlined, DeleteOutlined } from '@/components/icons';
-  import CommonTable from '@/components/CommonPage/CommonTable.vue';
-  import pageSearch from './components/page-search.vue';
-  import pageEdit from './components/page-edit.vue';
-  import { useDictData } from '@/utils/use-dict-data';
-  import { useRouter } from 'vue-router';
-  import request from '@/utils/request';
+import { ref, reactive, getCurrentInstance } from 'vue';
+import { PlusOutlined, DeleteOutlined } from '@/components/icons';
+import CommonTable from '@/components/CommonPage/CommonTable.vue';
+import pageSearch from './components/page-search.vue';
+import pageEdit from './components/page-edit.vue';
+import { useDictData } from '@/utils/use-dict-data';
+import request from '@/utils/request';
+const { proxy } = getCurrentInstance();
+defineOptions({ name: 'remindArea' });
 
-  defineOptions({ name: 'remindArea' });
-  const [schoolLevelDicts] = useDictData(['school_level']);
-
-  /** 表格列配置 */
-  const columns = ref([
+/** 表格列配置 */
+const columns = ref([
     {
-      type: 'selection',
-      columnKey: 'selection',
-      width: 50,
-      align: 'center',
-      fixed: 'left'
+        type: 'selection',
+        columnKey: 'selection',
+        width: 50,
+        align: 'center',
+        fixed: 'left'
     },
     {
-      label: '提醒地区',
-      prop: 'schoolName',
-      align: 'center',
-      minWidth: 140
+        label: '提醒地区',
+        prop: 'areaInfo',
+        align: 'center',
     },
-    { label: '推送人', prop: 'provinceName', align: 'center' },
+    { label: '推送人', prop: 'createName', align: 'center' },
     {
-      label: '状态',
-      prop: 'schoolLevel',
-      align: 'center',
-      formatter: (row) =>
-        schoolLevelDicts.value.find((d) => d.dictValue == row.schoolLevel)
-          ?.dictLabel
+        label: '状态',
+        prop: 'schoolLevel',
+        align: 'center',
+        formatter: (row) => "生效中"
     },
-    { label: '需提醒仓库', prop: 'cityName', align: 'center' },
     { label: '添加时间', prop: 'createTime', align: 'center' },
     {
-      columnKey: 'action',
-      label: '操作',
-      width: 240,
-      align: 'center',
-      slot: 'action'
+        columnKey: 'action',
+        label: '操作',
+        width: 240,
+        align: 'center',
+        slot: 'action'
     }
-  ]);
+]);
 
-  let router = useRouter();
-  /** 页面组件实例 */
-  const pageRef = ref(null);
+/** 页面组件实例 */
+const pageRef = ref(null);
 
-  const pageConfig = reactive({
-    pageUrl: '/baseinfo/schoolInfo/list',
-    exportUrl: '/baseinfo/schoolInfo/export',
+const pageConfig = reactive({
+    pageUrl: '/book/checkWarn/getAreaPageList',
+    exportUrl: '',
     fileName: '审核提醒地区',
     cacheKey: 'remindAreaTable'
-  });
+});
 
-  //刷新表格
-  function reload(where) {
+//刷新表格
+function reload(where) {
+    delete where.time;
     pageRef.value?.reload(where);
-  }
+}
 
-  //批量删除
-  function handleBatchDelete(row) {
+//批量删除
+function handleBatchDelete(row) {
     let selections = row ? [row] : pageRef.value?.getSelections();
-    let ids = selections.map((item) => item.id).join(',');
-    let url = `/baseinfo/schoolInfo/removeById/${ids}`;
+    let ids = selections.map((item) => item.id);
+    let url = `/book/checkWarn/deleteCheckWarnArea`;
     pageRef.value?.operatBatch({
-      title: '确认删除?',
-      method: 'post',
-      url,
-      row
+        title: '确认删除?',
+        method: 'post',
+        url,
+        row,
+        data: {
+            idList: ids
+        }
     });
-  }
-  //启用停用
-  function handleChangeStatus(row) {
+}
+//启用停用
+function handleChangeStatus(row) {
     let message = row.useStatus == 1 ? '确认停用?' : '确认启用?';
-    let data = JSON.parse(JSON.stringify(row));
-    data.useStatus = row.useStatus == 1 ? 0 : 1;
+    let data = {
+        id: row.id,
+        useStatus: row.useStatus == 1 ? 2 : 1
+    }
+    pageRef.value?.messageBoxConfirm({
+        message,
+        fetch: () => request.post('/book/checkWarn/setAreaStatus', data)
+    });
+}
+
+//删除
+function handleDelete(row){
     pageRef.value?.messageBoxConfirm({
-      message,
-      fetch: () => request.post('/baseinfo/godown/update', data)
+        message: '确认删除?',
+        fetch: () => proxy.$http.post(`/book/checkWarn/deleteCheckWarnArea`, { idList: [row.id] })
     });
-  }
+}
 
-  //编辑页面
-  const editRef = ref(null);
-  function handleUpdate(row) {
+//编辑页面
+const editRef = ref(null);
+function handleUpdate(row) {
     editRef.value?.handleOpen(row);
-  }
+}
 </script>

+ 45 - 91
src/views/recycle/remindBooks/components/page-edit.vue

@@ -1,106 +1,60 @@
 <!-- 搜索表单 -->
 <template>
-  <simple-form-modal
-    :title="title"
-    :items="formItems"
-    ref="editRef"
-    :baseUrl="baseUrl"
-    @success="(data) => emit('success', data)"
-  ></simple-form-modal>
+    <simple-form-modal :title="title" :items="formItems" ref="editRef" :baseUrl="baseUrl"
+        @success="(data) => emit('success', data)" labelWidth="120px"></simple-form-modal>
 </template>
 
 <script setup>
-  import { reactive, ref, defineEmits, getCurrentInstance } from 'vue';
-  import { useFormData } from '@/utils/use-form-data';
-  import SimpleFormModal from '@/components/CommonPage/SimpleFormModal.vue';
-  const { proxy } = getCurrentInstance();
+import { reactive, ref, defineEmits, getCurrentInstance } from 'vue';
+import { useFormData } from '@/utils/use-form-data';
+import SimpleFormModal from '@/components/CommonPage/SimpleFormModal.vue';
+const { proxy } = getCurrentInstance();
 
-  //获取省市
-  const provinceList = ref([]);
-  const cityList = ref([]);
-  const title = ref('新增高校');
-  const emit = defineEmits(['success']);
+//获取省市
+const title = ref('新增提醒书籍');
+const emit = defineEmits(['success']);
 
-  const formItems = computed(() => {
+const formItems = computed(() => {
     return [
-      { type: 'input', label: '学校名称', prop: 'schoolName', required: true },
-      {
-        type: 'select',
-        label: '省份',
-        prop: 'provinceId',
-        required: true,
-        options: provinceList.value.map((d) => {
-          return { label: d.district, value: d.id };
-        }),
-        props: {
-          filterable: true,
-          onChange: (val) => {
-            getProviceList(val).then((res) => {
-              cityList.value = res.data.data;
-            });
-          }
-        }
-      },
-      {
-        type: 'select',
-        label: '所在市',
-        prop: 'cityId',
-        required: true,
-        options: cityList.value.map((d) => {
-          return { label: d.district, value: d.id };
-        }),
-        props: {
-          filterable: true
-        }
-      },
-      {
-        type: 'dictSelect',
-        label: '办学层次',
-        prop: 'schoolLevel',
-        props: { code: 'school_level' },
-        required: true
-      },
-      {
-        type: 'input',
-        label: '主管部门',
-        prop: 'departmentName',
-        required: true
-      },
-      {
-        type: 'dictSelect',
-        label: '标记',
-        prop: 'schoolTag',
-        props: { code: 'school_tag' },
-        required: true
-      }
+        { type: 'input', label: 'ISBN', prop: 'isbn', required: true },
+        {
+            type: 'select',
+            label: '需要提醒的仓库',
+            prop: 'godownId',
+            required: true,
+            props: {
+                filterable: true,
+            },
+            options: godownList.value
+                .filter((v) => v.useStatus == 1)
+                .map((d) => {
+                    return { label: d.godownName, value: d.id };
+                })
+        },
     ];
-  });
-  //默认值
-  const baseUrl = reactive({
-    add: '/baseinfo/schoolInfo/save',
-    update: '/baseinfo/schoolInfo/edit'
-  });
-  const formData = ref({ schoolTag: '1' });
+});
+const godownList = ref([]);
+async function getGodownList() {
+    return proxy.$http.post('/baseinfo/godown/searchGodown?name=');
+}
 
-  const editRef = ref(null);
+//默认值
+const baseUrl = reactive({
+    add: '/book/checkWarn/addCheckWarnBook',
+});
+const formData = ref({});
+const editRef = ref(null);
 
-  function handleOpen(data = {}) {
-    title.value = data && data.id ? '编辑高校' : '新增高校';
+function handleOpen(data = {}) {
+    title.value = data && data.id ? '编辑提醒书籍' : '新增提醒书籍';
     formData.value = Object.assign(formData.value, data || {});
-    getProviceList().then((res) => {
-      provinceList.value = res.data.data;
-    });
-    if (data && data.provinceId) {
-      getProviceList(data.provinceId).then((res) => {
-        cityList.value = res.data.data;
-      });
-    }
     editRef.value?.handleOpen(formData.value);
-  }
-
-  function getProviceList(id = 1) {
-    return proxy.$http.get(`/baseinfo/districtInfo/findInfo/${id}`);
-  }
+    getGodownList().then((res) => {
+        if (res.data.code == 200) {
+            godownList.value = res.data.data;
+        }
+    });
+}
 
-  defineExpose({ handleOpen });
+defineExpose({ handleOpen });
 </script>

+ 52 - 55
src/views/recycle/remindBooks/components/page-search.vue

@@ -1,74 +1,71 @@
 <!-- 搜索表单 -->
 <template>
-  <ele-card :body-style="{ paddingBottom: '8px' }">
-    <ProSearch
-      :items="formItems"
-      ref="searchRef"
-      @search="search"
-      :initKeys="initKeys"
-    ></ProSearch>
-  </ele-card>
+    <ele-card :body-style="{ paddingBottom: '8px' }">
+        <ProSearch :items="formItems" ref="searchRef" @search="search" :initKeys="initKeys"></ProSearch>
+    </ele-card>
 </template>
 
 <script setup>
-  import { reactive, ref, defineEmits } from 'vue';
-  import ProSearch from '@/components/CommonPage/ProSearch2.vue';
+import { reactive, ref, defineEmits } from 'vue';
+import ProSearch from '@/components/CommonPage/ProSearch2.vue';
+import { multiply } from 'lodash-es';
 
-  let { proxy } = getCurrentInstance();
-  const emit = defineEmits(['search']);
-  const godownList = ref([]);
+let { proxy } = getCurrentInstance();
+const emit = defineEmits(['search']);
+const godownList = ref([]);
 
-  const formItems = computed(() => {
+const formItems = computed(() => {
     return [
-      { type: 'input', label: 'ISBN', prop: 'isbn' },
-      {
-        type: 'select',
-        label: '收货仓库',
-        prop: 'godownId',
-        options: godownList.value.map((d) => {
-          return { label: d.godownName, value: d.id };
-        }),
-        props: {
-          filterable: true
-        }
-      },
-      {
-        type: 'datetimerange',
-        label: '建单时间',
-        prop: 'time',
-        props: {
-          format: 'YYYY-MM-DD HH:mm:ss',
-          valueFormat: 'YYYY-MM-DD HH:mm:ss',
-          onChange: (value) => {
-            initKeys.startTime = value ? value[0] : '';
-            initKeys.endTime = value ? value[1] : '';
-            searchRef.value?.setData(initKeys);
-          }
+        { type: 'input', label: 'ISBN', prop: 'isbn' },
+        {
+            type: 'select',
+            label: '收货仓库',
+            prop: 'godownIdList',
+            options: godownList.value.map((d) => {
+                return { label: d.godownName, value: d.id };
+            }),
+            props: {
+                filterable: true,
+                multiple: true,
+            }
         },
-        colProps: {
-          span: 6
+        {
+            type: 'datetimerange',
+            label: '建单时间',
+            prop: 'time',
+            props: {
+                format: 'YYYY-MM-DD HH:mm:ss',
+                valueFormat: 'YYYY-MM-DD HH:mm:ss',
+                onChange: (value) => {
+                    initKeys.createTimeStart = value ? value[0] : '';
+                    initKeys.createTimeEnd = value ? value[1] : '';
+                    searchRef.value?.setData(initKeys);
+                }
+            },
+            colProps: {
+                span: 6
+            }
         }
-      }
     ];
-  });
+});
 
-  function getStoreList(name = '') {
+function getStoreList(name = '') {
     return proxy.$http.post(`/baseinfo/godown/searchGodown?name=${name}`);
-  }
-  getStoreList().then((res) => {
+}
+getStoreList().then((res) => {
     godownList.value = res.data.data;
-  });
+});
 
-  const initKeys = reactive({
+const initKeys = reactive({
     isbn: '',
-    godownId: '',
-    startTime: '',
-    endTime: ''
-  });
+    godownIdList: '',
+    createTimeStart: '',
+    createTimeEnd: ''
+});
 
-  const searchRef = ref(null);
-  /** 搜索 */
-  const search = (data) => {
+const searchRef = ref(null);
+/** 搜索 */
+const search = (data) => {
     emit('search', { ...data });
-  };
+};
 </script>

+ 81 - 80
src/views/recycle/remindBooks/index.vue

@@ -1,101 +1,102 @@
 <template>
-  <ele-page flex-table>
-    <page-search @search="reload"></page-search>
+    <ele-page flex-table>
+        <page-search @search="reload"></page-search>
 
-    <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns">
-      <template #toolbar>
-        <el-button
-          type="primary"
-          plain
-          :icon="PlusOutlined"
-          v-permission="'recycle:remindArea:add'"
-          @click="handleUpdate()"
-        >
-          新增
-        </el-button>
-        <el-button
-          type="danger"
-          plain
-          :icon="DeleteOutlined"
-          v-permission="'recycle:remindArea:batchDelete'"
-          @click="handleBatchDelete()"
-        >
-          批量删除
-        </el-button>
-      </template>
+        <common-table ref="pageRef" :pageConfig="pageConfig" :columns="columns">
+            <template #toolbar>
+                <el-button type="primary" plain :icon="PlusOutlined" v-permission="'recycle:remindArea:add'"
+                    @click="handleAdd()">
+                    新增
+                </el-button>
+                <el-button type="danger" plain :icon="DeleteOutlined" v-permission="'recycle:remindArea:batchDelete'"
+                    @click="handleBatchDelete()">
+                    批量删除
+                </el-button>
+            </template>
 
-      <template #action="{ row }">
-        <el-button
-          type="danger"
-          link
-          v-permission="'recycle:remindArea:delete'"
-          @click="handleBatchDelete(row)"
-        >
-          删除
-        </el-button>
-      </template>
-    </common-table>
+            <template #cover="{ row }">
+                <el-image :src="row.bookInfo?.cover" style="width: 70px; height: 90px" fit="cover" />
+            </template>
 
-    <page-edit ref="editRef" @success="reload()"></page-edit>
-  </ele-page>
+            <template #action="{ row }">
+                <el-button type="danger" link v-permission="'recycle:remindArea:delete'"
+                    @click="handleDelete(row)">
+                    删除
+                </el-button>
+            </template>
+        </common-table>
+
+        <page-edit ref="editRef" @success="reload()"></page-edit>
+    </ele-page>
 </template>
 
 <script setup>
-  import { ref, reactive } from 'vue';
-  import { ElMessageBox } from 'element-plus/es';
-  import { EleMessage } from 'ele-admin-plus/es';
-  import { PlusOutlined, DeleteOutlined } from '@/components/icons';
-  import CommonTable from '@/components/CommonPage/CommonTable.vue';
-  import pageSearch from './components/page-search.vue';
-  import pageEdit from './components/page-edit.vue';
-  import { useDictData } from '@/utils/use-dict-data';
-  import { useRouter } from 'vue-router';
-  import request from '@/utils/request';
+import { ref, reactive,getCurrentInstance } from 'vue';
+import { PlusOutlined, DeleteOutlined } from '@/components/icons';
+import CommonTable from '@/components/CommonPage/CommonTable.vue';
+import pageSearch from './components/page-search.vue';
+import pageEdit from './components/page-edit.vue';
+const { proxy } = getCurrentInstance();
 
-  defineOptions({ name: 'remindBooks' });
-  const [schoolLevelDicts] = useDictData(['school_level']);
+defineOptions({ name: 'remindBooks' });
 
-  /** 表格列配置 */
-  const columns = ref([
+/** 表格列配置 */
+const columns = ref([
     { type: 'selection', columnKey: 'selection', width: 50, fixed: 'left' },
-    { label: '图片', prop: 'picture', width: 140 },
-    { label: 'isbn', prop: 'schoolName' },
-    { label: '书名', prop: 'provinceName' },
-    { label: '作者', prop: 'provinceName' },
-    { label: '出版社', prop: 'provinceName' },
-    { label: '出版时间', prop: 'provinceName' },
-    { label: '定价', prop: 'provinceName' },
-    { label: '需提醒仓库', prop: 'cityName' },
-    { label: '添加时间', prop: 'createTime' },
-    { columnKey: 'action', label: '操作', width: 120, slot: 'action' }
-  ]);
+    { label: '图片', prop: 'cover', width: 100, slot: 'cover' },
+    { label: 'isbn', prop: 'isbn' },
+    { label: '书名', prop: 'bookInfo.bookName' },
+    { label: '作者', prop: 'bookInfo.author' },
+    { label: '出版社', prop: 'bookInfo.publish' },
+    { label: '出版时间', prop: 'bookInfo.pubDate' },
+    { label: '定价', prop: 'bookInfo.price', width: 100 },
+    { label: '需提醒仓库', prop: 'godownName', width: 120 },
+    { label: '添加时间', prop: 'createTime', width: 160 },
+    { columnKey: 'action', label: '操作', width: 80, slot: 'action', fixed: 'right' }
+]);
 
-  let router = useRouter();
-  /** 页面组件实例 */
-  const pageRef = ref(null);
+/** 页面组件实例 */
+const pageRef = ref(null);
 
-  const pageConfig = reactive({
-    pageUrl: '/baseinfo/schoolInfo/list',
-    exportUrl: '/baseinfo/schoolInfo/export',
+const pageConfig = reactive({
+    pageUrl: '/book/checkWarn/getBookPageList',
+    exportUrl: '',
     fileName: '审核提醒书籍',
     cacheKey: 'remindBooksTable'
-  });
+});
 
-  //刷新表格
-  function reload(where) {
+//刷新表格
+function reload(where) {
+    delete where.time;
     pageRef.value?.reload(where);
-  }
+}
 
-  //批量删除
-  function handleBatchDelete(row) {
+//批量删除
+function handleBatchDelete(row) {
     let selections = row ? [row] : pageRef.value?.getSelections();
-    let ids = selections.map((item) => item.id).join(',');
-    let url = `/baseinfo/schoolInfo/removeById/${ids}`;
+    let ids = selections.map((item) => item.id);
+    let url = `/book/checkWarn/deleteBookCheck`;
     pageRef.value?.operatBatch({
-      title: '确认删除?',
-      method: 'post',
-      url,
-      row
+        title: '确认删除?',
+        method: 'post',
+        url,
+        row,
+        data: {
+            idList: ids
+        }
+    });
+}
+//删除
+function handleDelete(row) {
+    pageRef.value?.messageBoxConfirm({
+        message: '确认删除?',
+        fetch: () => proxy.$http.post(`/book/checkWarn/deleteBookCheck`, { idList: [row.id] })
     });
-  }
+}
+//新增
+const editRef = ref(null);
+function handleAdd() {
+    editRef.value?.handleOpen();
+}
 </script>
+

+ 28 - 5
src/views/recycleOrder/components/order-page-all.vue

@@ -40,7 +40,7 @@
                 </template>
 
                 <template #action="{ row }">
-                    <div class="action-btns">
+                    <div>
                         <el-button type="success" link v-permission="usePermission('detail')"
                             @click="toOrderDetail(row)">
                             [订单详情]
@@ -115,10 +115,19 @@
                             @click="handleApplyForOrderRestore(row)">
                             [申请恢复订单]
                         </el-button>
-                        <el-button type="danger" link v-if="[5, 6].includes(row.status)"
-                            v-permission="usePermission('interception')" @click="applyForInterception(row)">
-                            [申请拦截退回]
-                        </el-button>
+
+                        <template v-if="row.interceptStatus == 0">
+                            <el-button type="danger" link v-if="[5, 6].includes(row.status)"
+                                v-permission="usePermission('interception')" @click="applyForInterception(row)">
+                                [申请拦截退回]
+                            </el-button>
+                        </template>
+                        <template v-else>
+                            <el-button type="info" link v-if="[5, 6].includes(row.status)"
+                                v-permission="usePermission('cancelInterception')" @click="cancelInterception(row)">
+                                [取消拦截退回]
+                            </el-button>
+                        </template>
                     </div>
                 </template>
             </ele-pro-table>
@@ -375,6 +384,20 @@ function handleCancelOrder(row) {
         fetch: () => proxy.$http.post(`/order/orderInfo/adminCancel/${row.orderId}`)
     });
 }
+//申请拦截退出
+function applyForInterception(row) {
+    messageBoxConfirm({
+        message: '确认拦截?',
+        fetch: () => proxy.$http.post(`/order/orderInfo/intercept/${row.orderId}`)
+    });
+}
+//取消拦截退出
+function cancelInterception(row) {
+    messageBoxConfirm({
+        message: '确认取消拦截?',
+        fetch: () => proxy.$http.post(`/order/orderInfo/interceptBack/${row.orderId}`)
+    });
+}
 
 //用户详情
 const orderDetailRef = ref(null);

+ 32 - 180
src/views/recycleOrder/urgentRecycleAudit/index.vue

@@ -1,196 +1,48 @@
 <template>
-  <order-page ref="pageRef" :pageConfig="pageConfig">
-    <template #toolbar>
-      <el-button
-        type="warning"
-        plain
-        v-permission="'recycleOrder:urgentRecycleAudit:batchAudit'"
-        @click="handleBatchAudit"
-      >
-        批量初审
-      </el-button>
-      <el-button
-        type="success"
-        plain
-        v-permission="'recycleOrder:urgentRecycleAudit:batchReceive'"
-        @click="handleBatchReceive()"
-      >
-        批量确认收货
-      </el-button>
-    </template>
-
-    <template #action="{ row }">
-      <div>
-        <el-button
-          type="success"
-          link
-          v-permission="'recycleOrder:urgentRecycleAudit:detail'"
-          @click="toOrderDetail(row)"
-        >
-          [订单详情]
-        </el-button>
-        <el-button
-          type="warning"
-          link
-          v-permission="'recycleOrder:urgentRecycleAudit:log'"
-          @click="openOrderLog(row)"
-        >
-          [订单日志]
-        </el-button>
-        <el-button
-          type="primary"
-          link
-          v-permission="'recycleOrder:urgentRecycleAudit:fallback'"
-          @click="fallbackOrder(row)"
-        >
-          [回退状态]
-        </el-button>
-        <el-button
-          type="success"
-          link
-          v-permission="'recycleOrder:urgentRecycleAudit:receive'"
-          @click="handleBatchReceive(row)"
-        >
-          [确认收货]
-        </el-button>
-        <el-button
-          type="danger"
-          link
-          v-permission="'recycleOrder:search:auditScreenshot'"
-          @click="handleAuditScreenshot(row)"
-        >
-          [审核截图]
-        </el-button>
-        <el-button
-          type="warning"
-          link
-          v-permission="'recycleOrder:urgentRecycleAudit:userTag'"
-          @click="openEditUserTag(row)"
-        >
-          [用户标签]
-        </el-button>
-        <el-button
-          type="success"
-          link
-          v-permission="'recycleOrder:urgentRecycleAudit:sendSMS'"
-          @click="handleSendSMS(row)"
-        >
-          [推送短信]
-        </el-button>
-        <el-button
-          type="info"
-          link
-          v-permission="'recycleOrder:urgentRecycleAudit:smsLog'"
-          @click="handleSmsLog(row)"
-        >
-          [短信记录]
-        </el-button>
-      </div>
-    </template>
-
-    <order-log ref="orderLogRef" />
-    <userBindTag ref="userTagRef" />
-    <audit-screenshot ref="auditScreenshotRef"></audit-screenshot>
-    <sendSMS ref="smsRef"></sendSMS>
-    <orderSmsLog ref="smsLogRef"></orderSmsLog>
-  </order-page>
+    <order-page ref="pageRef" :pageConfig="pageConfig" permissionKey="urgentRecycleAudit">
+        <template #toolbar>
+            <el-button type="warning" plain v-permission="'recycleOrder:urgentRecycleAudit:batchAudit'"
+                @click="handleBatchAudit">
+                批量初审
+            </el-button>
+            <el-button type="success" plain v-permission="'recycleOrder:urgentRecycleAudit:batchReceive'"
+                @click="handleBatchReceive()">
+                批量确认收货
+            </el-button>
+        </template>
+    </order-page>
 </template>
 
 <script setup>
-  import { ref, reactive } from 'vue';
-  import { ElMessageBox } from 'element-plus/es';
-  import { EleMessage } from 'ele-admin-plus/es';
-  import { DownloadOutlined } from '@/components/icons';
-  import OrderPage from '@/views/recycleOrder/components/order-page.vue';
-  import { useDictData } from '@/utils/use-dict-data';
-  import { useRouter } from 'vue-router';
-
-  //订单日志
-  import orderLog from '@/views/recycleOrder/components/order-log.vue';
-  //用户标签
-  import userBindTag from '@/views/recycleOrder/components/user-bind-tag.vue';
-  //审核截图
-  import auditScreenshot from '@/views/recycleOrder/components/audit-screenshot.vue';
-  //推送短信
-  import sendSMS from '@/views/recycleOrder/components/send-SMS.vue';
-  //短信记录
-  import orderSmsLog from '@/views/recycleOrder/components/order-sms-log.vue';
+import { ref, reactive } from 'vue';
+import OrderPage from '@/views/recycleOrder/components/order-page-all.vue';
 
-  defineOptions({ name: 'recycleOrderUrgentRecycleAudit' });
+defineOptions({ name: 'recycleOrderUrgentRecycleAudit' });
 
-  let router = useRouter();
-  /** 页面组件实例 */
-  const pageRef = ref(null);
+/** 页面组件实例 */
+const pageRef = ref(null);
 
-  const pageConfig = reactive({
-    pageUrl: '',
-    exportUrl: '',
+const pageConfig = reactive({
+    pageUrl: '/order/orderInfo/urgeList',
+    exportUrl: '/order/orderInfo/urgeList/export',
     fileName: '回收催审核',
     cacheKey: 'urgentRecycleAuditTable'
-  });
+});
 
-  //批量初审
-  function handleBatchAudit() {
+//批量初审
+function handleBatchAudit() {
     pageRef.value?.operatBatch({
-      title: '确认批量审核?',
-      url: '/recycleOrder/batchAudit'
+        title: '确认批量审核?',
+        url: '/recycleOrder/batchAudit'
     });
-  }
+}
 
-  //确认收货
-  function handleBatchReceive(row) {
+//确认收货
+function handleBatchReceive(row) {
     pageRef.value?.operatBatch({
-      title: '确认收货?',
-      row,
-      url: '/recycleOrder/batchAudit'
-    });
-  }
-
-  //订单详情
-  function toOrderDetail(row) {
-    router.push({ path: '/recycleOrder/detail', query: { id: row.postId } });
-  }
-
-  //订单日志
-  const orderLogRef = ref(null);
-  function openOrderLog(row) {
-    orderLogRef.value?.handleOpen(row);
-  }
-
-  //用户绑定标签
-  const userTagRef = ref(null);
-  function openEditUserTag(row) {
-    userTagRef.value?.handleOpen(row);
-  }
-
-  function messageBoxConfirm({ message, url, row }) {
-    ElMessageBox.confirm(message, '提示', {
-      confirmButtonText: '确定',
-      cancelButtonText: '关闭',
-      type: 'warning'
-    }).then(() => {
-      console.log(row, 'row');
+        title: '确认收货?',
+        row,
+        url: '/recycleOrder/batchAudit'
     });
-  }
-
-  //审核截图
-  const auditScreenshotRef = ref(null);
-  function handleAuditScreenshot(row) {
-    auditScreenshotRef.value?.handleOpen(row);
-  }
-
-  //回退状态
-  function fallbackOrder(row) {
-    messageBoxConfirm({ message: '确认回退状态?', url: '', row });
-  }
-  //推送短信
-  const smsRef = ref(null);
-  function handleSendSMS(row) {
-    smsRef.value?.handleOpen(row);
-  }
-  //短信记录
-  const smsLogRef = ref(null);
-  function handleSmsLog(row) {
-    smsLogRef.value?.handleOpen(row);
-  }
+}
 </script>