huangxw 10 months ago
parent
commit
74a5a3af43

+ 25 - 2
src/api/price/report/index.ts

@@ -20,9 +20,32 @@ export const originPriceDetail = (query?: any): any => {
  * @returns {*}
  */
 
-export const originVarietyList = (query?: any): any => {
+export const originPriceList = (query?: any): any => {
     return request({
-        url: '/dgtmedicine/originMedicine/list',
+        url: '/dgtmedicine/originPrice/list',
+        method: 'get',
+        params: query
+    });
+};
+/**
+ * 获取产地价格发布记录详细信息
+ * @param query
+ * @returns {*}
+ */
+export const originPriceDetailInfo = (id?: any): any => {
+    return request({
+        url: `/dgtmedicine/originPrice/getInfo/${id}`,
+        method: 'get'
+    });
+};
+/**
+ * 场地价格审核统计
+ * @param query
+ * @returns {*}
+ */
+export const priceDetailCount = (query?: any): any => {
+    return request({
+        url: '/dgtmedicine/originPriceDetail/priceDetailCount',
         method: 'get',
         params: query
     });

+ 1 - 0
src/views/price/models/index.ts

@@ -1,3 +1,4 @@
 export { default as addStation } from './addStation.vue'; // 添加监测点
 export { default as EditStationEndDate } from './EditStationEndDate.vue'; // 批量修改有效期
 export { default as priceRepordLog } from './priceRepordLog.vue'; // 监测点上报数据明细
+export { default as priceRepordCheck } from './priceRepordCheck.vue'; // 监测点上报数据明细审核

+ 89 - 0
src/views/price/models/priceRepordCheck.vue

@@ -0,0 +1,89 @@
+<template>
+    <div>
+        <div class="pb-16 d-flex j-sb">
+            <div>
+                <div><searchTabs v-model="queryParams.auditStatus" @change="handleQuery" :list="tabs" key-label="name" key-value="type" key-count="num"></searchTabs></div>
+            </div>
+            <div>
+                <el-button type="primary">全部通过</el-button>
+                <el-button type="danger">全部不通过</el-button>
+            </div>
+        </div>
+        <vxe-table :loading="loading" border :data="list">
+            <!-- 序号 -->
+            <vxe-column type="seq" width="60" title="序号" align="center" />
+            <!-- 品名 -->
+            <vxe-column title="品名" field="varietyName" min-width="100" :formatter="colNoData" />
+            <!-- 规格 -->
+            <vxe-column title="规格" field="specification" min-width="100" :formatter="colNoData" />
+            <!-- 产地 -->
+            <vxe-column title="产地价格(元/kg)" field="price" min-width="100" />
+            <vxe-column title="对比近7天价格" min-width="100">
+                <template #default="{ row }">{{ row.growthRate }}%</template>
+            </vxe-column>
+            <vxe-column title="积分" field="points" width="60" :formatter="colNoData" />
+            <vxe-column title="上报人" field="createByName" width="100" :formatter="colNoData" />
+            <vxe-column title="上报时间" field="createTime" min-width="100" :formatter="colNoData" />
+            <vxe-column title="状态" fixed="right" width="110">
+                <template #default="{ row }">
+                    <div :class="['c-res-' + row?.auditStatus]">{{ selectDictLabel(check_status, row?.auditStatus) }}</div>
+                </template>
+            </vxe-column>
+        </vxe-table>
+    </div>
+    <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+</template>
+<script setup name="priceRepordCheck" lang="ts">
+import { colNoData } from '@/utils/noData';
+import { listVipPayment } from '@/api/dgtmedicine/vipPayment/index';
+import { originPriceDetail, priceDetailCount } from '@/api/price/report';
+import { searchTabs } from '@/views/models';
+const { query }: any = useRoute()
+const router = useRouter();
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { check_status } = toRefs<any>(proxy?.useDict('check_status'));
+// 字典
+const list = ref<any[]>([]);
+const loading = ref(true);
+const total = ref(0);
+const queryFormRef = ref<ElFormInstance>();
+const data = reactive<any>({
+    queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        auditStatus: '0'
+    }
+});
+const { queryParams } = toRefs(data);
+/** 点击行上传发票 */
+
+/** 查询会员信息列表 */
+const getList = async () => {
+    loading.value = true;
+    const res = await originPriceDetail({ ...queryParams.value, originPriceId: query?.id, cpyid: query?.cpyid });
+    list.value = res.rows;
+    total.value = res.total;
+    loading.value = false;
+};
+/** 搜索按钮操作 */
+const handleQuery = (level?: any) => {
+    queryParams.value.pageNum = 1;
+    getList();
+};
+/** 重置按钮操作 */
+const resetQuery = () => {
+    queryFormRef.value?.resetFields();
+    handleQuery();
+};
+// tabs count获取
+const tabs = ref<any>([]);
+const getTabs = async () => {
+    const res = await priceDetailCount({ originPriceId: query?.id, cpyid: query?.cpyid });
+    if (!res || res.code !== 200) return;
+    tabs.value = res.data
+};
+onMounted(() => {
+    getTabs();
+    getList();
+});
+</script>

+ 3 - 3
src/views/price/models/priceRepordLog.vue

@@ -15,7 +15,7 @@
             <vxe-column title="积分" field="points" width="60" :formatter="colNoData" />
             <vxe-column title="上报人" field="createByName" width="100" :formatter="colNoData" />
             <vxe-column title="上报时间" field="createTime" min-width="100" :formatter="colNoData" />
-            <vxe-column title="状态" width="110">
+            <vxe-column title="状态" fixed="right" width="110">
                 <template #default="{ row }">
                     <div :class="['c-res-' + row?.auditStatus]">{{ selectDictLabel(check_status, row?.auditStatus) }}</div>
                 </template>
@@ -24,7 +24,7 @@
     </div>
     <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
 </template>
-<script setup name="Pay-log" lang="ts">
+<script setup name="priceRepordLog" lang="ts">
 import { colNoData } from '@/utils/noData';
 import { listVipPayment } from '@/api/dgtmedicine/vipPayment/index';
 import { originPriceDetail } from '@/api/price/report';
@@ -49,7 +49,7 @@ const { queryParams } = toRefs(data);
 /** 查询会员信息列表 */
 const getList = async () => {
     loading.value = true;
-    const res = await originPriceDetail({ ...queryParams.value });
+    const res = await originPriceDetail({ ...queryParams.value, cpyid: query?.cpyid });
     list.value = res.rows;
     total.value = res.total;
     loading.value = false;

+ 77 - 0
src/views/price/report/detail/index.vue

@@ -0,0 +1,77 @@
+<template>
+    <div class="p-3">
+        <div class="bg-fff flex1 ov-hd d-flex flex-cln">
+            <div class="d-flex a-c pd-16">
+                <div class="f-s-20 c-333 f-w-7 mr-10">上报详情</div>
+                <el-button @click="router.go(-1)" type="primary" text>
+                    <el-icon>
+                        <Back />
+                    </el-icon>
+                    返回上一级
+                </el-button>
+            </div>
+            <div class="pd-16 border-bottom">
+                <div class="info-title f-w-5 mb-10">上报基本信息</div>
+                <el-descriptions :column="4">
+                    <el-descriptions-item label="上报品种:">{{ form?.varietyName || '-' }}</el-descriptions-item>
+                    <el-descriptions-item label="上报企业:">{{ form?.cpyName || '-' }}</el-descriptions-item>
+                    <el-descriptions-item label="所在区域:">{{ form?.regionCodeName }}{{ form?.address || '-' }}</el-descriptions-item>
+                    <el-descriptions-item label="联系方式:">{{ form?.tel || '-' }}</el-descriptions-item>
+                    <el-descriptions-item label="上报说明:">{{ form?.remark || '-' }}</el-descriptions-item>
+                    <el-descriptions-item label="上报人:">{{ form?.createByName || '-' }}</el-descriptions-item>
+                    <el-descriptions-item label="上报时间:">{{ form?.createTime || '-' }}</el-descriptions-item>
+                </el-descriptions>
+            </div>
+            <div class="flex1 over-auto">
+                <div class="pd-16">
+                    <div class="info-title mb-16 f-w-5">上报产地价格信息</div>
+                    <priceRepordCheck></priceRepordCheck>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script setup name="Station-detail" lang="ts">
+import { originCpyInfo } from '@/api/price/station';
+import { priceRepordCheck } from '../../models';
+import { originPriceDetailInfo } from '@/api/price/report';
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { query }:any = useRoute()
+const router = useRouter();
+const form = ref<any>(null);
+const getDetail = async () => {
+    proxy.$modal.loading('加载中...')
+    const res = await originPriceDetailInfo(query?.id).finally(() => proxy.$modal.closeLoading());
+    if (!res || res.code !== 200) return;
+    form.value = res.data;
+};
+const tabs = ref([
+    { label: '订单信息', value: '1' },
+    { label: '套餐信息', value: '2' },
+])
+onMounted(() => {
+    getDetail()
+});
+</script>
+<style lang="scss" scoped>
+.tabs-item {
+    margin-right: 20px;
+   padding: 8px 20px;
+   font-size: 14px;
+   border-color:  #d7d7d7;
+   border-style: solid;
+   border-width: 1px 1px 0 1px;
+   cursor: pointer;
+   user-select: none;
+
+   &.checked {
+    color: #fff;
+    border-color: var(--el-color-primary);
+    background-color: var(--el-color-primary);
+   }
+}
+.border-botttom {
+    border-bottom: 1px solid #d7d7d7;
+}
+</style>

+ 28 - 28
src/views/price/report/index.vue

@@ -7,7 +7,15 @@
                     <div class="d-flex pl-20">
                         <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="auto">
                             <el-form-item label="品种名称">
-                                <el-input v-model="queryParams.cpyName" placeholder="请输入企业名称" clearable />
+                                <el-input v-model="queryParams.varietyName" placeholder="搜品种名称" clearable />
+                            </el-form-item>
+                            <el-form-item label="企业名称">
+                                <el-input v-model="queryParams.cpyName" placeholder="搜企业名称" clearable />
+                            </el-form-item>
+                            <el-form-item label="审核状态">
+                                <el-select v-model="queryParams.auditStatus" @change="handleQuery" placeholder="请选择审核状态" clearable>
+                                    <el-option v-for="item in check_status" :key="item.value" :label="item.label" :value="item.value" />
+                                </el-select>
                             </el-form-item>
                             <el-form-item>
                                 <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@@ -19,36 +27,27 @@
             </div>
             <div class="flex1 ov-hd pd-16 d-flex flex-cln">
                 <div class="flex1 ov-hd">
-                    <vxe-table ref="tableRef" :loading="loading" border :data="list" min-height="0" max-height="auto" :column-config="{ resizable: true }" :row-config="{keyField: 'id',isCurrent: true, isHover: true}" :checkbox-config="{ highlight: true, range: true, trigger: 'row', reserve: true }">
-                        <vxe-column type="checkbox" width="60"></vxe-column>
+                    <vxe-table ref="tableRef" :loading="loading" border :data="list" min-height="0" max-height="auto" :column-config="{ resizable: true }">
                         <!-- 序号 -->
                         <vxe-column type="seq" width="60" title="序号" align="center" />
-                        <!-- 企业名称 -->
-                        <vxe-column title="企业名称" field="cpyName" min-width="100" />
-                        <!-- 企业地址 -->
-                        <vxe-column title="企业地址" min-width="100" :formatter="colNoData">
-                            <template #default="{ row }">{{ row.regionCodeName }}{{ row.address }}</template>
-                        </vxe-column>
-                        <!-- 单位负责人 -->
-                        <vxe-column title="单位负责人" field="contactPerson" width="90" />
-                        <!-- 负责人联系电话 -->
-                        <vxe-column title="负责人联系电话" field="tel" width="120" />
-                        <vxe-column title="有效期状态" width="90">
+                        <vxe-column title="上报品种" field="varietyName" min-width="100" :formatter="colNoData" />
+                        <vxe-column title="上报企业" field="cpyName" min-width="100" :formatter="colNoData" />
+                        <vxe-column title="所在区域" field="originName" min-width="100" :formatter="colNoData" />
+                        <vxe-column title="联系方式" field="tel" width="110" :formatter="colNoData" />
+                        <vxe-column title="上报说明" field="remark" min-width="100" :formatter="colNoData" />
+                        <vxe-column title="上报人" field="createByName" width="90" :formatter="colNoData" />
+                        <vxe-column title="上报时间" field="createTime" width="160" :formatter="colNoData" />
+                        <vxe-column title="规格数" field="specCount" width="80" :formatter="colNoData" />
+                        <vxe-column title="待审核数" field="waitCount" width="80" />
+                        <vxe-column title="已通过/不通过" width="120">
                             <template #default="{ row }">
-                                <el-tag v-if="+row.isValid" type="success">有效</el-tag>
-                                <el-tag v-else type="danger">已过期</el-tag>
+                                <el-tag class="mr-10" type="primary">{{ row?.agreeCount }}</el-tag>
+                                <el-tag type="danger">{{ row?.refuseCount }}</el-tag>
                             </template>
                         </vxe-column>
-                        <vxe-column title="有效期至" field="endDate" min-width="100" width="110" />
-                        <vxe-column title="操作人" field="createByName" min-width="100" :formatter="colNoData" />
-                        <vxe-column title="操作时间" field="createTime" min-width="100" :formatter="colNoData" />
-                        <vxe-column title="操作" align="center" field="right" width="240">
+                        <vxe-column title="操作" align="center" fixed="right" width="100">
                             <template #default="{ row }">
-                                <el-button @click.stop="router.push({ path: 'station-detail', query: { id: row?.id } })" text type="primary">详情</el-button>
-                                <span></span>
-                                <el-button @click.stop="updateEndDateItem(row)" text style="color: #0079fe">修改有效期</el-button>
-                                <span></span>
-                                <el-button @click.stop="deleteItem(row)" text type="danger">删除</el-button>
+                                <el-button @click="router.push({ path: 'report-detail', query: { id: row?.id, cpyid: row?.cpyid } })" type="primary" text>详情</el-button>
                             </template>
                         </vxe-column>
                     </vxe-table>
@@ -62,20 +61,21 @@
 <script setup name="price-report" lang="ts">
 import { colNoData } from '@/utils/noData';
 import NP from 'number-precision';
-import { originVarietyList } from '@/api/price/report';
+import { originPriceList } from '@/api/price/report';
 const router = useRouter();
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { check_status } = toRefs<any>(proxy?.useDict('check_status'));
 const queryParams = ref<any>({
     pageNum: 1,
     pageSize: 10,
-    isValid: '1'
+    auditStatus: '0'
 });
 const loading = ref(false);
 const total = ref(0);
 const list = ref<any>([]);
 const getList = async () => {
     loading.value = true;
-    const res = await originVarietyList(queryParams.value);
+    const res = await originPriceList(queryParams.value);
     if (!res || res.code !== 200) return;
     list.value = res.rows;
     total.value = res.total;

+ 1 - 1
src/views/price/station/detail/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div class="p-3">
-        <div class="bg-fff flex1 ov-auto d-flex flex-cln">
+        <div class="bg-fff flex1 ov-hd d-flex flex-cln">
             <div class="d-flex a-c pd-16">
                 <div class="f-s-20 c-333 f-w-7 mr-10">监测点详情</div>
                 <el-button @click="router.go(-1)" type="primary" text>

+ 2 - 2
src/views/price/station/index.vue

@@ -50,9 +50,9 @@
                         <vxe-column title="有效期至" field="endDate" min-width="100" width="110" />
                         <vxe-column title="操作人" field="createByName" min-width="100" :formatter="colNoData" />
                         <vxe-column title="操作时间" field="createTime" min-width="100" :formatter="colNoData" />
-                        <vxe-column title="操作" align="center" field="right" width="240">
+                        <vxe-column title="操作" align="center" fixed="right" width="240">
                             <template #default="{ row }">
-                                <el-button @click.stop="router.push({ path: 'station-detail', query: { id: row?.id } })" text type="primary">详情</el-button>
+                                <el-button @click.stop="router.push({ path: 'station-detail', query: { id: row?.id, cpyid: row?.cpyid } })" text type="primary">详情</el-button>
                                 <span></span>
                                 <el-button @click.stop="updateEndDateItem(row)" text style="color: #0079fe">修改有效期</el-button>
                                 <span></span>