hurx 2 hónapja
szülő
commit
2ff21816a1

+ 18 - 2
src/views/order/orderMain/index.vue

@@ -332,6 +332,7 @@ import { OrderMainVO, OrderMainQuery, OrderMainForm } from '@/api/order/orderMai
 import FileSelector from '@/components/FileSelector/index.vue';
 import { listCompany } from '@/api/company/company';
 import { listCustomerDept } from '@/api/system/dept';
+import { getInvoiceType } from '@/api/customer/invoiceType';
 import { CompanyVO } from '@/api/company/company/types';
 import { listWarehouse, getWarehouse } from '@/api/company/warehouse';
 import { WarehouseVO, WarehouseQuery } from '@/api/company/warehouse/types';
@@ -664,8 +665,8 @@ const submitForm = () => {
         }));
 
         if (form.value.payType == '0') {
-          //如果选项信用支付  则订单状态为待发货
-          form.value.orderStatus = '2';
+          //如果选项信用支付  则订单状态为待确认
+          form.value.orderStatus = '1';
         }
 
         // 组装提交数据
@@ -909,6 +910,7 @@ const handleCustomerChange = async (customerId: string | number) => {
     form.value.businessStaff = undefined;
     form.value.customerService = undefined;
     form.value.businessDept = undefined;
+    form.value.invoiceType = undefined;
     customerDeptList.value = [];
     // 清空收货地址显示信息
     addressDisplay.value = {
@@ -937,6 +939,9 @@ const handleCustomerChange = async (customerId: string | number) => {
     // 获取客户部门列表
     await getCustomerDeptList(customerId);
 
+    // 获取客户开票类型信息
+    getCustmerInvoiceType(customerInfo.invoiceTypeId);
+
     // 获取客户收货地址列表
     await loadAddressList(customerId);
   } catch (error) {
@@ -956,6 +961,17 @@ const getCustomerDeptList = async (customerId: string | number) => {
   }
 };
 
+/** 获取客户开票类型信息 */
+const getCustmerInvoiceType = async (invoiceTypeId: string | number) => {
+  try {
+    const res = await getInvoiceType(invoiceTypeId);
+    form.value.invoiceType = res.data.invoiceTypeNo + ',' + res.data.invoiceTypeName;
+  } catch (error) {
+    console.error('获取客户开票类型信息失败:', error);
+    form.value.invoiceType = '';
+  }
+};
+
 // 加载地址列表
 const loadAddressList = async (customerId: string | number) => {
   if (!customerId) {

+ 1 - 1
src/views/order/saleOrder/index.vue

@@ -40,7 +40,7 @@
     <el-card shadow="never">
       <template #header>
         <el-row :gutter="10" class="mb8">
-          <el-col :span="15"> 销售订单信息列表 </el-col>
+          <el-col :span="13"> 销售订单信息列表 </el-col>
           <el-col :span="1.5">
             <el-button type="primary" @click="handleCloseOrder()" :disabled="!ids.length" plain>关闭订单</el-button>
           </el-col>