huangxw 8 miesięcy temu
rodzic
commit
cef4e01119

+ 1 - 1
src/api/cdt/orders/index.ts

@@ -74,7 +74,7 @@ export const uploadTestOrderInvoice = (data?: any): any => {
 };
 
 /**
- * 订单确认
+ * 订单确认付
  * @param query
  * @returns {*}
  */

+ 10 - 1
src/api/price/report/index.ts

@@ -1,4 +1,5 @@
-import request from '@/utils/request';
+import request, { download } from '@/utils/request';
+import { parseTime } from '@/utils/ruoyi';
 import { AxiosPromise } from 'axios';
 
 /**
@@ -62,3 +63,11 @@ export const approvalPrice = (query?: any): any => {
         data: query
     });
 };
+/**
+ * 价格上报审核导出
+ * @param query
+ * @returns {*}
+ */
+export const priceReportExport = (query?: any): any => {
+    download('/dgtmedicine/originPriceDetail/exportPrice', query, `${parseTime(new Date(), '{y}{m}{d}价格上报')}.xlsx`);
+};

+ 0 - 57
src/assets/styles/ruoyi.scss

@@ -323,63 +323,6 @@ h6 {
   margin-left: auto;
 }
 
-
-@for $i from 10 through 20 {
-  .f-s-#{$i} {
-    font-size: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .mb-#{$i} {
-    margin-bottom: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .pb-#{$i} {
-    padding-bottom: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .pd-#{$i} {
-    padding: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .pr-#{$i} {
-    padding-right: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .pt-#{$i} {
-    padding-top: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .pb-#{$i} {
-    padding-bottom: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .pl-#{$i} {
-    padding-left: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .mr-#{$i} {
-    margin-right: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .ml-#{$i} {
-    margin-left: #{$i}px;
-  }
-}
-@for $i from 4 through 40 {
-  .mg-#{$i} {
-    margin: #{$i}px;
-  }
-}
-
 $colors: (
   333: #333,
   666: #666,

+ 5 - 5
src/views/cdt/orders/index.vue

@@ -68,7 +68,7 @@
                                 <el-button @click="EidtRemark(row)" text class="small-btn-font" type="primary" size="small">添加备注</el-button>
                                 <template v-if="row?.status === '0' && row?.payType === '2'">
                                     <span></span>
-                                    <el-button @click="confirmPay(row)" text class="small-btn-font" type="primary" size="small">确认付</el-button>
+                                    <el-button @click="confirmPay(row)" text class="small-btn-font" type="primary" size="small">确认付</el-button>
                                 </template>
                                 <template v-if="row?.status === '4'">
                                     <span></span>
@@ -164,16 +164,16 @@ const clickRownvoice = (row: any) => {
     rowInfo.value = row;
     showInvoice.value = true;
 };
-// 确认付方法
+// 确认付方法
 const confirmPay = async (row: any) => {
-    // 确认付弹框
+    // 确认付弹框
     ElMessageBox({
         title: '支付提示',
         cancelButtonText: '取消',
-        confirmButtonText: '确认付',
+        confirmButtonText: '确认付',
         showCancelButton: true,
         confirmButtonClass: 'el-button--danger',
-        message: h('p', null, [h('div', null, `是否确认付订单号:${row.orderNo}设置为已支付状态吗?`), h('div', null, [h('span', null, '注意:'), h('span', { style: 'color: #F56C6C' }, '确认付后,代表该订单对公转账为已支付,请仔细核对!')])]),
+        message: h('p', null, [h('div', null, `是否确认付订单号:${row.orderNo}设置为已支付状态吗?`), h('div', null, [h('span', null, '注意:'), h('span', { style: 'color: #F56C6C' }, '确认付后,代表该订单对公转账为已支付,请仔细核对!')])]),
         callback: async (action: string) => {
             if (action === 'confirm') {
                 const res = await testOrderConfirmPay(row.id);

+ 5 - 5
src/views/dgtmedicine/model/MemberPayLog.vue

@@ -29,7 +29,7 @@
             </vxe-column>
             <vxe-column title="操作" align="center" width="200" class-name="small-padding fixed-width">
                 <template #default="{ row }">
-                    <el-button @click="confirmPay(row)" v-if="!+row?.paymentStatus" type="success" text>确认付</el-button>
+                    <el-button @click="confirmPay(row)" v-if="!+row?.paymentStatus" type="success" text>确认付</el-button>
                     <span></span>
                     <el-button v-if="+row.invoiceStatus" style="color: #999;" tag="a" text :underline="false"
                         type="primary" :href="row.invoiceUrlAddr" target="_blank">查看发票</el-button>
@@ -102,16 +102,16 @@ const resetQuery = () => {
     handleQuery();
 };
 
-// 确认付方法
+// 确认付方法
 const confirmPay = async (row: any) => {
-    // 确认付弹框
+    // 确认付弹框
     ElMessageBox({
         title: '支付提示',
         cancelButtonText: '取消',
-        confirmButtonText: '确认付',
+        confirmButtonText: '确认付',
         showCancelButton: true,
         confirmButtonClass: 'el-button--danger',
-        message: h('p', null, [h('div', null, `是否确认付企业:${row.cpyName}设置为已支付状态吗?`), h('div', null, [h('span', null, '注意:'), h('span', { style: 'color: #F56C6C' }, '确认付后,代表该企业对公转账为已支付,请仔细核对!')])]),
+        message: h('p', null, [h('div', null, `是否确认付企业:${row.cpyName}设置为已支付状态吗?`), h('div', null, [h('span', null, '注意:'), h('span', { style: 'color: #F56C6C' }, '确认付后,代表该企业对公转账为已支付,请仔细核对!')])]),
         callback: async (action: string) => {
             if (action === 'confirm') {
                 const res = await VipConfirmPay(row.id);

+ 5 - 5
src/views/dgtmedicine/pay-log/index.vue

@@ -64,7 +64,7 @@
                         </vxe-column>
                         <vxe-column title="操作" align="center" width="200" class-name="small-padding fixed-width">
                             <template #default="{ row }">
-                                <el-button @click="confirmPay(row)" v-if="!+row?.paymentStatus" type="success" text>确认付</el-button>
+                                <el-button @click="confirmPay(row)" v-if="!+row?.paymentStatus" type="success" text>确认付</el-button>
                                 <span></span>
                                 <el-button v-if="+row.invoiceStatus" style="color: #999;" tag="a" text :underline="false" type="primary" :href="row.invoiceUrlAddr" target="_blank">查看发票</el-button>
                                 <el-button v-else type="primary" text @click="clickRowEdit(row)">上传发票</el-button>
@@ -124,17 +124,17 @@ const getList = async () => {
     total.value = res.total;
     loading.value = false;
 };
-// 确认付方法
+// 确认付方法
 const confirmPay = async (row: any) => {
-    // 确认付弹框
+    // 确认付弹框
     ElMessageBox({
         title: '支付提示',
         cancelButtonText: '取消',
-        confirmButtonText: '确认付',
+        confirmButtonText: '确认付',
         showCancelButton: true,
         confirmButtonClass: 'el-button--danger',
 
-        message: h('p', null, [h('div', null, `是否确认付企业:${row.cpyName}设置为已支付状态吗?`), h('div', null, [h('span', null, '注意:'), h('span', { style: 'color: #F56C6C' }, '确认付后,代表该企业对公转账为已支付,请仔细核对!')])]),
+        message: h('p', null, [h('div', null, `是否确认付企业:${row.cpyName}设置为已支付状态吗?`), h('div', null, [h('span', null, '注意:'), h('span', { style: 'color: #F56C6C' }, '确认付后,代表该企业对公转账为已支付,请仔细核对!')])]),
         callback: async (action: string) => {
             if (action === 'confirm') {
                 const res = await VipConfirmPay(row.id);

+ 29 - 9
src/views/price/report/index.vue

@@ -2,24 +2,30 @@
     <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="f-s-20 c-333 f-w-7 mb-10">上报价格审核</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="上报时间" prop="dateRange">
+                                <div class="d-flex" style="width: 220px">
+                                    <DateRange v-model="queryParams.dateRange" v-model:start-date="queryParams.startDate" v-model:end-date="queryParams.endDate" @change="handleQuery"></DateRange>
+                                </div>
+                            </el-form-item>
                             <el-form-item label="品种名称" prop="varietyName">
-                                <el-input v-model="queryParams.varietyName" placeholder="搜品种名称" clearable />
+                                <el-input style="width: 180px;" v-model="queryParams.varietyName" placeholder="搜品种名称" clearable />
                             </el-form-item>
                             <el-form-item label="企业名称" prop="cpyName">
-                                <el-input v-model="queryParams.cpyName" placeholder="搜企业名称" clearable />
+                                <el-input style="width: 180px;" v-model="queryParams.cpyName" placeholder="搜企业名称" clearable />
                             </el-form-item>
                             <el-form-item label="审核状态" prop="auditStatus">
-                                <el-select v-model="queryParams.auditStatus" @change="handleQuery" placeholder="请选择审核状态" clearable>
+                                <el-select style="width: 160px;" 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>
                                 <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+                                <el-button @click="exportList">导出</el-button>
                             </el-form-item>
                         </el-form>
                     </div>
@@ -27,7 +33,9 @@
             </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 }">
+                    <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" align="center" />
                         <!-- 序号 -->
                         <vxe-column type="seq" width="60" title="序号" align="center" />
                         <vxe-column title="上报品种" field="varietyName" min-width="100" :formatter="colNoData" />
@@ -61,14 +69,18 @@
 <script setup name="price-report" lang="ts">
 import { colNoData } from '@/utils/noData';
 import NP from 'number-precision';
-import { originPriceList } from '@/api/price/report';
+import { originPriceList, priceReportExport } from '@/api/price/report';
+import { DateRange } from '@/views/models';
 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,
-    auditStatus: ''
+    auditStatus: '',
+    startDate: '',
+    endDate: '',
+    dateRange: []
 });
 const loading = ref(false);
 const total = ref(0);
@@ -88,13 +100,21 @@ const handleQuery = () => {
 const queryFormRef = ref<any>();
 const resetQuery = () => {
     queryFormRef.value?.resetFields();
+    queryParams.value.startDate = '';
+    queryParams.value.endDate = '';
     handleQuery();
 };
 
 const tableRef = ref<any>();
-
+const exportList = async () => {
+    // 获取表格选中信息
+    const selected = tableRef.value?.getCheckboxReserveRecords(true).concat(tableRef.value?.getCheckboxRecords());
+    console.log(selected);
+    const ids = selected.map((item: any) => item.id);
+    const res = await priceReportExport({ ids })
+    if (!res || res.code !== 200) return;
+};
 onMounted(() => {
-
     handleQuery();
 });
 </script>

+ 130 - 3
vite/plugins/unocss.ts

@@ -1,7 +1,134 @@
 import UnoCss from 'unocss/vite';
 
 export default () => {
-  return UnoCss({
-    hmrTopLevelAwait: false // unocss默认是true,低版本浏览器是不支持的,启动后会报错
-  });
+    return UnoCss({
+        hmrTopLevelAwait: false, // unocss默认是true,低版本浏览器是不支持的,启动后会报错
+        rules: [
+            [/^mg-([\.\d]+)$/, ([_, num]) => ({ margin: `${num}px` })],
+            [/^pd-([\.\d]+)$/, ([_, num]) => ({ padding: `${num}px` })],
+            [/^bg-([\w-]+)$/, ([_, color]) => ({ 'background-color': color })],
+            [/^c-([\w-]+)$/, ([_, color]) => ({ color: color })],
+            [/^bc-([\w-]+)$/, ([_, color]) => ({ 'border-color': color })],
+            [/^rounded-([\.\d]+)$/, ([_, num]) => ({ 'border-radius': `${num}px` })],
+            // 下边距
+            [/^mb-([\.\d]+)$/, ([_, num]) => ({ 'margin-bottom': `${num}px` })],
+            // 上边距
+            [/^mt-([\.\d]+)$/, ([_, num]) => ({ 'margin-top': `${num}px` })],
+            // 左边距
+            [/^ml-([\.\d]+)$/, ([_, num]) => ({ 'margin-left': `${num}px` })],
+            // 右边距
+            [/^mr-([\.\d]+)$/, ([_, num]) => ({ 'margin-right': `${num}px` })],
+            // 上padding
+            [/^pt-([\.\d]+)$/, ([_, num]) => ({ 'padding-top': `${num}px` })],
+            // 下padding
+            [/^pb-([\.\d]+)$/, ([_, num]) => ({ 'padding-bottom': `${num}px` })],
+            // pd3-40-0-20
+            // padding
+            [
+                /^pd3-([\.\d]+)-([\.\d]+)-([\.\d]+)$/,
+                ([_, top, right, bottom]) => ({
+                    padding: `${top}px ${right}px ${bottom}px`
+                })
+            ],
+            // pd2-40-20
+            [
+                /^pd2-([\.\d]+)-([\.\d]+)$/,
+                ([_, top, right]) => ({
+                    padding: `${top}px ${right}px`
+                })
+            ],
+            // pd4-40-20-10-5
+            [
+                /^pd4-([\.\d]+)-([\.\d]+)-([\.\d]+)-([\.\d]+)$/,
+                ([_, top, right, bottom, left]) => ({
+                    padding: `${top}px ${right}px ${bottom}px ${left}px`
+                })
+            ],
+            // mg2-40-20
+            [
+                /^mg2-([\.\d]+)-([\.\d]+)$/,
+                ([_, top, right]) => ({
+                    margin: `${top}px ${right}px`
+                })
+            ],
+            // mg3-40-20-10
+            [
+                /^mg3-([\.\d]+)-([\.\d]+)-([\.\d]+)$/,
+                ([_, top, right, bottom]) => ({
+                    margin: `${top}px ${right}px ${bottom}px`
+                })
+            ],
+            // mg4-40-20-10-5
+            [
+                /^mg4-([\.\d]+)-([\.\d]+)-([\.\d]+)-([\.\d]+)$/,
+                ([_, top, right, bottom, left]) => ({
+                    margin: `${top}px ${right}px ${bottom}px ${left}px`
+                })
+            ],
+            // 左padding
+            [/^pl-([\.\d]+)$/, ([_, num]) => ({ 'padding-left': `${num}px` })],
+            // 右padding
+            [/^pr-([\.\d]+)$/, ([_, num]) => ({ 'padding-right': `${num}px` })],
+            // 字体大小
+            [/^f-s-([\.\d]+)$/, ([_, num]) => ({ 'font-size': `${num}px` })],
+            // 字体加粗
+            [/^f-w-([\.\d]+)$/, ([_, num]) => ({ 'font-weight': `${num}` })],
+            // 宽
+            [/^w-([\.\d]+)$/, ([_, num]) => ({ width: `${num}px` })],
+            // 高
+            [/^h-([\.\d]+)$/, ([_, num]) => ({ height: `${num}px` })],
+            // 带透明度的可传入颜色计算rgba值加背景
+            // 行高
+            [/^lh-([\.\d]+)$/, ([_, num]) => ({ 'line-height': `${num}` })],
+            // 黑色透明度
+            [
+                /^bg-black-([\.\d]+)$/,
+                ([_, num]) => ({
+                    'background-color': `rgba(0, 0, 0, ${num})`
+                })
+            ],
+            // 透明度
+            [
+                /^opacity-([\.\d]+)$/,
+                ([_, num]) => ({
+                    opacity: `${num}`
+                })
+            ],
+            // z-index
+            [
+                /^z-index-([\.\d]+)$/,
+                ([_, num]) => ({
+                    'z-index': `${num}`
+                })
+            ],
+            // 百分比高度
+            [/^h-([\.\d]+)%$/, ([_, num]) => ({ height: `${num}%` })],
+            [
+                /^wrapper-([\.\d]+)-([\.\d]+)$/,
+                ([_, maxWidth, minWidth]) => ({
+                    'max-width': `${maxWidth}px`,
+                    'min-width': `${minWidth}px`,
+                    margin: '0 auto',
+                    padding: '0 20px'
+                })
+            ],
+            // 最大宽
+            [/^max-w-([\.\d]+)$/, ([_, num]) => ({ 'max-width': `${num}px` })],
+            // 最小宽
+            [/^min-w-([\.\d]+)$/, ([_, num]) => ({ 'min-width': `${num}px` })],
+            // 最大高
+            [/^max-h-([\.\d]+)$/, ([_, num]) => ({ 'max-height': `${num}px` })],
+            // 最小高
+            [/^min-h-([\.\d]+)$/, ([_, num]) => ({ 'min-height': `${num}px` })],
+            // 栅格 30份
+            [/^hcol-([\.\d]+)$/, ([_, num]) => ({ width: `${(+num / 30) * 100}%` })],
+            // border-radius-8
+            [
+                /^border-radius-([\.\d]+)$/,
+                ([_, num]) => ({
+                    'border-radius': `${num}px`
+                })
+            ]
+        ]
+    });
 };