فهرست منبع

feat:发票申请添加字段

snow 2 سال پیش
والد
کامیت
d356cbd2fb

+ 21 - 6
src/views/InvoiceSales/invoiceApply/components/add-edit-form/add-edit-form.vue

@@ -37,6 +37,7 @@ const initform = {
   invtype: "", //开票类型
   email: "", //邮箱
   remark: "", //备注
+  exam_remark: "", //申请备注
   orderArr: [], //开票销售单明细 obj:sequenceNo//销售单编号 inv_fee//销售单开票金额,
   companyType: "01"
 };
@@ -118,8 +119,9 @@ function handleInvoiceTitle(
   invoiceTitle: Record<string, string>
 ) {
   if (!invoiceTitle) {
-    sellerInvoiceTitle.value = {};
-    sellerInvoiceTitle.value = {};
+    if (_isSeller) return (sellerInvoiceTitle.value = {});
+
+    return (purchaserInvoiceTitle.value = {});
   }
 
   _isSeller
@@ -131,12 +133,13 @@ const setSellerInvoiceTitle = handleInvoiceTitle.bind(null, true);
 const setPurchaserInvoiceTitle = handleInvoiceTitle.bind(null, false);
 
 watchEffect(() => {
-  const { companyNo, buy_id } = ruleForm.value;
-  console.log(buy_id);
+  const { companyNo, buy_id, invtype } = ruleForm.value;
   if (!companyNo || !buy_id) {
     orderList.value = [];
     mapSequenceNoToInvfee.value = {};
   }
+
+  rules.email[0].required = ["3", "4"].includes(invtype);
 });
 </script>
 
@@ -211,8 +214,20 @@ watchEffect(() => {
           /></el-form-item>
         </el-col>
 
-        <el-col :span="12">
-          <el-form-item label="申请备注" prop="remark" label-width="135px">
+        <el-col :span="8">
+          <el-form-item label="开票备注" prop="remark" label-width="135px">
+            <el-input
+              w-full
+              v-model="ruleForm.exam_remark"
+              :rows="3"
+              type="textarea"
+              maxlength="2000"
+              placeholder="申请备注"
+            /> </el-form-item
+        ></el-col>
+
+        <el-col :span="8">
+          <el-form-item label="申请备注" prop="exam_remark" label-width="135px">
             <el-input
               w-full
               v-model="ruleForm.remark"

+ 8 - 1
src/views/InvoiceSales/invoiceApply/config/configs.ts

@@ -101,7 +101,7 @@ export const ADD_EDIT_FORM_RULES = {
   remark: [
     {
       required: true,
-      message: "请输入申请备注",
+      message: "请输入开票备注",
       trigger: "blur"
     }
   ],
@@ -122,5 +122,12 @@ export const ADD_EDIT_FORM_RULES = {
       trigger: "blur",
       message: "真实姓名格式不正确"
     }
+  ],
+  exam_remark: [
+    {
+      required: true,
+      message: "请输入申请备注",
+      trigger: "blur"
+    }
   ]
 };