snow пре 2 година
родитељ
комит
e6328ad464

+ 1 - 1
src/store/modules/user.ts

@@ -117,7 +117,7 @@ export const useUserStore = defineStore({
 
       if (Number(code) === 0) {
         const { role_level } = data;
-        this.isSuperUser = role_level === "1";
+        // this.isSuperUser = role_level === "1";
         const code = getRelaComNo();
 
         if (!this.isSuperUser) {

+ 9 - 16
src/views/InvoiceSales/invoiceApply/components/approval-process/src/upload-invoice.vue

@@ -1,12 +1,13 @@
 <script setup lang="ts">
 import { ElMessage, dayjs, ElForm } from "element-plus";
 import { computed, reactive, ref, watchEffect } from "vue";
+import { input_type_list, open_type_list } from "../../../status";
+
 import {
   upload_invoice_rules,
   jsRequiredKeys,
   noPassRequiredKeys
 } from "../../../config/configs";
-import { input_type_list, open_type_list } from "../../../status";
 
 const props = defineProps<{
   isElectronic: boolean;
@@ -44,7 +45,6 @@ const formData = reactive({
   invCode: "",
   invNum: "",
   open_date: null,
-  total_fee: 0,
   subtotal_fee: 0,
   checkCode: ""
 });
@@ -58,7 +58,6 @@ function handleSaveStatus() {
       status,
       remark,
       subtotal_fee,
-      total_fee,
       checkCode,
       ...otherParams
     } = formData;
@@ -70,13 +69,6 @@ function handleSaveStatus() {
         params = { status: "5", remark: formData.remark };
         break;
       default:
-        if (
-          Number(subtotal_fee) >= Number(total_fee) &&
-          formData.open_type !== "1"
-        ) {
-          return ElMessage.error("税前金额不能大于或等于税后金额");
-        }
-
         if (formData.open_type === "1") {
           //金税开票 -> 财务审核
           params = { status: "1", open_type: "1", remark };
@@ -84,7 +76,6 @@ function handleSaveStatus() {
           //线下开票
           params = {
             status: "1",
-            total_fee: total_fee.toFixed(2),
             subtotal_fee: subtotal_fee.toFixed(2),
             ...(checkCode ? { checkCode } : {}),
             ...otherParams
@@ -107,14 +98,17 @@ function handleScanKeydown(evt: KeyboardEvent) {
     ElMessage.error("不能包含中文逗号");
     return (scanInputValue.value = "");
   }
+
   if (scanInputValue.value.trim().length !== 70) {
     ElMessage.error("扫码枪识别数据格式不正确,请重新扫描。");
     return (scanInputValue.value = "");
   }
 
-  const [_1, _2, ...chunks] = scanInputValue.value.split(",");
+  const [_1, invoiceType, ...chunks] = scanInputValue.value.split(",");
   const [invCode, invNum, subtotal_amount, open_time] = chunks;
 
+  console.log(invoiceType);
+
   const year = open_time.slice(0, 4);
   const month = open_time.slice(4, 6);
   const day = open_time.slice(6);
@@ -122,7 +116,6 @@ function handleScanKeydown(evt: KeyboardEvent) {
   formData.invCode = invCode;
   formData.invNum = invNum;
   formData.subtotal_fee = Number(subtotal_amount);
-  formData.total_fee = Number(subtotal_amount);
   formData.open_date = dayjs(`${year}-${month}-${day}`).format(
     "YYYY-MM-DD HH:mm:ss"
   );
@@ -166,7 +159,7 @@ watchEffect(() => {
             <el-option label="不通过" value="5" />
           </el-select>
         </el-form-item>
-        <el-form-item label="开票类型" prop="open_type" v-if="!noPass">
+        <el-form-item label="开票方式" prop="open_type" v-if="!noPass">
           <el-select
             v-model="formData.open_type"
             style="width: 100%"
@@ -276,7 +269,7 @@ watchEffect(() => {
           />
         </el-form-item>
       </el-col>
-      <el-col :span="8">
+      <!-- <el-col :span="8">
         <el-form-item label="税后金额" prop="total_fee">
           <el-input-number
             v-model="formData.total_fee"
@@ -287,7 +280,7 @@ watchEffect(() => {
             :disabled="disabled"
           />
         </el-form-item>
-      </el-col>
+      </el-col> -->
     </el-row>
     <div class="flex justify-end">
       <el-button type="primary" @click="handleSaveStatus">保存</el-button>

+ 1 - 1
src/views/InvoiceSales/invoiceApply/detail.vue

@@ -74,7 +74,7 @@ const isPlain = computed(() => {
 //是否支持金税
 const isSupport = computed(() => {
   const { is_ticket } = invoiceDetail.value;
-  return is_ticket === "1";
+  return is_ticket !== "0";
 });
 
 //当前的审批流程 ->

+ 1 - 1
src/views/InvoiceSales/invoiceApply/status.ts

@@ -45,7 +45,7 @@ const open_type_list = [
   // { value: "0", label: "备库单" },
   { value: "1", label: "金税开票" },
   { value: "2", label: "金税线下" },
-  { value: "3", label: "纯线下" }
+  { value: "3", label: "纯线下开票" }
 ];
 const input_type_list = [
   { value: "1", label: "扫码枪输入" },