huangxw 10 meses atrás
pai
commit
73aad99a9a

+ 13 - 0
src/api/price/report/index.ts

@@ -14,3 +14,16 @@ export const originPriceDetail = (query?: any): any => {
         params: query
     });
 };
+/**
+ * 查询产地品种列表
+ * @param query
+ * @returns {*}
+ */
+
+export const originVarietyList = (query?: any): any => {
+    return request({
+        url: '/dgtmedicine/originMedicine/list',
+        method: 'get',
+        params: query
+    });
+};

+ 1 - 1
src/views/cdt/menus/detail/index.vue

@@ -32,7 +32,7 @@
                             <el-image style="width: 100px; height: 100px" :src="form?.coverImg" :zoom-rate="1.2" :max-scale="7" :min-scale="0.2" :preview-src-list="[form?.coverImg]" fit="cover"></el-image>
                         </el-descriptions-item>
                         <el-descriptions-item label="产品图:">
-                            <template v-for="(item, index) in form?.proImg.split(',')" :key="index">
+                            <template v-for="(item, index) in form?.proImg?.split(',')" :key="index">
                                 <el-image style="width: 100px; height: 100px;margin-right: 12px;" :src="item" fit="cover" :zoom-rate="1.2" :max-scale="7" :min-scale="0.2" :initial-index="index" :preview-src-list="[item]"></el-image>
                             </template>
                         </el-descriptions-item>

+ 100 - 0
src/views/price/report/index.vue

@@ -0,0 +1,100 @@
+<template>
+    <div class="p-3">
+        <div class="bg-fff flex1 ov-hd d-flex flex-cln">
+            <div class="pd-16 border-bottom">
+                <div class="f-s-20 c-333 f-w-7 mb-20">上报价格审核</div>
+                <div class="d-flex j-ed">
+                    <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-form-item>
+                            <el-form-item>
+                                <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+                                <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+                            </el-form-item>
+                        </el-form>
+                    </div>
+                </div>
+            </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-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">
+                            <template #default="{ row }">
+                                <el-tag v-if="+row.isValid" type="success">有效</el-tag>
+                                <el-tag v-else type="danger">已过期</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">
+                            <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>
+                            </template>
+                        </vxe-column>
+                    </vxe-table>
+                </div>
+            </div>
+            <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+            <div class="pd-5"></div>
+        </div>
+    </div>
+</template>
+<script setup name="price-report" lang="ts">
+import { colNoData } from '@/utils/noData';
+import NP from 'number-precision';
+import { originVarietyList } from '@/api/price/report';
+const router = useRouter();
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const queryParams = ref<any>({
+    pageNum: 1,
+    pageSize: 10,
+    isValid: '1'
+});
+const loading = ref(false);
+const total = ref(0);
+const list = ref<any>([]);
+const getList = async () => {
+    loading.value = true;
+    const res = await originVarietyList(queryParams.value);
+    if (!res || res.code !== 200) return;
+    list.value = res.rows;
+    total.value = res.total;
+    loading.value = false;
+};
+const handleQuery = () => {
+    queryParams.value.pageNum = 1;
+    getList();
+};
+const queryFormRef = ref<any>();
+const resetQuery = () => {
+    queryFormRef.value?.resetFields();
+    handleQuery();
+};
+
+const tableRef = ref<any>();
+
+onMounted(() => {
+
+    handleQuery();
+});
+</script>