huangxw пре 8 месеци
родитељ
комит
7f14ea9277
3 измењених фајлова са 57 додато и 7 уклоњено
  1. 12 0
      src/api/cdt/orders/index.ts
  2. 18 6
      src/views/cdt/models/orderInfo.vue
  3. 27 1
      src/views/cdt/orders/index.vue

+ 12 - 0
src/api/cdt/orders/index.ts

@@ -72,3 +72,15 @@ export const uploadTestOrderInvoice = (data?: any): any => {
         data
     });
 };
+
+/**
+ * 订单确认支付
+ * @param query
+ * @returns {*}
+ */
+export const testOrderConfirmPay = (orderId?: any): any => {
+    return request({
+        url: 'dgtmedicine/testOrder/confirmTestOrderPay/' + orderId,
+        method: 'get'
+    });
+};

+ 18 - 6
src/views/cdt/models/orderInfo.vue

@@ -29,6 +29,9 @@
             <vxe-column title="实收款" width="100">
                 <template #default="{ row }">{{ row?.amount }}元</template>
             </vxe-column>
+            <vxe-column title="支付方式" width="100">
+                <template #default="{ row }">{{ row?.payType === '2' ? '微信支付' : '对公转账' }}</template>
+            </vxe-column>
             <vxe-column title="下单人" min-width="100">
                 <template #default>
                     <div>{{ info?.createName }}</div>
@@ -166,6 +169,15 @@
                         <el-descriptions-item label="收件人:">{{ info?.reciveAddress?.contactName  }}</el-descriptions-item>
                         <el-descriptions-item label="联系电话:">{{ info?.reciveAddress?.contactPhone  }}</el-descriptions-item>
                     </el-descriptions>
+                    <el-descriptions title="发票信息" :column="4">
+                        <el-descriptions-item label="发票抬头:">{{ info?.invoiceInfo?.headTitle  }}</el-descriptions-item>
+                        <el-descriptions-item label="税号:">{{ info?.invoiceInfo?.taxSn  }}</el-descriptions-item>
+                        <el-descriptions-item label="收票邮箱:">{{ info?.invoiceInfo?.email || '-'  }}</el-descriptions-item>
+                        <el-descriptions-item label="单位地址:">{{ info?.invoiceInfo?.address || '-'  }}</el-descriptions-item>
+                        <el-descriptions-item label="电话号码:">{{ info?.invoiceInfo?.contactPhone || '-'  }}</el-descriptions-item>
+                        <el-descriptions-item label="开户银行:">{{ info?.invoiceInfo?.bankName || '-'  }}</el-descriptions-item>
+                        <el-descriptions-item label="银行账户:">{{ info?.invoiceInfo?.bankAccount || '-'  }}</el-descriptions-item>
+                    </el-descriptions>
                 </div>
             </div>
         </div>
@@ -201,12 +213,12 @@ const mapStatus = (value) => {
 }
 // 合并表格
 const mergeCells = ref<VxeTablePropTypes.MergeCells>([
-    { row: 0, col: 0, rowspan: 2, colspan: 0 },
-    { row: 0, col: 1, rowspan: 2, colspan: 0 },
-    { row: 0, col: 2, rowspan: 2, colspan: 0 },
-    { row: 0, col: 6, rowspan: 2, colspan: 0 },
-    { row: 0, col: 7, rowspan: 2, colspan: 0 },
-    { row: 0, col: 8, rowspan: 2, colspan: 0 }
+    { row: 0, col: 0, rowspan: 3, colspan: 0 },
+    { row: 0, col: 1, rowspan: 3, colspan: 0 },
+    { row: 0, col: 2, rowspan: 3, colspan: 0 },
+    { row: 0, col: 6, rowspan: 3, colspan: 0 },
+    { row: 0, col: 7, rowspan: 3, colspan: 0 },
+    { row: 0, col: 8, rowspan: 3, colspan: 0 }
 ]);
 const steps = ref([
     { label: '付款信息', name: '待寄样', value: '1' },

+ 27 - 1
src/views/cdt/orders/index.vue

@@ -66,6 +66,10 @@
                         <vxe-column title="操作" width="260" fixed="right">
                             <template #default="{ row }">
                                 <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>
+                                </template>
                                 <template v-if="row?.status === '4'">
                                     <span></span>
                                     <el-button @click="clickRowReport(row)" text class="small-btn-font" type="primary" size="small">上传报告</el-button>
@@ -91,7 +95,7 @@
     <uploadInvoiceForm v-if="showInvoice" v-model:show="showInvoice" :info="rowInfo" @success="getList();getTabsCount()"></uploadInvoiceForm>
 </template>
 <script setup name="orders" lang="ts">
-import { testOrderList, testOrderListCount } from '@/api/cdt/orders';
+import { testOrderConfirmPay, testOrderList, testOrderListCount } from '@/api/cdt/orders';
 import { colNoData } from '@/utils/noData';
 import { DateRange, searchTabs } from '@/views/models';
 import NP from 'number-precision';
@@ -160,6 +164,28 @@ const clickRownvoice = (row: any) => {
     rowInfo.value = row;
     showInvoice.value = true;
 };
+// 确认支付方法
+const confirmPay = async (row: any) => {
+    // 确认支付弹框
+    ElMessageBox({
+        title: '支付提示',
+        cancelButtonText: '取消',
+        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' }, '确认支付后,代表该订单对公转账为已支付,请仔细核对!')])]),
+        callback: async (action: string) => {
+            if (action === 'confirm') {
+                const res = await testOrderConfirmPay(row.id);
+                if (res) {
+                    ElMessage.success('操作成功');
+                    getList();
+                    getTabsCount();
+                }
+            }
+        }
+    });
+};
 onMounted(() => {
     getList();
     getTabsCount()