cz 1 vuosi sitten
vanhempi
commit
807e43392e

+ 124 - 2
src/views/EHSD/procurement/profitBudgetEHSD/index.vue

@@ -6,6 +6,7 @@
       :source="sourceList.data"
       :pagination="sourceList.pagination"
       :config="config"
+      :statConfig="statConfig"
       :loading="loading"
       :selectConfig="selectConfig"
       highlight-current-row
@@ -56,12 +57,12 @@
         />
         <el-table-column label="包材金额" width="140">
           <template #default="{ row }">
-            <div>{{ row.other }}</div>
+            <div>{{ row.peritectoidAmount }}</div>
           </template>
         </el-table-column>
         <el-table-column label="配件金额" width="140">
           <template #default="{ row }">
-            <div>{{ row.other }}</div>
+            <div>{{ row.accessoriesAmount }}</div>
           </template>
         </el-table-column>
         <el-table-column label="拖车费" width="140">
@@ -483,6 +484,122 @@ const selectConfig = computed(() => {
 const config = computed(() => {
   return [];
 });
+const headerData = ref({});
+const statConfig = computed(() => [
+  {
+    label: "统计",
+    data: [
+      //一个卡牌多数据配置
+      {
+        label: "订单统计(CNY)",
+        type: 2,
+        data: [
+          {
+            label: "销售总金额",
+            num: proxy.moneyFormat(headerData.value.contractSumAmount, 2),
+            color: "#C280FF",
+          },
+          {
+            label: "采购总金额",
+            num: proxy.moneyFormat(headerData.value.purchaseSumAmount, 2),
+            color: "#C280FF",
+          },
+        ],
+      },
+      {
+        label: "收入统计(CNY)",
+        type: 3,
+        data: [
+          {
+            label: "应退税",
+            num: proxy.moneyFormat(headerData.value.taxReturnMoneySumAmount, 2),
+            color: "#FF9315",
+          },
+        ],
+      },
+      {
+        label: "支出统计(CNY)",
+        type: 5,
+        data: [
+          {
+            label: "包材金额",
+            num: proxy.moneyFormat(headerData.value.peritectoidSumAmount, 2),
+            color: "#FF6F67",
+          },
+          {
+            label: "配件金额",
+            num: proxy.moneyFormat(headerData.value.accessoriesSumAmount, 2),
+            color: "#FF6F67",
+          },
+          {
+            label: "拖车费",
+            num: proxy.moneyFormat(headerData.value.trailerFeeSumAmount, 2),
+            color: "#FF6F67",
+          },
+          {
+            label: "报关费",
+            num: proxy.moneyFormat(headerData.value.customsFeeSumAmount, 2),
+            color: "#FF6F67",
+          },
+          {
+            label: "代理费",
+            num: proxy.moneyFormat(headerData.value.agencyFeeSumAmount, 2),
+            color: "#FF6F67",
+          },
+          {
+            label: "港杂费",
+            num: proxy.moneyFormat(headerData.value.portMixedFeeSumAmount, 2),
+            color: "#FF6F67",
+          },
+          {
+            label: "验货红包",
+            num: proxy.moneyFormat(
+              headerData.value.inspectionRedPackSumAmount,
+              2
+            ),
+            color: "#FF6F67",
+          },
+          {
+            label: "佣金",
+            num: proxy.moneyFormat(headerData.value.commissionSumAmount, 2),
+            color: "#FF6F67",
+          },
+          {
+            label: "其他",
+            num: proxy.moneyFormat(headerData.value.otherSumAmount, 2),
+            color: "#FF6F67",
+          },
+        ],
+      },
+      {
+        label: "收支统计(CNY)",
+        type: 1,
+        data: [
+          {
+            label: "总收入",
+            num: proxy.moneyFormat(headerData.value.totalIncomeSumAmount, 2),
+            color: "#0084ff",
+          },
+          {
+            label: "总支出",
+            num: proxy.moneyFormat(headerData.value.totalExpensesSumAmount, 2),
+            color: "#0084ff",
+          },
+          {
+            label: "总毛利",
+            num: proxy.moneyFormat(headerData.value.grossProfitSum, 2),
+            color: "#0084ff",
+          },
+          {
+            label: "毛利率",
+            num: headerData.value.grossProfitMargin + " %",
+            color: "#0084ff",
+          },
+        ],
+      },
+    ],
+  },
+]);
 const getDict = () => {
   proxy
     .post("/dictTenantData/page", {
@@ -531,6 +648,11 @@ const getList = async (req) => {
         loading.value = false;
       }, 200);
     });
+  proxy
+    .post("/contract/getProfitBudgetHeadStatistic", sourceList.value.pagination)
+    .then((res) => {
+      headerData.value = res;
+    });
 };
 const rateStatus = ref(false);
 const judgeRate = () => {

+ 91 - 25
src/views/EHSD/procurement/profitSettlementEHSD/index.vue

@@ -8,12 +8,18 @@
       :config="config"
       :loading="loading"
       highlight-current-row
-      @get-list="getList">
+      @get-list="getList"
+    >
     </byTable>
     <div style="padding: 0 20px 20px 20px; background-color: white">
       <el-table v-loading="loading" :data="sourceList.data">
         <el-table-column label="合同编号" prop="code" width="160" fixed />
-        <el-table-column label="客户名称" prop="customerName" min-width="200" fixed />
+        <el-table-column
+          label="客户名称"
+          prop="customerName"
+          min-width="200"
+          fixed
+        />
         <el-table-column label="业务员" prop="userName" width="140" fixed />
         <el-table-column label="合同金额" width="140">
           <template #default="{ row }">
@@ -22,28 +28,52 @@
         </el-table-column>
         <el-table-column label="收入">
           <el-table-column label="到账金额" prop="sumClaimMoney" width="140" />
-          <el-table-column label="退税金额" prop="refundableAmount" width="140" />
-          <el-table-column label="其他收入" prop="otherIncomeAmount" width="140" />
+          <el-table-column
+            label="退税金额"
+            prop="refundableAmount"
+            width="140"
+          />
+          <el-table-column
+            label="其他收入"
+            prop="otherIncomeAmount"
+            width="140"
+          />
         </el-table-column>
-        <el-table-column label="采购合同金额" prop="sumPurchaseContractMoney" width="140" />
+        <el-table-column
+          label="采购合同金额"
+          prop="sumPurchaseContractMoney"
+          width="140"
+        />
         <el-table-column label="支出">
           <el-table-column label="已付货款" prop="accountPaid" width="140" />
           <el-table-column label="代理费" prop="agencyFee" width="140" />
           <el-table-column label="拖车费" prop="trailerFee" width="140" />
           <el-table-column label="报关费" prop="customsFee" width="140" />
           <el-table-column label="港杂费" prop="portMixedFee" width="140" />
-          <el-table-column label="验货红包" prop="inspectionRedPack" width="140" />
+          <el-table-column
+            label="验货红包"
+            prop="inspectionRedPack"
+            width="140"
+          />
           <el-table-column label="佣金" prop="commission" width="140" />
           <el-table-column label="检测费" prop="checkout" width="140" />
           <el-table-column label="验货费" prop="inspectionCharge" width="140" />
           <el-table-column label="运费" prop="freight" width="140" />
-          <el-table-column label="产地证费" prop="certificateOfOrigin" width="140" />
+          <el-table-column
+            label="产地证费"
+            prop="certificateOfOrigin"
+            width="140"
+          />
           <el-table-column label="其他" prop="other" width="140" />
         </el-table-column>
         <el-table-column label="备注" prop="remark" width="200" />
         <el-table-column label="统计">
           <el-table-column label="收入合计" prop="incomeAmount" width="140" />
-          <el-table-column label="支出合计" prop="expenditureAmount" width="140" />
+          <el-table-column
+            label="支出合计"
+            prop="expenditureAmount"
+            width="140"
+          />
           <el-table-column label="毛利" prop="gross" width="140" />
           <el-table-column label="毛利率" width="140">
             <template #default="{ row }">
@@ -54,8 +84,12 @@
         <el-table-column label="操作" align="center" width="120" fixed="right">
           <template #default="{ row }">
             <div>
-              <el-button type="primary" @click="changeAgencyFee(row)" link>代理费</el-button>
-              <el-button type="primary" @click="changeRemark(row)" link>备注</el-button>
+              <el-button type="primary" @click="changeAgencyFee(row)" link
+                >代理费</el-button
+              >
+              <el-button type="primary" @click="changeRemark(row)" link
+                >备注</el-button
+              >
             </div>
           </template>
         </el-table-column>
@@ -68,39 +102,69 @@
           :page-size="sourceList.pagination.pageSize"
           :total="sourceList.pagination.total"
           @size-change="handleSizeChange"
-          @current-change="handlePageChange" />
+          @current-change="handlePageChange"
+        />
       </el-row>
     </div>
 
-    <el-dialog title="代理费" v-if="openAgencyFee" v-model="openAgencyFee" width="400">
-      <byForm :formConfig="formAgencyFeeConfig" :formOption="formOption" v-model="formAgencyFeeData.data" ref="agencyFee">
+    <el-dialog
+      title="代理费"
+      v-if="openAgencyFee"
+      v-model="openAgencyFee"
+      width="400"
+    >
+      <byForm
+        :formConfig="formAgencyFeeConfig"
+        :formOption="formOption"
+        v-model="formAgencyFeeData.data"
+        ref="agencyFee"
+      >
         <template #agencyFee>
           <div style="width: 100%">
             <el-form-item label="代理费" prop="agencyFee">
-              <el-input-number onmousewheel="return false;" v-model="formAgencyFeeData.data.agencyFee" :precision="2" :controls="false" :min="0" />
+              <el-input-number
+                onmousewheel="return false;"
+                v-model="formAgencyFeeData.data.agencyFee"
+                :precision="2"
+                :controls="false"
+                :min="0"
+              />
             </el-form-item>
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="openAgencyFee = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitAgencyFeeForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitAgencyFeeForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
 
     <el-dialog title="备注" v-if="openRemark" v-model="openRemark" width="400">
-      <byForm :formConfig="formRemarkConfig" :formOption="formOption" v-model="formRemarkData.data" ref="remark">
+      <byForm
+        :formConfig="formRemarkConfig"
+        :formOption="formOption"
+        v-model="formRemarkData.data"
+        ref="remark"
+      >
         <template #remark>
           <div style="width: 100%">
             <el-form-item label="备注" prop="remark">
-              <el-input v-model="formRemarkData.data.remark" :rows="4" type="textarea" />
+              <el-input
+                v-model="formRemarkData.data.remark"
+                :rows="4"
+                type="textarea"
+              />
             </el-form-item>
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="openRemark = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitRemarkForm()" size="large">确 定</el-button>
+        <el-button type="primary" @click="submitRemarkForm()" size="large"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -151,13 +215,15 @@ const getDict = () => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/contract/getProfitClearingPage", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res.rows;
-    sourceList.value.pagination.total = res.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/contract/getProfitClearingPage", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 getDict();
 getList();

+ 13 - 6
src/views/EHSD/saleContract/exportTracking/index.vue

@@ -887,6 +887,7 @@ const headerList = ref([
 ]);
 const isShowSalesmanArrange = ref(true);
 const isShowSalesFinancemanArrange = ref(true);
+const isPurchasingManager = ref(false);
 const checkShow = () => {
   // 当前账号角色如果不是业务总监、总经理、业务员,则不能查看
   if (
@@ -909,6 +910,10 @@ const checkShow = () => {
   ) {
     isShowSalesFinancemanArrange.value = false;
   }
+  // 当前角色是否是采购主管
+  if (userInfo.roles.includes("purchasingOfficer")) {
+    isPurchasingManager.value = true;
+  }
 };
 checkShow();
 const arrangeInit = () => {
@@ -1288,12 +1293,14 @@ const openDetails = (row) => {
   //   },
   // });
   // window.open(page.href, "_blank");
-  proxy.$router.push({
-    name: "contractDetails",
-    query: {
-      currentContractId: row.id,
-    },
-  });
+  if (!isPurchasingManager.value) {
+    proxy.$router.push({
+      name: "contractDetails",
+      query: {
+        currentContractId: row.id,
+      },
+    });
+  }
 };
 
 const clickCorporationName = (row) => {