浏览代码

部分功能模块调整

cz 1 年之前
父节点
当前提交
595e138db7
共有 41 个文件被更改,包括 1810 次插入990 次删除
  1. 5 8
      src/components/byTable/index.vue
  2. 2 2
      src/components/headerBar/header-bar.vue
  3. 13 0
      src/components/process/SF/Contract.vue
  4. 12 0
      src/components/process/SF/ContractChange.vue
  5. 16 14
      src/components/process/SF/Purchase.vue
  6. 10 9
      src/components/process/SF/PurchaseChange.vue
  7. 13 12
      src/components/process/SendFunds.vue
  8. 1 1
      src/directive/permission/hasPermi.js
  9. 181 168
      src/views/EHSD/procurement/purchasedEHSD/index.vue
  10. 5 0
      src/views/EHSD/procurement/returnGood/index.vue
  11. 28 3
      src/views/EHSD/productLibrary/companyProduct/index.vue
  12. 9 0
      src/views/EHSD/saleContract/PriceSheetDetail.vue
  13. 175 172
      src/views/EHSD/saleContract/contractEHSD/index.vue
  14. 265 212
      src/views/EHSD/saleContract/performanceSet/index.vue
  15. 217 62
      src/views/EHSD/saleContract/priceSheetEHSD/index.vue
  16. 27 13
      src/views/EHSD/saleContract/priceSheetEstimate/index.vue
  17. 14 2
      src/views/EHSD/saleContract/priceSheetForeign/index.vue
  18. 384 0
      src/views/EHSD/saleContract/productionReport/index.vue
  19. 14 2
      src/views/MES/processScheduling/index.vue
  20. 16 5
      src/views/MES/productionOrder/index.vue
  21. 0 5
      src/views/MES/productionScheduling/index.vue
  22. 41 31
      src/views/MES/productionTask/index.vue
  23. 25 0
      src/views/MES/supplementaryOrder/index.vue
  24. 7 2
      src/views/finance/fundManage/accountPayment/index.vue
  25. 7 2
      src/views/finance/fundManage/flow/index.vue
  26. 7 2
      src/views/finance/fundManage/funds/index.vue
  27. 3 3
      src/views/process/processApproval/index.vue
  28. 17 37
      src/views/purchaseManage/purchaseManage/purchase/index.vue
  29. 7 22
      src/views/purchaseManage/purchaseManage/subscribe/index.vue
  30. 48 45
      src/views/purchaseManage/purchasePayment/invoice/index.vue
  31. 18 15
      src/views/purchaseManage/purchasePayment/payment/index.vue
  32. 33 22
      src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue
  33. 12 7
      src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue
  34. 12 7
      src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue
  35. 12 7
      src/views/purchaseSales/outAndInWarehouse/record/index.vue
  36. 10 3
      src/views/purchaseSales/outAndInWarehouse/snapshot/index.vue
  37. 22 17
      src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue
  38. 22 17
      src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue
  39. 40 17
      src/views/purchaseSales/stockManage/inventory/index.vue
  40. 42 44
      src/views/salesMange/saleContract/claim/index.vue
  41. 18 0
      src/views/systemTenant/tenant/userTenant/index.vue

+ 5 - 8
src/components/byTable/index.vue

@@ -594,11 +594,11 @@ export default defineComponent({
 
     const isSelectable = (row, index, item) => {
       if (item.type === "selection") {
-        if (item.attrs && item.attrs.isJudge) {
-          if (row.companyId) {
-            return proxy.isCurrentCompanyData(row.companyId);
-          }
-        }
+        // if (item.attrs && item.attrs.isJudge) {
+        // if (row.companyId) {
+        //   return proxy.isCurrentCompanyData(row.companyId);
+        // }
+        // }
         if (item.attrs && item.attrs.checkAtt) {
           if (row[item.attrs.checkAtt]) {
             return row[item.attrs.checkAtt];
@@ -667,9 +667,6 @@ export default defineComponent({
 }
 </style>
 <style lang="scss" scoped>
-.sortableActive {
-  background: #f5f7fa !important;
-}
 .show-more {
   height: auto !important;
 }

+ 2 - 2
src/components/headerBar/header-bar.vue

@@ -139,11 +139,11 @@
           </div>
           <template #dropdown>
             <el-dropdown-menu>
-              <!-- <router-link to="/user/profile">
+              <router-link to="/user/profile">
                 <el-dropdown-item>{{
                   $t("header.personalCenter")
                 }}</el-dropdown-item>
-              </router-link> -->
+              </router-link>
               <!-- <el-dropdown-item command="setLayout">
                 <span>{{ $t("header.layoutSettings") }}</span>
               </el-dropdown-item> -->

+ 13 - 0
src/components/process/SF/Contract.vue

@@ -530,6 +530,15 @@ const formConfig = computed(() => {
       isShow: formData.data.code ? true : false,
     },
     {
+      type: "treeSelect",
+      prop: "ofCompanyId",
+      label: "业务公司",
+      data: proxy.useUserStore().allDict["tree_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+    },
+    {
       type: "select",
       prop: "contractType",
       label: "订单类型",
@@ -869,6 +878,9 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
+  ofCompanyId: [
+    { required: true, message: "请选择业务公司", trigger: "change" },
+  ],
   companyId: [{ required: true, message: "请选择生产公司", trigger: "change" }],
   contractType: [
     { required: true, message: "请选择订单类型", trigger: "change" },
@@ -1745,6 +1757,7 @@ const getPriceSheetData = (id) => {
       templateContent: "",
       quotationId: res.id,
       companyId: res.companyId,
+      ofCompanyId: res.ofCompanyId,
       buyCorporationId: res.buyCorporationId,
       buyAddress: res.buyAddress,
       buyPostalCode: res.buyPostalCode,

+ 12 - 0
src/components/process/SF/ContractChange.vue

@@ -530,6 +530,15 @@ const formConfig = computed(() => {
       isShow: formData.data.code ? true : false,
     },
     {
+      type: "treeSelect",
+      prop: "ofCompanyId",
+      label: "业务公司",
+      data: proxy.useUserStore().allDict["tree_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+    },
+    {
       type: "select",
       prop: "contractType",
       label: "订单类型",
@@ -870,6 +879,9 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
+  ofCompanyId: [
+    { required: true, message: "请选择业务公司", trigger: "change" },
+  ],
   companyId: [{ required: true, message: "请选择生产公司", trigger: "change" }],
   contractType: [
     { required: true, message: "请选择订单类型", trigger: "change" },

+ 16 - 14
src/components/process/SF/Purchase.vue

@@ -394,6 +394,7 @@ const formConfig = computed(() => {
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
       itemWidth: 50,
+      disabled: true,
     },
     {
       type: "title",
@@ -472,15 +473,15 @@ const formConfig = computed(() => {
         return moment(date).isBefore(moment());
       },
     },
-    {
-      type: "number",
-      prop: "warranty",
-      label: "质保期 (天)",
-      precision: 0,
-      min: 0,
-      controls: false,
-      itemWidth: 50,
-    },
+    // {
+    //   type: "number",
+    //   prop: "warranty",
+    //   label: "质保期 (天)",
+    //   precision: 0,
+    //   min: 0,
+    //   controls: false,
+    //   itemWidth: 50,
+    // },
     // {
     //   type: "select",
     //   prop: "transportMethod",
@@ -761,10 +762,10 @@ const changeSupplierPrice = (val) => {
             }
           }
         } else {
-          for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
-            const e = formData.data.purchaseProductList[i];
-            e.price = 0;
-          }
+          // for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
+          //   const e = formData.data.purchaseProductList[i];
+          //   e.price = 0;
+          // }
         }
         calculationAmount();
       });
@@ -1042,6 +1043,7 @@ const getAllData = (businessId) => {
 const getProductList = (ids) => {
   if (ids && ids.length > 0) {
     proxy.post("/subscribeDetail/detail", { ids }).then((res) => {
+      formData.data.companyId = route.query.companyId;
       if (res && res.length > 0) {
         formData.data.purchaseProductList = res.map((item) => {
           let dataResourceId =
@@ -1057,7 +1059,7 @@ const getProductList = (ids) => {
             subscribeCount: item.count || 0,
             purchaseCount: item.purchaseCount || 0,
             quantity: null,
-            price: "",
+            price: null,
             amount: "",
             remark: "",
             fileUrl: "",

+ 10 - 9
src/components/process/SF/PurchaseChange.vue

@@ -395,6 +395,7 @@ const formConfig = computed(() => {
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
       itemWidth: 50,
+      disabled: true,
     },
     {
       type: "title",
@@ -473,15 +474,15 @@ const formConfig = computed(() => {
         return moment(date).isBefore(moment());
       },
     },
-    {
-      type: "number",
-      prop: "warranty",
-      label: "质保期 (天)",
-      precision: 0,
-      min: 0,
-      controls: false,
-      itemWidth: 50,
-    },
+    // {
+    //   type: "number",
+    //   prop: "warranty",
+    //   label: "质保期 (天)",
+    //   precision: 0,
+    //   min: 0,
+    //   controls: false,
+    //   itemWidth: 50,
+    // },
     // {
     //   type: "select",
     //   prop: "transportMethod",

+ 13 - 12
src/components/process/SendFunds.vue

@@ -9,9 +9,9 @@
       </div>
       <el-row :gutter="20">
         <el-col :span="6">
-          <el-form-item label="业务公司" prop="corporationId">
-            <el-select v-model="formData.data.corporationId" placeholder="请选择" filterable style="width: 100%" @change="changeType">
-              <el-option v-for="item in companyData" :label="item.name" :value="item.id">
+          <el-form-item label="业务公司" prop="companyId">
+            <el-select v-model="formData.data.companyId" placeholder="请选择" filterable style="width: 100%" @change="changeType">
+              <el-option v-for="item in companyData" :label="item.deptName" :value="item.deptId">
               </el-option>
             </el-select>
           </el-form-item>
@@ -762,6 +762,7 @@ import { useRoute } from "vue-router";
 import moment from "moment";
 import { NumberToChinese } from "@/utils/util.js";
 import TitleInfo from "@/components/TitleInfo/index.vue";
+import { computed } from "vue";
 
 const route = useRoute();
 const { proxy } = getCurrentInstance();
@@ -790,9 +791,7 @@ const formData = reactive({
   },
 });
 let rules = ref({
-  corporationId: [
-    { required: true, message: "请选择业务公司", trigger: "change" },
-  ],
+  companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
   departmentId: [
     { required: true, message: "请选择归属部门", trigger: "change" },
   ],
@@ -936,7 +935,9 @@ onMounted(() => {
   }
 });
 
-const companyData = ref([]);
+const companyData = computed(
+  () => proxy.useUserStore().allDict["tree_company_data"]
+);
 const accountData = ref([]);
 const deptTreeData = ref([]);
 const fundsType = ref([]);
@@ -948,11 +949,11 @@ const contractList = ref([]);
 const bankList = ref([]);
 const getDictData = () => {
   // 获取业务公司数据
-  proxy
-    .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
-    .then((res) => {
-      companyData.value = res.rows;
-    });
+  // proxy
+  //   .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
+  //   .then((res) => {
+  //     companyData.value = res.rows;
+  //   });
   // 账户数据
   proxy
     .post("/accountManagement/page", { pageNum: 1, pageSize: 9999 })

+ 1 - 1
src/directive/permission/hasPermi.js

@@ -12,7 +12,7 @@
      } = binding
      const all_permission = "*:*:*";
      const permissions = useUserStore().permissions
-
+     console.log(permissions, value, 'ssaa');
      if (value && value instanceof Array && value.length > 0) {
        const permissionFlag = value
 

+ 181 - 168
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -43,45 +43,78 @@
     </el-dialog>
 
     <el-dialog title="到货登记" v-model="arrivalDialog" width="80%" destroy-on-close>
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
-        <template #details>
-          <div style="width:100%;padding:0 15px">
-            <el-table :data="formData.data.arrivalDetailList">
-              <el-table-column label="商品图片" width="80">
-                <template #default="{ row }">
-                  <div v-if="row.fileUrl">
-                    <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column prop="productCode" label="商品编码" width="200" />
-              <el-table-column prop="productName" label="商品名称" min-width="130" />
-              <el-table-column label="尺寸 (cm)" width="140">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column label="采购数量" prop="purchaseQuantity" width="100" />
-              <el-table-column label="可登记最大数量(105%)" prop="maxQuantity" width="190" />
-              <el-table-column label="已到货数量" prop="arrivalQuantity" width="100" />
-              <el-table-column prop="quantity" label="到货数量" width="130">
-                <template #default="{ row, $index }">
-                  <el-form-item :prop="'arrivalDetailList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
-                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
-                                     :controls="false" :min="0" />
-                  </el-form-item>
-                </template>
-              </el-table-column>
-            </el-table>
-          </div>
-        </template>
+      <el-tabs v-model="activeName" class="demo-tabs" type="card" @tab-change="handleTabChange">
+        <el-tab-pane label="到货登记" name="1">
+          <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+            <template #details>
+              <div style="width:100%;padding:0 15px">
+                <el-table :data="formData.data.arrivalDetailList">
+                  <el-table-column label="商品图片" width="80">
+                    <template #default="{ row }">
+                      <div v-if="row.fileUrl">
+                        <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                      </div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="productCode" label="商品编码" width="200" />
+                  <el-table-column prop="productName" label="商品名称" min-width="130" />
+                  <el-table-column label="尺寸 (cm)" width="140">
+                    <template #default="{ row, $index }">
+                      <div style="width: 100%">
+                        {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                      </div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="采购数量" prop="purchaseQuantity" width="100" />
+                  <el-table-column label="可登记最大数量(105%)" prop="maxQuantity" width="190" />
+                  <el-table-column label="已到货数量" prop="arrivalQuantity" width="100" />
+                  <el-table-column prop="quantity" label="到货数量" width="130">
+                    <template #default="{ row, $index }">
+                      <el-form-item :prop="'arrivalDetailList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
+                                    class="margin-b-0">
+                        <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
+                                         :controls="false" :min="0" />
+                      </el-form-item>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </div>
+            </template>
 
-        <template #details1>
+            <template #details1>
+              <div style="width:100%;padding:0 15px">
+                <el-table :data="formData.data.arrivalDetailListOne">
+                  <el-table-column label="到货日期" prop="arrivalTime" width="150" />
+                  <el-table-column label="商品图片" width="80">
+                    <template #default="{ row }">
+                      <div v-if="row.fileUrl">
+                        <img :src="row.fileUrl" class="pic" @click="openImg(row.fileUrl)" />
+                      </div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="productCode" label="商品编码" width="200" />
+                  <el-table-column prop="productName" label="商品名称" min-width="130" />
+                  <el-table-column label="尺寸 (cm)" width="140">
+                    <template #default="{ row, $index }">
+                      <div style="width: 100%">
+                        {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                      </div>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="采购数量" prop="purchaseQuantity" width="100" />
+                  <el-table-column label="到货数量" prop="quantity" width="100" />
+                </el-table>
+              </div>
+            </template>
+          </byForm>
+        </el-tab-pane>
+        <el-tab-pane label="历史到货登记" name="2">
+          <div style="margin:10px 0">
+            <TitleInfo :content="'历史到货登记'"></TitleInfo>
+          </div>
           <div style="width:100%;padding:0 15px">
             <el-table :data="formData.data.arrivalDetailListOne">
-              <el-table-column label="到货日期" prop="arrivalTime" width="150" />
+              <el-table-column label="到货日期" prop="arrivalTime" width="110" :formatter="(row)=>row.arrivalTime.slice(0,10)" />
               <el-table-column label="商品图片" width="80">
                 <template #default="{ row }">
                   <div v-if="row.fileUrl">
@@ -102,9 +135,8 @@
               <el-table-column label="到货数量" prop="quantity" width="100" />
             </el-table>
           </div>
-        </template>
-
-      </byForm>
+        </el-tab-pane>
+      </el-tabs>
       <template #footer>
         <el-button @click="arrivalDialog = false" size="defualt" v-debounce>取 消</el-button>
         <el-button type="primary" @click="submitForm()" size="defualt" v-debounce>
@@ -127,6 +159,7 @@ import PurchasePDF from "@/components/PDF/purchasePDF.vue";
 
 const route = useRoute();
 const { proxy } = getCurrentInstance();
+const activeName = ref("1");
 const supplierList = ref([]);
 const status = ref([
   {
@@ -194,7 +227,7 @@ const selectConfig = computed(() => {
     {
       label: "业务公司",
       prop: "companyId",
-      data: companyData.value,
+      data: proxy.useUserStore().allDict["list_company_data"],
     },
     {
       label: "采购状态",
@@ -291,117 +324,114 @@ const config = computed(() => {
         fixed: "right",
       },
       renderHTML(row) {
-        return proxy.isCurrentCompanyData(row.companyId)
-          ? [
-              row.status == 30 && row.arrivalStatus == 0
-                ? {
-                    attrs: {
-                      label: "变更",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      handleChange(row);
-                    },
-                  }
-                : {},
-              row.status == 30
-                ? {
-                    attrs: {
-                      label: "到货登记",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      handleArrival(row);
-                    },
-                  }
-                : {},
-              {
+        return [
+          row.status == 30 && row.arrivalStatus == 0
+            ? {
+                attrs: {
+                  label: "变更",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  handleChange(row);
+                },
+              }
+            : {},
+          row.status == 30
+            ? {
                 attrs: {
-                  label: "打印",
+                  label: "到货登记",
                   type: "primary",
                   text: true,
                 },
                 el: "button",
                 click() {
-                  handlePrintPdf(row);
+                  handleArrival(row);
+                },
+              }
+            : {},
+          {
+            attrs: {
+              label: "打印",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              handlePrintPdf(row);
+            },
+          },
+          // && Number(row.amount) > Number(row.sumPayMoney)
+          row.status == 10 || (row.status == 30 && Number(row.sumPayMoney) == 0)
+            ? {
+                attrs: {
+                  label: "作废",
+                  type: "danger",
+                  text: true,
                 },
-              },
-              // && Number(row.amount) > Number(row.sumPayMoney)
-              row.status == 10 ||
-              (row.status == 30 && Number(row.sumPayMoney) == 0)
-                ? {
-                    attrs: {
-                      label: "作废",
-                      type: "danger",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      ElMessageBox.confirm(
-                        "此操作将作废该数据, 是否继续?",
-                        "提示",
-                        {
-                          confirmButtonText: "确定",
-                          cancelButtonText: "取消",
-                          type: "warning",
-                        }
-                      ).then(() => {
-                        proxy
-                          .post("/ehsdPurchase/cancellation", {
-                            id: row.id,
-                            status: 88,
-                          })
-                          .then(() => {
-                            ElMessage({
-                              message: "作废成功",
-                              type: "success",
-                            });
-                            getList();
-                          });
+                el: "button",
+                click() {
+                  ElMessageBox.confirm(
+                    "此操作将作废该数据, 是否继续?",
+                    "提示",
+                    {
+                      confirmButtonText: "确定",
+                      cancelButtonText: "取消",
+                      type: "warning",
+                    }
+                  ).then(() => {
+                    proxy
+                      .post("/ehsdPurchase/cancellation", {
+                        id: row.id,
+                        status: 88,
+                      })
+                      .then(() => {
+                        ElMessage({
+                          message: "作废成功",
+                          type: "success",
+                        });
+                        getList();
                       });
-                    },
-                  }
-                : {},
-              row.status == 30 && Number(row.amount) > Number(row.sumPayMoney)
-                ? {
-                    attrs: {
-                      label: "终止",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      ElMessageBox.confirm(
-                        "此操作将终止该数据, 是否继续?",
-                        "提示",
-                        {
-                          confirmButtonText: "确定",
-                          cancelButtonText: "取消",
-                          type: "warning",
-                        }
-                      ).then(() => {
-                        proxy
-                          .post("/ehsdPurchase/edit", {
-                            id: row.id,
-                            status: 99,
-                          })
-                          .then(() => {
-                            ElMessage({
-                              message: "终止",
-                              type: "success",
-                            });
-                            getList();
-                          });
+                  });
+                },
+              }
+            : {},
+          row.status == 30 && Number(row.amount) > Number(row.sumPayMoney)
+            ? {
+                attrs: {
+                  label: "终止",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  ElMessageBox.confirm(
+                    "此操作将终止该数据, 是否继续?",
+                    "提示",
+                    {
+                      confirmButtonText: "确定",
+                      cancelButtonText: "取消",
+                      type: "warning",
+                    }
+                  ).then(() => {
+                    proxy
+                      .post("/ehsdPurchase/edit", {
+                        id: row.id,
+                        status: 99,
+                      })
+                      .then(() => {
+                        ElMessage({
+                          message: "终止",
+                          type: "success",
+                        });
+                        getList();
                       });
-                    },
-                  }
-                : {},
-            ]
-          : [];
+                  });
+                },
+              }
+            : {},
+        ];
       },
     },
   ];
@@ -418,23 +448,6 @@ const getDict = () => {
         };
       });
     });
-
-  proxy
-    .get("/tenantDept/list", {
-      pageNum: 1,
-      pageSize: 9999,
-      keyword: "",
-      tenantId: proxy.useUserStore().user.tenantId,
-      type: 0,
-    })
-    .then((res) => {
-      companyData.value = res.data.map((x) => ({
-        ...x,
-        label: x.deptName,
-        value: x.deptId,
-      }));
-      // treeData.value = proxy.handleTree(res.data, "deptId");
-    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -564,15 +577,15 @@ const formConfig = computed(() => {
       slotName: "details",
       label: "",
     },
-    {
-      type: "title1",
-      title: "历史到货登记",
-    },
-    {
-      type: "slot",
-      slotName: "details1",
-      label: "",
-    },
+    // {
+    //   type: "title1",
+    //   title: "历史到货登记",
+    // },
+    // {
+    //   type: "slot",
+    //   slotName: "details1",
+    //   label: "",
+    // },
   ];
 });
 

+ 5 - 0
src/views/EHSD/procurement/returnGood/index.vue

@@ -166,6 +166,11 @@ const selectConfig = computed(() => [
   //     },
   //   ],
   // },
+  {
+    label: "业务公司",
+    prop: "companyId",
+    data: proxy.useUserStore().allDict["list_company_data"],
+  },
 ]);
 const config = computed(() => {
   return [

+ 28 - 3
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -74,19 +74,19 @@
                   <el-col :span="8">
                     <el-form-item prop="length" label-width="0px" class="margin-b-0 wid100">
                       <el-input-number v-model="formData.data['length']" placeholder="长 (cm)" style="width: 100%" :precision="2" :controls="false"
-                                       :min="0" onmousewheel="return false;" />
+                                       :min="0" onmousewheel="return false;" @change="getPriceData" />
                     </el-form-item>
                   </el-col>
                   <el-col :span="8">
                     <el-form-item prop="width" label-width="0px" class="margin-b-0 wid100">
                       <el-input-number v-model="formData.data.width" placeholder="宽 (cm)" style="width: 100%" :precision="2" :controls="false"
-                                       :min="0" onmousewheel="return false;" />
+                                       :min="0" onmousewheel="return false;" @change="getPriceData" />
                     </el-form-item>
                   </el-col>
                   <el-col :span="8">
                     <el-form-item prop="height" label-width="0px" class="margin-b-0 wid100">
                       <el-input-number v-model="formData.data.height" placeholder="高 (cm)" style="width: 100%" :precision="2" :controls="false"
-                                       :min="0" onmousewheel="return false;" />
+                                       :min="0" onmousewheel="return false;" @change="getPriceData" />
                     </el-form-item>
                   </el-col>
                 </el-row>
@@ -485,6 +485,27 @@ const config = computed(() => {
   ];
 });
 
+const getPriceData = () => {
+  if (
+    formData.data["length"] &&
+    formData.data.width &&
+    formData.data.technologyId &&
+    formData.data.rawMaterialId
+  ) {
+    proxy
+      .post("/productInfo/getProductPrice", {
+        id: formData.data.id || "",
+        length: formData.data["length"],
+        width: formData.data.width,
+        technologyId: formData.data.technologyId,
+        rawMaterialId: formData.data.rawMaterialId,
+      })
+      .then((res) => {
+        formData.data.price = res.price;
+      });
+  }
+};
+
 const formData = reactive({
   data: {},
   bomData: {},
@@ -589,6 +610,7 @@ const formConfig = computed(() => {
             ).toFixed(2)
           );
         }
+        getPriceData();
       },
     },
     {
@@ -618,6 +640,9 @@ const formConfig = computed(() => {
       data: technologyData.value,
       filterable: true,
       disabled: false,
+      fn: () => {
+        getPriceData();
+      },
     },
     // {
     //   type: "input",

+ 9 - 0
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -249,6 +249,15 @@ const formConfig = computed(() => {
     // },
     {
       type: "treeSelect",
+      prop: "ofCompanyId",
+      label: "业务公司",
+      data: proxy.useUserStore().allDict["tree_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+    },
+    {
+      type: "treeSelect",
       prop: "companyId",
       label: "报价公司",
       data: treeData.value,

+ 175 - 172
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -414,6 +414,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "ofCompanyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "订单类型",
       prop: "contractType",
       data: contractType.value,
@@ -511,6 +516,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "ofCompanyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "订单类型",
         slot: "contractType",
         width: 110,
@@ -525,13 +537,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "业务公司",
-        prop: "ofCompanyName",
-        width: 120,
-      },
-    },
-    {
-      attrs: {
         label: "工厂",
         prop: "companyName",
         width: 120,
@@ -720,177 +725,175 @@ const config = computed(() => {
         fixed: "right",
       },
       renderHTML(row) {
-        return proxy.isCurrentCompanyData(row.ofCompanyId)
-          ? [
-              row.status == 30 &&
-              (row.orderDistributeStatus == 0 || row.orderDistributeStatus == 2)
-                ? {
-                    attrs: {
-                      label: "生产",
-                      type: "danger",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      clickDistributeProduction(row);
-                    },
-                  }
-                : {},
+        return [
+          row.status == 30 &&
+          (row.orderDistributeStatus == 0 || row.orderDistributeStatus == 2)
+            ? {
+                attrs: {
+                  label: "生产",
+                  type: "danger",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickDistributeProduction(row);
+                },
+              }
+            : {},
 
-              route.query.pageType == "1"
-                ? {
-                    attrs: {
-                      label: "转销售订单",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      trunContract(row);
-                    },
-                  }
-                : {},
-              // row.status == 30 &&
-              // row.outboundStatus == 0 &&
-              // row.produceStatus == 2
-              //   ? {
-              //       attrs: {
-              //         label: "销售出库",
-              //         type: "primary",
-              //         text: true,
-              //       },
-              //       el: "button",
-              //       click() {
-              //         proxy
-              //           .msgConfirm()
-              //           .then((res) => {
-              //             proxy
-              //               .post("/contract/saleOutbound", {
-              //                 id: row.id,
-              //               })
-              //               .then((res) => {
-              //                 proxy.msgTip("操作成功", 1);
-              //                 getList();
-              //               });
-              //           })
-              //           .catch((err) => {});
-              //       },
-              //     }
-              //   : {},
-              row.status == 30 && row.produceStatus != 10
-                ? {
-                    attrs: {
-                      label: "变更",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      clickAlteration(row);
-                    },
-                  }
-                : {},
+          route.query.pageType == "1"
+            ? {
+                attrs: {
+                  label: "转销售订单",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  trunContract(row);
+                },
+              }
+            : {},
+          // row.status == 30 &&
+          // row.outboundStatus == 0 &&
+          // row.produceStatus == 2
+          //   ? {
+          //       attrs: {
+          //         label: "销售出库",
+          //         type: "primary",
+          //         text: true,
+          //       },
+          //       el: "button",
+          //       click() {
+          //         proxy
+          //           .msgConfirm()
+          //           .then((res) => {
+          //             proxy
+          //               .post("/contract/saleOutbound", {
+          //                 id: row.id,
+          //               })
+          //               .then((res) => {
+          //                 proxy.msgTip("操作成功", 1);
+          //                 getList();
+          //               });
+          //           })
+          //           .catch((err) => {});
+          //       },
+          //     }
+          //   : {},
+          row.status == 30 && row.produceStatus != 10
+            ? {
+                attrs: {
+                  label: "变更",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickAlteration(row);
+                },
+              }
+            : {},
 
-              row.status == 30
-                ? {
-                    attrs: {
-                      label: "打印",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      clickPrint(row);
-                    },
-                  }
-                : {},
-              // row.orderDistributeStatus == 1
-              //   ? {}
-              //   :
-              (row.status == 10 ||
-                (row.status == 30 && Number(row.sumClaimMoney) == 0)) &&
-              (row.produceStatus == 0 || row.produceStatus == null)
-                ? {
-                    attrs: {
-                      label: "作废",
-                      type: "danger",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
+          row.status == 30
+            ? {
+                attrs: {
+                  label: "打印",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickPrint(row);
+                },
+              }
+            : {},
+          // row.orderDistributeStatus == 1
+          //   ? {}
+          //   :
+          (row.status == 10 ||
+            (row.status == 30 && Number(row.sumClaimMoney) == 0)) &&
+          (row.produceStatus == 0 || row.produceStatus == null)
+            ? {
+                attrs: {
+                  label: "作废",
+                  type: "danger",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  proxy
+                    .msgConfirm()
+                    .then((res) => {
                       proxy
-                        .msgConfirm()
+                        .post("/contract/cancellation", {
+                          id: row.id,
+                        })
                         .then((res) => {
-                          proxy
-                            .post("/contract/cancellation", {
-                              id: row.id,
-                            })
-                            .then((res) => {
-                              proxy.msgTip("操作成功", 1);
+                          proxy.msgTip("操作成功", 1);
 
-                              getList();
-                            });
-                        })
-                        .catch((err) => {});
-                    },
-                  }
-                : {},
-              row.status == 30 && row.isSettled == "0"
-                ? {
-                    attrs: {
-                      label: "结清",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      ElMessageBox.confirm("是否确认结清?", "提示", {
-                        confirmButtonText: "确定",
-                        cancelButtonText: "取消",
-                        type: "warning",
-                      }).then(() => {
-                        proxy
-                          .post("/contract/settle", {
-                            id: row.id,
-                          })
-                          .then(() => {
-                            ElMessage({
-                              message: "操作成功",
-                              type: "success",
-                            });
-                            getList();
-                          });
+                          getList();
+                        });
+                    })
+                    .catch((err) => {});
+                },
+              }
+            : {},
+          row.status == 30 && row.isSettled == "0"
+            ? {
+                attrs: {
+                  label: "结清",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  ElMessageBox.confirm("是否确认结清?", "提示", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning",
+                  }).then(() => {
+                    proxy
+                      .post("/contract/settle", {
+                        id: row.id,
+                      })
+                      .then(() => {
+                        ElMessage({
+                          message: "操作成功",
+                          type: "success",
+                        });
+                        getList();
                       });
-                    },
-                  }
-                : {},
-              // {
-              //   attrs: {
-              //     label: "生产指示",
-              //     type: "primary",
-              //     text: true,
-              //   },
-              //   el: "button",
-              //   click() {
-              //     handleEditTag(row);
-              //   },
-              // },
-              row.isSettled == "1"
-                ? {
-                    attrs: {
-                      label: "售后",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      openRecords.value = true;
-                      getRecordsData(row);
-                    },
-                  }
-                : {},
-            ]
-          : [];
+                  });
+                },
+              }
+            : {},
+          // {
+          //   attrs: {
+          //     label: "生产指示",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     handleEditTag(row);
+          //   },
+          // },
+          row.isSettled == "1"
+            ? {
+                attrs: {
+                  label: "售后",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  openRecords.value = true;
+                  getRecordsData(row);
+                },
+              }
+            : {},
+        ];
       },
     },
   ];

+ 265 - 212
src/views/EHSD/saleContract/performanceSet/index.vue

@@ -1,252 +1,305 @@
 <template>
   <div class="pageIndexClass">
-    <div>
-      <byTable :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading"
-               highlight-current-row :selectConfig="selectConfig" :action-list="[]" :tableBorder="true" :span-method="objectSpanMethod"
-               @get-list="getList">
-        <template v-for="(month, index) in attrData" v-slot:[month]="{ item }" :key="month">
-          <div style="width:100%">
-            <el-input-number v-model="item[month]" :placeholder="''+monthData[index]+'月绩效'" onmousewheel="return false;" :precision="2"
-                             :controls="false" :min="0" @change="(val)=>handleChangeVal(item,month,val)" :disabled="getIsDisabled(index)"
-                             style="width:100%">
-            </el-input-number>
+    <div style="background-color: #fff; padding: 15px 15px 0">
+      <el-form :inline="true" :model="sourceList.pagination">
+        <el-form-item label="">
+          <el-radio-group v-model="sourceList.pagination.current" size="default" @change="changeCurrent">
+            <el-radio-button label="本日" />
+            <el-radio-button label="本周" />
+            <el-radio-button label="本月" />
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="其他">
+          <el-date-picker v-model="sourceList.pagination.beginTime" type="date" placeholder="开始日期" value-format="YYYY-MM-DD 00:00:00"
+                          :disabled-date="disabledFn" />
+          <div style="padding:0 10px">
+            -
           </div>
+          <el-date-picker v-model="sourceList.pagination.endTime" type="date" placeholder="结束日期" value-format="YYYY-MM-DD 23:59:59"
+                          :disabled-date="disabledFn" />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="onQuery" class="query">搜索</el-button>
+          <el-button @click="onReset">重置</el-button>
+          <el-button type="primary" @click="exportExcel">导出Excel</el-button>
+
+        </el-form-item>
+      </el-form>
+    </div>
+    <div style="background:#fff;padding:15px;margin-top:10px">
+      <el-table :data="sourceList.data" :height="tableHeight" style="width: 100%" v-loading="loading" border id="my-table">
+        <el-table-column prop="groupName" label="组别" width="110" fixed="left" />
+        <el-table-column prop="saleUserName" label="业务员" width="80" fixed="left" />
+
+        <template v-if="dayList && dayList.length>0">
+          <el-table-column v-for="col in dayList" :key="col" :label="col" align="center">
+            <el-table-column prop="address" label="系统" min-width="100" align="right">
+              <template #default="{ row, $index }">
+                <div style="width: 100%" :class="today==col?'isToday':''" v-if="row[col] && row[col].sumContractAmount">
+                  {{moneyFormat(row[col].sumContractAmount,2)}}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="address" label="聚水潭" min-width="100" align="right">
+              <template #default="{ row, $index }">
+                <div style="width: 100%" :class="today==col?'isToday':''" v-if="row[col] && row[col].sumJstAmount">
+                  {{moneyFormat(row[col].sumJstAmount,2)}}
+                </div>
+              </template>
+            </el-table-column>
+          </el-table-column>
         </template>
-      </byTable>
+
+        <el-table-column width="95" align="right" fixed="right">
+          <template #header>
+            <div>
+              系统
+              <br>
+              月累计
+            </div>
+          </template>
+          <template #default="{ row, $index }">
+            <div style="width: 100%">
+              {{moneyFormat(row.sumContractAmount,2)}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column width="95" align="right" fixed="right">
+          <template #header>
+            <div>
+              聚水潭
+              <br>
+              月累计
+            </div>
+          </template>
+          <template #default="{ row, $index }">
+            <div style="width: 100%">
+              {{moneyFormat(row.sumJstAmount,2)}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column width="95" align="right" fixed="right">
+          <template #header>
+            <div>
+              合计
+              <br>
+              月累计
+            </div>
+          </template>
+          <template #default="{ row, $index }">
+            <div style="width: 100%">
+              {{moneyFormat(row.sumAmount,2)}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="月目标" width="90" align="right" fixed="right">
+          <template #default="{ row, $index }">
+            <div style="width: 100%">
+              {{moneyFormat(row.targetAmount,2)}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="月达成率" width="90" align="right" fixed="right">
+          <template #default="{ row, $index }">
+            <div style="width: 100%">
+              {{moneyFormat(row.finishRate,2)}} %
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ranking" label="排名" width="60" align="center" fixed="right" />
+      </el-table>
     </div>
+
   </div>
 </template>
 
 <script setup>
 import byTable from "@/components/byTable/index";
-import byForm from "@/components/byForm/index";
+import { getMonthBetween } from "@/utils/date.js";
 import moment from "moment";
+import FileSaver from "file-saver";
+import * as XLSX from "xlsx";
+import { nextTick } from "vue";
 const { proxy } = getCurrentInstance();
-const loading = ref(false);
-const submitLoading = ref(false);
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 150 - 79;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
+const today = ref(moment().format("yyyy-MM-DD"));
+const beginTime = ref(
+  moment().startOf("month").format("yyyy-MM-DD") + " 00:00:00"
+);
+const endTime = ref(moment().endOf("month").format("YYYY-MM-DD") + " 23:59:59");
+const weekBegin = ref(
+  moment().startOf("week").format("yyyy-MM-DD") + " 00:00:00"
+);
+const weekEnd = ref(moment().endOf("week").format("yyyy-MM-DD") + " 23:59:59");
 const sourceList = ref({
   data: [],
   pagination: {
-    total: 3,
     pageNum: 1,
     pageSize: 10,
-    years: new Date().getFullYear() + "",
-  },
-});
-const treeData = ref([]);
-const dialogVisible = ref(false);
-const modalType = ref("add");
-const selectConfig = computed(() => [
-  {
-    type: "time",
-    itemType: "year",
-    label: "年份",
-    placeholder: "请选择",
-    prop: "years",
-    placeholderOne: "结束日期",
-    propOne: "",
-    fn: (val) => {
-      getList();
-    },
-  },
-]);
-const config = ref([
-  {
-    attrs: {
-      label: "公司名称",
-      prop: "companyName",
-      width: 100,
-    },
+    beginTime: "",
+    endTime: "",
+    current: "本月",
   },
-  {
-    attrs: {
-      label: "部门名称",
-      prop: "deptName",
-      width: 100,
-    },
-  },
-  {
-    attrs: {
-      label: "组别",
-      prop: "groupName",
-      width: 160,
-    },
-  },
-]);
-const formData = reactive({
-  data: {},
-});
-const formOption = reactive({
-  inline: true,
-  labelWidth: 100,
-  itemWidth: 100,
 });
-const formDom = ref(null);
-const formConfig = computed(() => {
-  return [
-    {
-      type: "input",
-      prop: "code",
-      label: "店铺编号",
-      itemWidth: 100,
-      disabled: false,
-    },
-    {
-      type: "input",
-      prop: "name",
-      label: "店铺名称",
-      itemWidth: 100,
-      disabled: false,
-    },
-    {
-      type: "treeSelect",
-      prop: "deptId",
-      label: "负责部门",
-      data: treeData.value,
-      propsTreeLabel: "deptName",
-      propsTreeValue: "deptId",
-      itemWidth: 100,
-      disabled: false,
-    },
-  ];
-});
-const rules = ref({
-  deptId: [{ required: true, message: "请选择负责部门", trigger: "change" }],
-  name: [{ required: true, message: "请输入店铺名称", trigger: "blur" }],
-  code: [{ required: true, message: "请输入店铺编号", trigger: "blur" }],
-});
-
-const getList = async (req) => {
+const loading = ref(false);
+const getList = (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/deptPerf/list", sourceList.value.pagination).then((res) => {
-    sourceList.value.data = res;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/deptPerf/monthlyReporting", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res;
+      setTimeout(() => {
+        loading.value = false;
+      }, 500);
+    });
 };
 
-const processesData = ref([]);
-const monthData = ref([
-  "1",
-  "2",
-  "3",
-  "4",
-  "5",
-  "6",
-  "7",
-  "8",
-  "9",
-  "10",
-  "11",
-  "12",
-]);
-const attrData = ref([
-  "january",
-  "february",
-  "march",
-  "april",
-  "may",
-  "june",
-  "july",
-  "august",
-  "september",
-  "october",
-  "november",
-  "december",
-]);
-const getProcesses = () => {
-  for (let i = 0; i < monthData.value.length; i++) {
-    const ele = monthData.value[i];
-    let attrs = {
-      label: `${ele}月(万元)`,
-      slot: attrData.value[i],
-      isNeedHeaderSlot: false,
-      "min-width": 100,
-      // fixed: "right",
-    };
-    config.value.push({
-      attrs,
+const dayList = ref([]);
+const onQuery = () => {
+  loading.value = true;
+  if (
+    sourceList.value.pagination.beginTime &&
+    sourceList.value.pagination.endTime
+  ) {
+    dayList.value = getMonthBetween(
+      sourceList.value.pagination.beginTime.slice(0, 10),
+      sourceList.value.pagination.endTime.slice(0, 10)
+    );
+    nextTick(() => {
+      setTimeout(() => scrollIntoEle(), 1000);
     });
   }
+  getList();
 };
-getProcesses();
-getList();
 
-const objectSpanMethod = ({ rowIndex, columnIndex }) => {
-  if (columnIndex === 0) {
-    const _row = flitterData(sourceList.value.data, "companyId").one[rowIndex];
-    const _col = _row > 0 ? 1 : 0;
-    return {
-      rowspan: _row,
-      colspan: _col,
-    };
-  }
-  if (columnIndex === 1) {
-    const _row = flitterData(sourceList.value.data, "deptId").one[rowIndex];
-    const _col = _row > 0 ? 1 : 0;
-    return {
-      rowspan: _row,
-      colspan: _col,
-    };
+const changeCurrent = (val) => {
+  switch (val) {
+    case "本日":
+      sourceList.value.pagination.beginTime = today.value + " 00:00:00";
+      sourceList.value.pagination.endTime = today.value + " 23:59:59";
+      break;
+    case "本周":
+      sourceList.value.pagination.beginTime = weekBegin.value;
+      sourceList.value.pagination.endTime = weekEnd.value;
+      break;
+    case "本月":
+      sourceList.value.pagination.beginTime = beginTime.value;
+      sourceList.value.pagination.endTime = endTime.value;
+      break;
   }
-};
-const flitterData = (arr, att) => {
-  let spanOneArr = [];
-  let concatOne = 0;
-  arr.forEach((item, index) => {
-    if (index === 0) {
-      spanOneArr.push(1);
-    } else {
-      //注意这里的quarterly是表格绑定的字段,根据自己的需求来改
-      if (item[att] === arr[index - 1][att]) {
-        //第一列需合并相同内容的判断条件
-        spanOneArr[concatOne] += 1;
-        spanOneArr.push(0);
-      } else {
-        spanOneArr.push(1);
-        concatOne = index;
-      }
-    }
-  });
-  return {
-    one: spanOneArr,
-  };
+  onQuery();
 };
 
-const handleChangeVal = (item, month, val) => {
-  if (val) {
-    const data = {
-      ...item,
-      id: item.id,
-      deptId: item.deptId,
-      groupId: item.groupId,
-      years: sourceList.value.pagination.years,
-    };
-    data[month] = val;
-    proxy.post("/deptPerf/edit", data).then((res) => {
-      // proxy.msgTip("配置成功");
-      // getList();
-    });
-  }
+const onReset = () => {
+  sourceList.value.pagination.current = "本月";
+  sourceList.value.pagination.beginTime = beginTime.value;
+  sourceList.value.pagination.endTime = endTime.value;
+  onQuery();
 };
+onReset();
 
-let date = new Date();
-const getIsDisabled = (index) => {
-  let currentMonth = monthData.value[index];
-  let year = sourceList.value.pagination.years;
-  let nowYear = date.getFullYear();
-  let nowMonth = date.getMonth() + 1;
-  if (Number(year) < nowYear) {
-    return true;
-  } else if (Number(year) == nowYear && Number(currentMonth) < nowMonth) {
+// const nowYearMonth = ref(moment().format("YYYY-MM"));
+const disabledFn = (date) => {
+  if (
+    moment(date).isBefore(beginTime.value) ||
+    moment(date).isAfter(endTime.value)
+  ) {
     return true;
   } else {
     return false;
   }
 };
+
+const scrollIntoEle = () => {
+  let eles = document.querySelectorAll(".isToday");
+  if (eles && eles[0]) {
+    eles[0].scrollIntoView({
+      // behavior: "smooth",
+      block: "start",
+      inline: "start",
+    });
+  }
+};
+
+const exportExcel = () => {
+  proxy.msgTip("正在导出,请稍后", 2);
+  const wb = XLSX.utils.table_to_book(document.querySelector("#my-table")); // 关联dom节点
+  // 设置百分比列的单元格样式
+  const percentStyle = {
+    font: { bold: true },
+    fill: { fgColor: { rgb: "FFFF00" } },
+    border: { top: { style: "thin" }, bottom: { style: "thin" } },
+  };
+
+  if (wb.Sheets.Sheet1) {
+    // 达成率单元格的key开头
+    let cellKey = "";
+    for (const key in wb.Sheets.Sheet1) {
+      let value = wb.Sheets.Sheet1[key];
+      if (value && value.v == "月达成率") {
+        cellKey = key.match(/[a-zA-Z]+/g)[0];
+      }
+      // key有包含cellKey的
+      if (cellKey && key.includes(cellKey)) {
+        // 单元格的样式
+        wb.Sheets.Sheet1[key].s = percentStyle;
+        // 用于指定单元格中显示值的格式,例如日期格式、百分比格式等
+        wb.Sheets.Sheet1[key].z = "0.00%";
+      }
+    }
+  }
+  const wbout = XLSX.write(wb, {
+    bookType: "xlsx",
+    bookSST: true,
+    type: "array",
+  });
+  try {
+    FileSaver.saveAs(
+      new Blob([wbout], {
+        type: "application/octet-stream",
+      }),
+      "销售报表.xlsx"
+    );
+  } catch (e) {
+    console.log(e, wbout);
+  }
+  return wbout;
+};
 </script>
 
 <style lang="scss" scoped>
-</style>
+:deep(
+    .el-table .el-table__header-wrapper th,
+    .el-table .el-table__fixed-header-wrapper th
+  ) {
+  height: auto !important;
+}
+:deep(.el-table th.el-table__cell) {
+  background: #fff !important;
+}
+:deep(.el-table .el-table__cell) {
+  padding: 0 !important;
+}
+:deep(.el-table .cell) {
+  padding: 0 6px !important;
+  font-size: 12px !important;
+}
+.query {
+  background: #20b2aa;
+  color: #fff;
+  border: 1px solid #20b2aa;
+}
+.isToday {
+  // background: red !important;
+  // color: #fff !important;
+  color: #409eff;
+}
+</style>

+ 217 - 62
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -6,6 +6,7 @@
           {
             text: '新建报价单',
             action: () => newPriceSheet(),
+            
           },
         ]" @get-list="getList">
 
@@ -31,9 +32,8 @@
         </template>
 
         <template #amount="{ item }">
-          <div>
-            <span style="padding-right: 4px">{{ item.currency }}</span>
-            <span>{{ moneyFormat(item.amount, 2) }}</span>
+          <div style="width:100%">
+            <span class="el-click" @click="getConfirmDtl(item,true)">{{ moneyFormat(item.amount, 2) }}</span>
           </div>
         </template>
         <template #product="{ item }">
@@ -59,28 +59,32 @@
 
         <template #btn="{item}">
           <div style="width: 100%">
-            <div v-if="isCurrentCompanyData(item.ofCompanyId)">
+            <div>
               <span v-if="item.status == 0">
-                <el-button type="primary" text v-debounce @click="getDtl(item, false)">修改</el-button>
-                <el-button type="danger" text v-debounce @click="handleRepeal(item,'/saleQuotation/delete')">删除</el-button>
+                <el-button type="primary" text v-debounce @click="getDtl(item, false)" v-hasPermi="['quotation:edit']">修改</el-button>
+                <el-button type="danger" text v-debounce @click="handleRepeal(item,'/saleQuotation/delete')"
+                           v-hasPermi="['quotation:del']">删除</el-button>
+              </span>
+              <span v-if="item.status !=88">
+                <!-- <el-button type="primary" text v-debounce v-if="item.status == 30 && item.quotationStatus==2"
+                           @click="getDtl(item, false,true)">变更</el-button> -->
+                <span v-if="item.quotationStatus==2 && !item.extQuotationId && item.confirmStatus==0">
+                  <el-button type="primary" text v-debounce v-hasPermi="['quotation:price:back']" @click="handleBack(item)">退回</el-button>
+                </span>
+                <span v-if="item.confirmStatus==2&&item.quotationStatus==2 && !item.extQuotationId">
+                  <el-button type="primary" text v-debounce v-hasPermi="['quotation:price:change']" @click="handleForeign(item)">转对外</el-button>
+                </span>
+                <span v-if="item.status !=0 && item.status !=88  && item.confirmStatus==0">
+                  <el-button type="danger" text v-debounce v-hasPermi="['quotation:remove']"
+                             @click="handleRepeal(item,'/saleQuotation/cancellation')">作废</el-button>
+                </span>
               </span>
               <span v-if="item.status !=88">
-                <el-button type="primary" text v-debounce v-if="item.quotationStatus==2 && !item.extQuotationId"
-                           @click="handleBack(item)">退回</el-button>
-                <el-button type="primary" text v-debounce v-if="item.status == 30 && item.quotationStatus==2"
-                           @click="getDtl(item, false,true)">变更</el-button>
-                <el-button type="primary" text v-debounce v-if="item.quotationStatus==2 && !item.extQuotationId"
-                           @click="handleForeign(item)">转对外</el-button>
-                <el-button type="danger" text v-debounce v-if="item.status !=0 && item.status !=88"
-                           @click="handleRepeal(item,'/saleQuotation/cancellation')">作废</el-button>
                 <span v-if="item.confirmStatus==0 && item.quotationStatus==2">
                   <el-button type="primary" text v-debounce v-hasPermi="['quotation:price:confirm']"
                              @click="getConfirmDtl(item, false)">价格确认</el-button>
                 </span>
               </span>
-              <!-- <span v-if="item.status !=88">
-               
-              </span> -->
             </div>
           </div>
         </template>
@@ -292,7 +296,7 @@
               v-loading="submitLoading">
         <template #commodity>
           <div style="width: 100%;padding-left:25px">
-            <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all>
+            <el-table :data="formData.data.quotationProductList" style="width: 100%;" row-key="productId">
               <el-table-column type="expand" width="50" align="center">
                 <template #default="scope">
                   <div style="padding-left:50px">
@@ -380,13 +384,37 @@
               <el-table-column prop="productColor" label="颜色" width="100" />
               <el-table-column label="数量" width="110" prop="quantity">
               </el-table-column>
-              <el-table-column label="单价" width="110" prop="price">
+              <el-table-column label="指导价" width="100" prop="guidePrice">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <span class="tag-active">{{row.guidePrice}}</span>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="最低价" width="100" prop="minPrice">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <span style="color:red">{{row.minPrice}}</span>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="最高价" width="100" prop="maxPrice">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    ¥ {{row.price}}
+                    <span style="color:red">{{row.maxPrice}}</span>
                   </div>
                 </template>
               </el-table-column>
+              <el-table-column label="单价" width="110" prop="price">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rulesOne.price" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.price" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="row.minPrice" @change="changeForeignQuantity()" :max="row.maxPrice" />
+
+                  </el-form-item>
+                </template>
+              </el-table-column>
               <el-table-column prop="amount" label="小计" width="110">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
@@ -409,7 +437,7 @@
               v-loading="submitLoading">
         <template #commodity>
           <div style="width: 100%;padding-left:25px">
-            <el-table :data="formData.dataTwo.quotationProductList" style="width: 100%;" default-expand-all>
+            <el-table :data="formData.dataTwo.quotationProductList" style="width: 100%;" row-key="id">
               <el-table-column type="expand" width="50" align="center">
                 <template #default="scope">
                   <div style="padding-left:50px">
@@ -440,7 +468,7 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column label="图片" width="80">
+              <el-table-column label="图片" width="70" align="center">
                 <template #default="{ row }">
                   <div v-if="row.fileUrl">
                     <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
@@ -450,7 +478,7 @@
               </el-table-column>
               <el-table-column prop="productCode" label="商品编码" width="190" />
               <el-table-column prop="productName" label="商品名称" min-width="200" />
-              <el-table-column label="尺寸 (cm)" width="150">
+              <el-table-column label="尺寸 (cm)" width="120">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
@@ -458,9 +486,11 @@
                 </template>
               </el-table-column>
               <el-table-column prop="productColor" label="颜色" width="100" />
-              <el-table-column label="数量" width="110" prop="quantity">
+              <el-table-column label="数量" width="80" prop="quantity">
               </el-table-column>
-              <el-table-column label="单价" width="110" prop="price">
+              <el-table-column label="工厂单价" width="100" prop="prodPrice">
+              </el-table-column>
+              <el-table-column label="指导价" width="120" prop="price">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     <el-form-item :prop="'quotationProductList.' + $index + '.price'" :rules="rulesTwo.price" :inline-message="true"
@@ -471,6 +501,30 @@
                   </div>
                 </template>
               </el-table-column>
+              <el-table-column label="业务员最低报价" width="125" prop="minPrice">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item :prop="'quotationProductList.' + $index + '.minPrice'" :rules="rulesTwo.minPrice" :inline-message="true"
+                                  class="margin-b-0 wid100">
+                      <el-input-number onmousewheel="return false;" v-model="row.minPrice" placeholder="请输入" style="width: 100%" :precision="2"
+                                       :controls="false" :min="row.price" @change="changeMinPrice" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="上调比列(%)" width="110" prop="amplifyRatio">
+                <template #default="{ row, $index }">
+                  <div style="width: 100%">
+                    <el-form-item :prop="'quotationProductList.' + $index + '.amplifyRatio'" :rules="rulesTwo.amplifyRatio" :inline-message="true"
+                                  class="margin-b-0 wid100">
+                      <el-input-number onmousewheel="return false;" v-model="row.amplifyRatio" placeholder="请输入" style="width: 100%" :precision="2"
+                                       :controls="false" :min="1" :max="100" @change="changeMinPrice" />
+                    </el-form-item>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column label="业务员最高报价" width="125" prop="maxPrice">
+              </el-table-column>
               <el-table-column prop="amount" label="小计" width="110">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
@@ -482,7 +536,7 @@
           </div>
         </template>
       </byForm>
-      <template #footer>
+      <template #footer v-if="!isDetailData">
         <el-button @click="confirmDialog = false" size="default" v-debounce>关 闭</el-button>
         <el-button type="primary" size="default" v-debounce @click="confirmSubmit()">提 交</el-button>
       </template>
@@ -506,7 +560,7 @@
       <PriceSheetDetailList :rowData="detailRowData" dataType="1" @changeLeftData="changeLeftData"></PriceSheetDetailList>
       <template #footer>
         <el-button @click="detailDialog = false" size="defualt" v-debounce>关 闭</el-button>
-        <el-button type="primary" v-debounce
+        <!-- <el-button type="primary" v-debounce
                    v-if="leftRowData.quotationStatus==2 && !leftRowData.extQuotationId &&leftRowData.status !=88 &&leftRowData.status !=70"
                    @click="handleBack(leftRowData)">退回</el-button>
         <el-button type="primary" v-debounce
@@ -516,7 +570,7 @@
                    v-if="leftRowData.quotationStatus==2 && !leftRowData.extQuotationId &&leftRowData.status !=88 &&leftRowData.status !=70"
                    @click="handleForeign(leftRowData)">转对外</el-button>
         <el-button type="danger" v-debounce v-if="leftRowData.status !=0 && leftRowData.status !=88 &&leftRowData.status !=70"
-                   @click="handleRepeal(leftRowData,'/saleQuotation/cancellation')">作废</el-button>
+                   @click="handleRepeal(leftRowData,'/saleQuotation/cancellation')">作废</el-button> -->
       </template>
     </el-dialog>
 
@@ -609,6 +663,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "ofCompanyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "报价单状态",
       prop: "status",
       data: statusData.value,
@@ -651,6 +710,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "ofCompanyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "报价单号",
         slot: "code",
         width: 180,
@@ -732,7 +798,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: 200,
+        width: 220,
         slot: "btn",
         align: "right",
         fixed: "right",
@@ -1010,6 +1076,15 @@ const formConfig = computed(() => {
     // },
     {
       type: "treeSelect",
+      prop: "ofCompanyId",
+      label: "业务公司",
+      data: proxy.useUserStore().allDict["tree_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+    },
+    {
+      type: "treeSelect",
       prop: "companyId",
       label: "报价公司",
       data: treeData.value,
@@ -1069,6 +1144,9 @@ const formConfig = computed(() => {
 });
 const rules = ref({
   type: [{ required: true, message: "请选择报价类型", trigger: "change" }],
+  ofCompanyId: [
+    { required: true, message: "请选择业务公司", trigger: "change" },
+  ],
   companyId: [{ required: true, message: "请选择报价公司", trigger: "change" }],
   buyCorporationId: [
     { required: true, message: "请选择客户公司", trigger: "change" },
@@ -1446,22 +1524,22 @@ const formDomOne = ref(null);
 const foreignDialog = ref(false);
 const formConfigOne = computed(() => {
   return [
-    {
-      type: "title1",
-      title: "利润点数",
-    },
-    {
-      type: "number",
-      prop: "coefficient",
-      label: "利润点数",
-      precision: 2,
-      min: 0.01,
-      controls: false,
-      itemWidth: 25,
-      fn: (val) => {
-        publicTotalAmount(val);
-      },
-    },
+    // {
+    //   type: "title1",
+    //   title: "利润点数",
+    // },
+    // {
+    //   type: "number",
+    //   prop: "coefficient",
+    //   label: "利润点数",
+    //   precision: 2,
+    //   min: 0.01,
+    //   controls: false,
+    //   itemWidth: 25,
+    //   fn: (val) => {
+    //     publicTotalAmount(val);
+    //   },
+    // },
     {
       type: "title1",
       title: "商品信息",
@@ -1507,24 +1585,30 @@ const handleForeign = (row) => {
       const iele = formData.data.quotationProductList[i];
       iele.quotationProductId = iele.id;
       delete iele.id;
+      iele.guidePrice = iele.price;
+      iele.maxPrice = Number(
+        parseFloat((iele.amplifyRatio / 100 + 1) * iele.minPrice).toFixed(2)
+      );
+      iele.price = iele.minPrice;
       for (let j = 0; j < iele.quotationProductBomList.length; j++) {
         const jele = iele.quotationProductBomList[j];
         jele.quotationProductBomId = jele.id;
         delete jele.id;
-        jele.priceCopy = jele.price;
-        jele.price = Number(parseFloat(jele.price * 1.1)).toFixed(2);
+        // jele.priceCopy = jele.price;
+        // jele.price = Number(parseFloat(jele.price * 1.1)).toFixed(2);
         // 默认系数
-        jele.coefficient = 1.1;
+        // jele.coefficient = 1.1;
       }
     }
-    changeQuantity();
+    // changeQuantity();
     // 城市数据回显
-    if (formData.data.buyCountryId) {
-      getCityData(formData.data.buyCountryId, "20");
-    }
-    if (formData.data.buyProvinceId) {
-      getCityData(formData.data.buyProvinceId, "30");
-    }
+    // if (formData.data.buyCountryId) {
+    //   getCityData(formData.data.buyCountryId, "20");
+    // }
+    // if (formData.data.buyProvinceId) {
+    //   getCityData(formData.data.buyProvinceId, "30");
+    // }
+    changeForeignQuantity();
     // 文件数据回显
     getFileData();
     let productIds = formData.data.quotationProductList.map((x) => x.productId);
@@ -1757,17 +1841,60 @@ const changeQuantityOne = () => {
   }
 };
 
+const changeQuantityTwo = () => {
+  let money = 0;
+  if (
+    formData.dataTwo.quotationProductList &&
+    formData.dataTwo.quotationProductList.length > 0
+  ) {
+    // 单个产品的价格
+    for (let i = 0; i < formData.dataTwo.quotationProductList.length; i++) {
+      let iele = formData.dataTwo.quotationProductList[i];
+      money += Number(
+        parseFloat(Number(iele.quantity) * Number(iele.prodPrice)).toFixed(2)
+      );
+    }
+    formData.dataTwo.amountTwo = parseFloat(money).toFixed(2);
+  }
+};
+
+const changeMinPrice = () => {
+  if (
+    formData.dataTwo.quotationProductList &&
+    formData.dataTwo.quotationProductList.length > 0
+  ) {
+    // 单个产品的价格
+    for (let i = 0; i < formData.dataTwo.quotationProductList.length; i++) {
+      let iele = formData.dataTwo.quotationProductList[i];
+      if (iele.minPrice && iele.amplifyRatio) {
+        iele.maxPrice = Number(
+          parseFloat(
+            Number(iele.minPrice) * (1 + Number(iele.amplifyRatio) / 100)
+          ).toFixed(2)
+        );
+      }
+    }
+  }
+};
+
+const isDetailData = ref(false);
 const getConfirmDtl = (row, flag) => {
-  formConfigTwo.disabled = flag;
+  if (!proxy.useUserStore().roles.includes("GM")) {
+    return;
+  }
+  isDetailData.value = flag;
+  formOptionTwo.disabled = flag;
   modalType.value = "edit";
   confirmDialog.value = true;
   proxy.post("/saleQuotation/detail", { id: row.id }).then((res) => {
     formData.dataTwo = res;
-    formData.dataTwo.quotationProductList =
-      formData.dataTwo.quotationProductList.map((x) => ({
-        ...x,
-        price: x.prodPrice,
-      }));
+    if (!flag) {
+      formData.dataTwo.quotationProductList =
+        formData.dataTwo.quotationProductList.map((x) => ({
+          ...x,
+          price: x.prodPrice,
+        }));
+    }
     // 文件数据回显
     getFileDataOne();
     let productIds = formData.dataTwo.quotationProductList.map(
@@ -1783,6 +1910,8 @@ const getConfirmDtl = (row, flag) => {
     });
     // 价格计算
     changeQuantityOne();
+    changeQuantityTwo();
+    changeMinPrice();
   });
 };
 
@@ -1805,8 +1934,15 @@ const formConfigTwo = computed(() => {
     },
     {
       type: "input",
+      prop: "amountTwo",
+      label: "工厂报价总额",
+      itemWidth: 25,
+      disabled: true,
+    },
+    {
+      type: "input",
       prop: "amount",
-      label: "报价总金额",
+      label: "调整报价总额",
       itemWidth: 25,
       disabled: true,
     },
@@ -1822,10 +1958,13 @@ const formOptionTwo = reactive({
 const rulesTwo = ref({
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
   // coefficient: [{ required: true, message: "请输入系数", trigger: "blur" }],
+  minPrice: [{ required: true, message: "业务员最低报价", trigger: "blur" }],
+  amplifyRatio: [{ required: true, message: "上调比例", trigger: "blur" }],
 });
 
 const confirmSubmit = () => {
   formDomTwo.value.handleSubmit(() => {
+    formData.dataTwo.quotationStatus = 2;
     proxy
       .msgConfirm()
       .then((res) => {
@@ -1843,6 +1982,22 @@ const confirmSubmit = () => {
       });
   });
 };
+
+const changeForeignQuantity = () => {
+  let money = 0;
+  if (
+    formData.data.quotationProductList &&
+    formData.data.quotationProductList.length > 0
+  ) {
+    // 单个产品的价格
+    for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+      let iele = formData.data.quotationProductList[i];
+      iele.amount = Number(parseFloat(iele.price * iele.quantity).toFixed(2));
+      money += Number(iele.amount);
+    }
+    formData.data.amount = parseFloat(money).toFixed(2);
+  }
+};
 </script>
 
 <style lang="scss" scoped>

+ 27 - 13
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -7,7 +7,8 @@
 
       <template #code="{ item }">
         <div style="width: 100%">
-          <span style="color: #409eff; cursor: pointer; word-break: break-all" @click="getDtl(item,true)">{{ item.code }}</span>
+          <span style="color: #409eff; cursor: pointer; word-break: break-all" @click="getDtlOne(item,true,0)">{{ item.code }}</span>
+
         </div>
       </template>
 
@@ -26,8 +27,8 @@
 
       <template #amount="{ item }">
         <div>
-          <span style="padding-right: 4px">{{ item.currency }}</span>
-          <span>{{ moneyFormat(item.amount, 2) }}</span>
+          <!-- <span style="padding-right: 4px">{{ item.currency }}</span> -->
+          <span>{{ moneyFormat(item.prodAmount, 2) }}</span>
         </div>
       </template>
 
@@ -168,7 +169,7 @@
                       <th style="width:10%">
                         类型
                       </th>
-                      <th style="width:20%">
+                      <th style="width:18%">
                         编码
                       </th>
                       <th style="width:20%">
@@ -177,10 +178,10 @@
                       <th style="width:16%" class="align-right">
                         模具
                       </th>
-                      <th style="width:8%" class="align-right">
+                      <th style="width:9%" class="align-right">
                         数量/件
                       </th>
-                      <th style="width:8%" class="align-right">
+                      <th style="width:9%" class="align-right">
                         单价
                       </th>
                       <th style="width:8%" class="align-right">
@@ -413,7 +414,7 @@
 
         </div>
       </div>
-      <div style="text-align:center">
+      <div style="text-align:center" v-if="!isDetail">
         <el-button type="primary" @click="handleSubmitOne()" size="default" v-debounce>提交</el-button>
       </div>
 
@@ -492,6 +493,11 @@ const quotationStatusData = ref([
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "ofCompanyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "报价单状态",
       prop: "status",
       data: statusData.value,
@@ -516,6 +522,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "ofCompanyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "报价单号",
         slot: "code",
         width: 180,
@@ -572,9 +585,7 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          row.quotationStatus < 2 &&
-          row.status == 30 &&
-          proxy.isCurrentCompanyData(row.companyId)
+          row.quotationStatus < 2 && row.status == 30
             ? {
                 attrs: {
                   label: "报价",
@@ -1039,14 +1050,17 @@ const getDict = () => {
       pageSize: 9999,
     })
     .then((res) => {
-      moldData.value = res.rows;
+      moldData.value = res.rows.map((x) => ({
+        ...x,
+        moldName:
+          x.moldName + `(${x.moldLength}*${x.moldWidth}*${x.moldHeight})`,
+      }));
     });
 };
 getDict();
 
 let currentIndex = ref(-1);
 const handleReportPrice = (item, index) => {
-  console.log(item, index);
   currentIndex.value = index;
   submitLoading.value = true;
   formData.data = {
@@ -1177,7 +1191,7 @@ const changeTotalAmount = () => {
     height: 100%;
     overflow: auto;
     position: relative;
-    padding: 4px 15px;
+    padding: 4px 0 4px 15px;
     .btn {
       // position: absolute;
       // bottom: 20px;

+ 14 - 2
src/views/EHSD/saleContract/priceSheetForeign/index.vue

@@ -93,7 +93,7 @@
 
       <template #btn="{item}">
         <div style="width: 100%">
-          <div v-if="isCurrentCompanyData(item.ofCompanyId)">
+          <div>
             <el-button type="primary" text v-debounce v-if="item.status !=88" @click="handleGenerate(item,false)">生成订单</el-button>
             <el-button type="primary" text v-debounce v-if="item.status !=88" @click="handleGenerate(item,true)">生成样品单</el-button>
             <el-button type="primary" text v-debounce v-if="item.status !=88" @click="getDtl(item)">调价</el-button>
@@ -335,6 +335,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "ofCompanyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "报价单状态",
       prop: "status",
       data: statusData.value,
@@ -364,6 +369,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "ofCompanyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "对内报价单号",
         prop: "internalCode",
         width: 180,
@@ -433,7 +445,7 @@ const config = computed(() => {
         label: "操作",
         width: 200,
         slot: "btn",
-        align: "center",
+        align: "right",
         fixed: "right",
       },
     },

+ 384 - 0
src/views/EHSD/saleContract/productionReport/index.vue

@@ -0,0 +1,384 @@
+<template>
+  <div class="pageIndexClass">
+    <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config"
+             :selectConfig="selectConfig" highlight-current-row @get-list="getList">
+    </byTable>
+    <div style="padding: 0 15px 0px 15px; background-color: white">
+      <el-table v-loading="loading" :data="sourceList.data" :height="tableHeight" :border="false">
+        <el-table-column label="工厂" prop="a" fixed width="100" />
+        <el-table-column label="订单号" prop="b" width="100" />
+        <el-table-column label="产品图片" prop="c" width="100" />
+        <el-table-column label="产品编码" prop="c" width="100" />
+        <el-table-column label="产品名称" prop="d" width="100" />
+        <el-table-column label="尺寸" prop="e" width="100" />
+        <el-table-column label="颜色" prop="f" width="150" />
+        <el-table-column label="生产件数" prop="g" width="100" />
+        <el-table-column label="交期" prop="h" width="100" />
+        <el-table-column label="完工时间" prop="i" width="160" />
+        <el-table-column label="是否逾期" prop="j" width="100" />
+        <el-table-column label="逾期天数" prop="k" width="100" />
+        <el-table-column label="及时率" prop="l" width="100">
+          <template #default="{ row }">
+            <div style="color:red"> {{row.l}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="损耗" prop="m" align="center">
+          <el-table-column label="瑜伽垫(数量)" prop="n" width="125" />
+          <el-table-column label="瑜伽垫(成本)" prop="o" width="125" />
+          <el-table-column label="包材辅材(数量)" prop="p" width="140" />
+          <el-table-column label="包材辅材(成本)" prop="q" width="140" />
+          <el-table-column label="返工(道)" prop="r" width="100" />
+          <el-table-column label="返工(成本)" prop="s" width="110" />
+        </el-table-column>
+        <el-table-column label="出错率" prop="t" width="100">
+          <template #default="{ row }">
+            <div style="color:red"> {{row.t}}</div>
+          </template>
+        </el-table-column>
+
+        <!-- <el-table-column label="其他" prop="other" width="120">
+          <template #default="{ row }">
+            <div> {{ moneyFormat(row.other ,2) }}</div>
+          </template>
+        </el-table-column> -->
+
+      </el-table>
+      <el-row style="padding: 10px" justify="end" type="flex">
+        <el-pagination background layout="total, sizes, prev, pager, next, jumper" :current-page="sourceList.pagination.pageNum"
+                       :page-size="sourceList.pagination.pageSize" :total="sourceList.pagination.total" @size-change="handleSizeChange"
+                       @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">
+        <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-form-item>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="openAgencyFee = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitAgencyFeeForm()" size="default">确 定</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">
+        <template #remark>
+          <div style="width: 100%">
+            <el-form-item label="备注" prop="remark">
+              <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="default">取 消</el-button>
+        <el-button type="primary" @click="submitRemarkForm()" size="default">确 定</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog :title="'高级检索'" v-model="moreSearchDialog" width="500px" destroy-on-close>
+      <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
+      </byForm>
+      <template #footer>
+        <el-button @click="moreSearchReset" size="default">重置</el-button>
+        <el-button @click="moreSearchQuery" type="primary" size="default">搜索</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+import { ElMessage } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const tableHeight = ref(0);
+const getTableHeight = () => {
+  tableHeight.value = window.innerHeight - 240;
+};
+getTableHeight();
+window.addEventListener("resize", () => {
+  getTableHeight();
+});
+const accountCurrency = ref([]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    userId: "",
+    userName: "",
+    contractCode: "",
+    customerName: "",
+    beginTime: "",
+    endTime: "",
+  },
+});
+const loading = ref(false);
+const isSettled = ref([
+  {
+    label: "已结清",
+    value: "1",
+  },
+  {
+    label: "未结清",
+    value: "0",
+  },
+]);
+const isLoss = ref([
+  {
+    label: "亏",
+    value: "1",
+  },
+  {
+    label: "盈",
+    value: "0",
+  },
+]);
+const selectConfig = computed(() => {
+  return [
+    // {
+    //   label: "是否已结清",
+    //   prop: "isSettled",
+    //   data: isSettled.value,
+    // },
+    // {
+    //   label: "盈亏",
+    //   prop: "isLoss",
+    //   data: isLoss.value,
+    // },
+  ];
+});
+
+const config = computed(() => {
+  return [];
+});
+const getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "account_currency",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountCurrency.value = res.rows.map((item) => {
+          return {
+            label: item.dictValue,
+            value: item.dictKey,
+          };
+        });
+      }
+    });
+};
+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.map((x) => ({
+        a: "三梵",
+        b: "SC-202402-200",
+        c: "324",
+        d: "123454",
+        e: "180* 80* 1.5",
+        f: "兰黛紫Y03+粉红Y02",
+        g: "500",
+        h: "2024-02-05",
+        i: "2024-02-03 13:45:14",
+        j: "否",
+        k: "0",
+        l: "100%",
+        n: "10",
+        m: "100",
+        o: "10",
+        p: "200",
+        q: "10",
+        r: "300",
+        s: "2",
+        t: "20%",
+        u: "10%",
+      }));
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+getDict();
+getList();
+const handleSizeChange = (val) => {
+  sourceList.value.pagination.pageNum = 1;
+  sourceList.value.pagination.pageSize = val;
+  getList();
+};
+const handlePageChange = (val) => {
+  sourceList.value.pagination.pageNum = val;
+  getList();
+};
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const openAgencyFee = ref(false);
+const agencyFee = ref(null);
+const formAgencyFeeData = reactive({
+  data: {},
+});
+const formAgencyFeeConfig = computed(() => {
+  return [
+    {
+      type: "slot",
+      slotName: "agencyFee",
+    },
+  ];
+});
+const changeAgencyFee = (row) => {
+  formAgencyFeeData.data = {
+    id: row.id,
+    agencyFee: row.agencyFee,
+  };
+  openAgencyFee.value = true;
+};
+const submitAgencyFeeForm = () => {
+  proxy.post("/contract/edit", formAgencyFeeData.data).then(() => {
+    ElMessage({
+      message: "保存成功",
+      type: "success",
+    });
+    openAgencyFee.value = false;
+    getList();
+  });
+};
+const openRemark = ref(false);
+const remark = ref(null);
+const formRemarkData = reactive({
+  data: {},
+});
+const formRemarkConfig = computed(() => {
+  return [
+    {
+      type: "slot",
+      slotName: "remark",
+    },
+  ];
+});
+const changeRemark = (row) => {
+  formRemarkData.data = {
+    id: row.id,
+    remark: row.remark,
+  };
+  openRemark.value = true;
+};
+const submitRemarkForm = () => {
+  proxy.post("/contract/edit", formRemarkData.data).then(() => {
+    ElMessage({
+      message: "保存成功",
+      type: "success",
+    });
+    openRemark.value = false;
+    getList();
+  });
+};
+
+const formSearchConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      label: "业务员",
+      prop: "userName",
+      itemWidth: 100,
+    },
+    {
+      type: "input",
+      label: "合同编号",
+      prop: "contractCode",
+      itemWidth: 100,
+    },
+    {
+      type: "input",
+      label: "客户名称",
+      prop: "customerName",
+      itemWidth: 100,
+    },
+    {
+      type: "date",
+      itemType: "datetime",
+      label: "合同时间",
+      prop: "beginTime",
+      placeholder: "合同开始时间",
+      itemWidth: 50,
+      clearable: true,
+    },
+    {
+      type: "date",
+      itemType: "datetime",
+      label: " ",
+      prop: "endTime",
+      placeholder: "合同结束时间",
+      itemWidth: 50,
+      clearable: true,
+    },
+  ];
+});
+const moreSearchDialog = ref(false);
+const clickMoreSearch = () => {
+  moreSearchDialog.value = true;
+};
+const moreSearchQuery = () => {
+  moreSearchDialog.value = false;
+  getList();
+};
+const moreSearchReset = () => {
+  sourceList.value.pagination = {
+    total: 0,
+    pageNum: sourceList.value.pagination.pageNum,
+    pageSize: sourceList.value.pagination.pageSize,
+    keyword: "",
+    userId: "",
+    userName: "",
+    contractCode: "",
+    customerName: "",
+    beginTime: "",
+    endTime: "",
+  };
+  moreSearchQuery();
+};
+</script>
+
+<style lang="scss" scoped>
+:deep(.el-table thead.is-group th.el-table__cell) {
+  background-color: #fff !important;
+}
+:deep(
+    .el-table .el-table__header-wrapper th,
+    .el-table .el-table__fixed-header-wrapper th
+  ) {
+  height: auto !important;
+}
+:deep(.el-table th.el-table__cell) {
+  background: #fff !important;
+}
+:deep(.el-table .el-table__cell) {
+  padding: 0 !important;
+}
+:deep(.el-table .cell) {
+  padding: 0 6px !important;
+  font-size: 12px !important;
+}
+</style>

+ 14 - 2
src/views/MES/processScheduling/index.vue

@@ -68,7 +68,7 @@
                 <div :style="{
                   background:isFindCotentData(slotItem,item).schedulingCount>=item.quantity?'#c6f7a5':''
                 }" style="min-height:80px">
-                  <div @click="openModal(item,slotItem,'add')" v-if="isCurrentCompanyData(item.companyId)" class="btn">
+                  <div @click="openModal(item,slotItem,'add')" class="btn">
                     排程
                   </div>
                   <div style="padding:0 8px">
@@ -253,6 +253,11 @@ const contractTypeData = ref([
 ]);
 
 const selectConfig = computed(() => [
+  {
+    label: "业务公司",
+    prop: "contractCompanyId",
+    data: proxy.useUserStore().allDict["list_company_data"],
+  },
   // {
   //   label: "工厂",
   //   prop: "companyId",
@@ -329,6 +334,13 @@ const config = ref([
   // },
   {
     attrs: {
+      label: "业务公司",
+      prop: "contractCompanyName",
+      width: 110,
+    },
+  },
+  {
+    attrs: {
       label: "是否逾期",
       slot: "isOverdue",
       width: 80,
@@ -338,7 +350,7 @@ const config = ref([
     attrs: {
       label: "订单类型",
       prop: "contractType",
-      width: 100,
+      width: 110,
     },
     render(val) {
       return proxy.dictKeyValue(val, contractTypeData.value);

+ 16 - 5
src/views/MES/productionOrder/index.vue

@@ -341,6 +341,11 @@ const selectConfig = computed(() => [
   //   },
   // },
   {
+    label: "业务公司",
+    prop: "contractCompanyId",
+    data: proxy.useUserStore().allDict["list_company_data"],
+  },
+  {
     label: "订单类型",
     prop: "contractType",
     data: contractTypeData.value,
@@ -376,6 +381,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "contractCompanyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "工厂",
         prop: "companyName",
         width: 130,
@@ -385,7 +397,7 @@ const config = computed(() => {
       attrs: {
         label: "订单类型",
         prop: "contractType",
-        width: 100,
+        width: 110,
       },
       render(val) {
         return proxy.dictKeyValue(val, contractTypeData.value);
@@ -475,8 +487,7 @@ const config = computed(() => {
       renderHTML(row) {
         return [
           // row.confirmStatus == "1" &&
-          // !row.produceTime &&
-          // proxy.isCurrentCompanyData(row.companyId)
+          // !row.produceTime
           //   ? {
           //       attrs: {
           //         label: "投产",
@@ -489,7 +500,7 @@ const config = computed(() => {
           //       },
           //     }
           //   : {},
-          row.confirmStatus == "0" && proxy.isCurrentCompanyData(row.companyId)
+          row.confirmStatus == "0"
             ? {
                 attrs: {
                   label: "确认交期",
@@ -502,7 +513,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.produceStatus == 2 && proxy.isCurrentCompanyData(row.companyId)
+          row.produceStatus == 2
             ? {
                 attrs: {
                   label: "销售出库",

+ 0 - 5
src/views/MES/productionScheduling/index.vue

@@ -30,11 +30,6 @@
         <template #date="{ item }">
           <div style="width:100%; ">
             <div>
-              <!-- <el-icon :size="16" style="cursor:pointer;margin-right: 3px;position:relative;top:4px" color="#409EFF"
-                       @click="clickDistributeProduction(item)" v-if="isCurrentCompanyData(item.companyId)">
-                <Clock />
-              </el-icon>
-              <span style="padding:0 8px" v-else></span> -->
               {{item.produceTime}} ~ {{item.deliveryPeriod}}
             </div>
           </div>

+ 41 - 31
src/views/MES/productionTask/index.vue

@@ -406,6 +406,11 @@ const contractTypeData = ref([
 
 const selectConfig = computed(() => [
   {
+    label: "业务公司",
+    prop: "contractCompanyId",
+    data: proxy.useUserStore().allDict["list_company_data"],
+  },
+  {
     label: "工厂",
     prop: "companyId",
     data: companyData.value,
@@ -447,24 +452,6 @@ const config = ref([
   },
   {
     attrs: {
-      label: "是否逾期",
-      slot: "isOverdue",
-      width: 80,
-      fixed: "left",
-    },
-  },
-  {
-    attrs: {
-      label: "订单类型",
-      prop: "contractType",
-      width: 100,
-    },
-    render(val) {
-      return proxy.dictKeyValue(val, contractTypeData.value);
-    },
-  },
-  {
-    attrs: {
       label: "操作",
       width: "160",
       align: "left",
@@ -483,24 +470,47 @@ const config = ref([
             printQrCode(row);
           },
         },
-        proxy.isCurrentCompanyData(row.companyId)
-          ? {
-              attrs: {
-                label: "备注",
-                type: "primary",
-                text: true,
-              },
-              el: "button",
-              click() {
-                openRemark(row);
-              },
-            }
-          : {},
+        {
+          attrs: {
+            label: "备注",
+            type: "primary",
+            text: true,
+          },
+          el: "button",
+          click() {
+            openRemark(row);
+          },
+        },
       ];
     },
   },
   {
     attrs: {
+      label: "业务公司",
+      prop: "contractCompanyName",
+      width: 110,
+    },
+  },
+  {
+    attrs: {
+      label: "是否逾期",
+      slot: "isOverdue",
+      width: 80,
+      fixed: "left",
+    },
+  },
+  {
+    attrs: {
+      label: "订单类型",
+      prop: "contractType",
+      width: 110,
+    },
+    render(val) {
+      return proxy.dictKeyValue(val, contractTypeData.value);
+    },
+  },
+  {
+    attrs: {
       label: "工厂",
       prop: "companyName",
       width: 100,

+ 25 - 0
src/views/MES/supplementaryOrder/index.vue

@@ -85,6 +85,11 @@ const selectConfig = computed(() => [
     data: statusData.value,
   },
   {
+    label: "报损工序",
+    prop: "processId",
+    data: processesData.value,
+  },
+  {
     type: "time",
     label: "补单时间",
     placeholder: "开始日期",
@@ -115,6 +120,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "报损工序",
+        prop: "processName",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
         label: "责任人",
         prop: "respUserName",
         width: 160,
@@ -281,6 +293,19 @@ const getList = async (req) => {
     });
 };
 
+const processesData = ref([]);
+const getProcesses = () => {
+  proxy
+    .post("/productionProcesses/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      processesData.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+    });
+};
+getProcesses();
 const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";

+ 7 - 2
src/views/finance/fundManage/accountPayment/index.vue

@@ -197,6 +197,11 @@ const userList = ref([]);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "打款状态",
       prop: "paymentStatus",
       data: paymentType.value,
@@ -208,8 +213,8 @@ const config = computed(() => {
     {
       attrs: {
         label: "业务公司",
-        prop: "corporationName",
-        width: 160,
+        prop: "companyName",
+        width: 110,
       },
     },
     {

+ 7 - 2
src/views/finance/fundManage/flow/index.vue

@@ -329,6 +329,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "收支类型",
       prop: "status",
       data: status.value,
@@ -355,8 +360,8 @@ const config = computed(() => {
     {
       attrs: {
         label: "业务公司",
-        prop: "corporationName",
-        width: 170,
+        prop: "companyName",
+        width: 110,
       },
     },
     {

+ 7 - 2
src/views/finance/fundManage/funds/index.vue

@@ -182,6 +182,11 @@ const paymentStatus = ref([
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "类型",
       prop: "type",
       data: fundsType.value,
@@ -203,8 +208,8 @@ const config = computed(() => {
     {
       attrs: {
         label: "业务公司",
-        prop: "corporationName",
-        width: 180,
+        prop: "companyName",
+        width: 110,
       },
     },
     {

+ 3 - 3
src/views/process/processApproval/index.vue

@@ -442,9 +442,6 @@ const optionTwo = reactive({
 });
 const showChart = ref(false);
 onMounted(async () => {
-  if (route.query.processType == 10 || route.query.processType == 30) {
-    showChart.value = true;
-  }
   // 路由进入
   if (route.query && route.query.flowKey) {
     //processType 10 为修改 20为查看 30回退发起
@@ -472,6 +469,9 @@ onMounted(async () => {
   }
 
   $bus.on("getGrossData", (data) => {
+    if (route.query.processType == 10 || route.query.processType == 30) {
+      showChart.value = true;
+    }
     nextTick(() => {
       if (data && data.length > 1 && showChart.value) {
         myChart = echarts.init(chartDom.value);

+ 17 - 37
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -14,7 +14,7 @@
             action: () => start(),
           },
           {
-            text: '全量采购',
+            text: '整单采购',
             disabled: selectData.length === 0,
             action: () => startOne(),
           },
@@ -195,7 +195,7 @@ const selectConfig = computed(() => [
   {
     label: "业务公司",
     prop: "companyId",
-    data: companyData.value,
+    data: proxy.useUserStore().allDict["list_company_data"],
   },
 ]);
 const config = computed(() => {
@@ -324,20 +324,18 @@ const config = computed(() => {
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {
         return [
-          proxy.isCurrentCompanyData(row.companyId)
-            ? {
-                attrs: {
-                  label: "采购",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  selectData.value = [row];
-                  start();
-                },
-              }
-            : {},
+          {
+            attrs: {
+              label: "采购",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              selectData.value = [row];
+              start();
+            },
+          },
         ];
       },
     },
@@ -533,6 +531,7 @@ watch(selectData, (newVal, oldVal) => {
 
 const start = () => {
   if (selectData.value.length > 0) {
+    let rowCompanyId = selectData.value[0].companyId;
     let ids = selectData.value.map((x) => x.id).join();
     proxy.$router.replace({
       path: "/platform_manage/process/processApproval",
@@ -540,7 +539,7 @@ const start = () => {
         flowKey: "purchase_flow",
         random: proxy.random(),
         ids,
-        // submitType: "20",
+        companyId: rowCompanyId,
       },
     });
   } else {
@@ -573,6 +572,7 @@ const startOne = () => {
             flowKey: "purchase_flow",
             random: proxy.random(),
             ids,
+            companyId: rowCompanyId,
           },
         });
       });
@@ -587,26 +587,6 @@ const handleClickFile = (file) => {
   window.open(file.fileUrl, "_blank");
 };
 
-const getDict = () => {
-  proxy
-    .get("/tenantDept/list", {
-      pageNum: 1,
-      pageSize: 9999,
-      keyword: "",
-      tenantId: proxy.useUserStore().user.tenantId,
-      type: 0,
-    })
-    .then((res) => {
-      companyData.value = res.data.map((x) => ({
-        ...x,
-        label: x.deptName,
-        value: x.deptId,
-      }));
-      // treeData.value = proxy.handleTree(res.data, "deptId");
-    });
-};
-getDict();
-
 const prodTagClose = (index, row) => {
   row.prodTags.splice(index, 1);
   proxy

+ 7 - 22
src/views/purchaseManage/purchaseManage/subscribe/index.vue

@@ -158,10 +158,15 @@ const selectConfig = computed(() => [
     prop: "status",
     data: statusData.value,
   },
+  // {
+  //   label: "业务公司",
+  //   prop: "companyId",
+  //   data: companyData.value,
+  // },
   {
     label: "业务公司",
     prop: "companyId",
-    data: companyData.value,
+    data: proxy.useUserStore().allDict["list_company_data"],
   },
 ]);
 const config = computed(() => {
@@ -270,7 +275,7 @@ const config = computed(() => {
           //     getDtl(row);
           //   },
           // },
-          row.status == 15 && proxy.isCurrentCompanyData(row.companyId)
+          row.status == 15
             ? {
                 attrs: {
                   label: "作废",
@@ -477,26 +482,6 @@ const handleClose = (index) => {
 
 getList();
 
-const getDict = () => {
-  proxy
-    .get("/tenantDept/list", {
-      pageNum: 1,
-      pageSize: 9999,
-      keyword: "",
-      tenantId: proxy.useUserStore().user.tenantId,
-      type: 0,
-    })
-    .then((res) => {
-      companyData.value = res.data.map((x) => ({
-        ...x,
-        label: x.deptName,
-        value: x.deptId,
-      }));
-      // treeData.value = proxy.handleTree(res.data, "deptId");
-    });
-};
-getDict();
-
 onMounted(() => {
   $bus.on("refreshTableData", () => {
     getList();

+ 48 - 45
src/views/purchaseManage/purchasePayment/invoice/index.vue

@@ -61,6 +61,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "发票类型",
       prop: "invoiceType",
       data: invoiceType.value,
@@ -120,52 +125,50 @@ const config = computed(() => {
         align: "center",
       },
       renderHTML(row) {
-        return proxy.isCurrentCompanyData(row.companyId)
-          ? [
-              {
-                attrs: {
-                  label: "修改",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  update(row);
-                },
-              },
-              {
-                attrs: {
-                  label: "删除",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  ElMessageBox.confirm(
-                    "此操作将永久删除该数据, 是否继续?",
-                    "提示",
-                    {
-                      confirmButtonText: "确定",
-                      cancelButtonText: "取消",
-                      type: "warning",
-                    }
-                  ).then(() => {
-                    proxy
-                      .post("/invoice/delete", {
-                        id: row.id,
-                      })
-                      .then(() => {
-                        ElMessage({
-                          message: "删除成功",
-                          type: "success",
-                        });
-                        getList();
-                      });
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              update(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
+                proxy
+                  .post("/invoice/delete", {
+                    id: row.id,
+                  })
+                  .then(() => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
                   });
-                },
-              },
-            ]
-          : [];
+              });
+            },
+          },
+        ];
       },
     },
   ];

+ 18 - 15
src/views/purchaseManage/purchasePayment/payment/index.vue

@@ -73,6 +73,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "审批状态",
       prop: "status",
       data: status.value,
@@ -177,21 +182,19 @@ const config = computed(() => {
         align: "center",
       },
       renderHTML(row) {
-        return proxy.isCurrentCompanyData(row.companyId)
-          ? [
-              {
-                attrs: {
-                  label: "打印",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  clickPrint(row);
-                },
-              },
-            ]
-          : [];
+        return [
+          {
+            attrs: {
+              label: "打印",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              clickPrint(row);
+            },
+          },
+        ];
       },
     },
   ];

+ 33 - 22
src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue

@@ -94,14 +94,21 @@ const definition = ref([
   },
 ]);
 const loading = ref(false);
-const companyData = ref([]);
+const companyData = computed(
+  () => proxy.useUserStore().allDict["list_company_data"]
+);
+// if (companyData.value && companyData.value.length > 0) {
+//   console.log("ssssssssssssssss");
+//   sourceList.value.pagination.companyId = companyData.value[0].deptId;
+// }
+
 const selectConfig = computed(() => {
   return [
     {
       label: "业务公司",
       prop: "companyId",
       data: companyData.value,
-      isShowAll: false,
+      // isShowAll: false,
     },
     {
       label: "物品类型",
@@ -119,6 +126,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "companyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "仓库名称",
         prop: "warehouseName",
         width: 150,
@@ -215,7 +229,6 @@ const config = computed(() => {
 });
 
 const treeListData = ref([]);
-
 const arrayRecursion = (arr, definition) => {
   arr.forEach((item) => {
     item.definition = definition;
@@ -226,25 +239,22 @@ const arrayRecursion = (arr, definition) => {
   return arr;
 };
 const getDict = () => {
-  proxy
-    .get("/tenantDept/list", {
-      pageNum: 1,
-      pageSize: 9999,
-      keyword: "",
-      tenantId: proxy.useUserStore().user.tenantId,
-      type: 0,
-    })
-    .then((res) => {
-      companyData.value = res.data.map((x) => ({
-        ...x,
-        label: x.deptName,
-        value: x.deptId,
-      }));
-      if (res.data && res.data.length > 0) {
-        sourceList.value.pagination.companyId = companyData.value[0].value;
-      }
-      getList();
-    });
+  // proxy
+  //   .get("/tenantDept/list", {
+  //     pageNum: 1,
+  //     pageSize: 9999,
+  //     keyword: "",
+  //     tenantId: proxy.useUserStore().user.tenantId,
+  //     type: 0,
+  //   })
+  //   .then((res) => {
+  //     companyData.value = res.data.map((x) => ({
+  //       ...x,
+  //       label: x.deptName,
+  //       value: x.deptId,
+  //     }));
+
+  //   });
 
   proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
     if (res.rows && res.rows.length > 0) {
@@ -355,6 +365,7 @@ const treeChange = (e) => {
   }
 };
 getDict();
+getList();
 
 const checkTheFlow = (item) => {
   proxy.$router.replace({

+ 12 - 7
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -130,6 +130,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "仓库名称",
       prop: "warehouseId",
       data: warehouseList.value,
@@ -159,6 +164,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "companyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "操作时间",
         prop: "createTime",
         width: 160,
@@ -175,13 +187,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "业务公司",
-        prop: "companyName",
-        width: 110,
-      },
-    },
-    {
-      attrs: {
         label: "出库原因",
         prop: "type",
         width: 110,

+ 12 - 7
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -137,6 +137,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "仓库名称",
       prop: "warehouseId",
       data: warehouseList.value,
@@ -152,6 +157,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "companyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "操作时间",
         prop: "createTime",
         width: 160,
@@ -168,13 +180,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "业务公司",
-        prop: "companyName",
-        width: 110,
-      },
-    },
-    {
-      attrs: {
         label: "入库原因",
         prop: "type",
         width: 110,

+ 12 - 7
src/views/purchaseSales/outAndInWarehouse/record/index.vue

@@ -207,6 +207,11 @@ let printData = ref({});
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "操作类型",
       prop: "opType",
       data: opTypeList.value,
@@ -222,6 +227,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "companyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "操作类型",
         prop: "opType",
         width: 80,
@@ -242,13 +254,6 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "业务公司",
-        prop: "companyName",
-        width: 110,
-      },
-    },
-    {
-      attrs: {
         label: "仓库名称",
         prop: "warehouseName",
         width: 130,

+ 10 - 3
src/views/purchaseSales/outAndInWarehouse/snapshot/index.vue

@@ -64,14 +64,21 @@ const warehouseType = computed(
 );
 const selectConfig = computed(() => [
   // {
-  //   label: "仓库类型",
-  //   prop: "type",
-  //   data: warehouseType.value,
+  //   label: "业务公司",
+  //   prop: "companyId",
+  //   data: proxy.useUserStore().allDict["list_company_data"],
   // },
 ]);
 
 const config = computed(() => {
   return [
+    // {
+    //   attrs: {
+    //     label: "业务公司",
+    //     prop: "companyName",
+    //     width: 110,
+    //   },
+    // },
     {
       attrs: {
         label: "快照时间",

+ 22 - 17
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -170,6 +170,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "出库状态",
       prop: "status",
       data: status.value,
@@ -296,23 +301,21 @@ const config = computed(() => {
         align: "center",
       },
       renderHTML(row) {
-        return proxy.isCurrentCompanyData(row.companyId)
-          ? [
-              row.status !== 2
-                ? {
-                    attrs: {
-                      label: "出库",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      clickOperation(row);
-                    },
-                  }
-                : {},
-            ]
-          : [];
+        return [
+          row.status !== 2
+            ? {
+                attrs: {
+                  label: "出库",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickOperation(row);
+                },
+              }
+            : {},
+        ];
       },
     },
   ];
@@ -417,6 +420,7 @@ const formConfig = computed(() => {
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
       itemWidth: 50,
+      disabled: true,
     },
     {
       type: "select",
@@ -481,6 +485,7 @@ const submitForm = () => {
 const clickOperation = (row) => {
   formData.data = {
     id: row.id,
+    companyId: row.companyId,
     businessType: row.businessType + "",
     businessCode: row.businessCode,
     warehouseId: "",

+ 22 - 17
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -177,6 +177,11 @@ const loading = ref(false);
 const selectConfig = computed(() => {
   return [
     {
+      label: "业务公司",
+      prop: "companyId",
+      data: proxy.useUserStore().allDict["list_company_data"],
+    },
+    {
       label: "入库类型",
       prop: "status",
       data: status.value,
@@ -292,23 +297,21 @@ const config = computed(() => {
         align: "center",
       },
       renderHTML(row) {
-        return proxy.isCurrentCompanyData(row.companyId)
-          ? [
-              row.status !== 2
-                ? {
-                    attrs: {
-                      label: "入库",
-                      type: "primary",
-                      text: true,
-                    },
-                    el: "button",
-                    click() {
-                      clickOperation(row);
-                    },
-                  }
-                : {},
-            ]
-          : [];
+        return [
+          row.status !== 2
+            ? {
+                attrs: {
+                  label: "入库",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  clickOperation(row);
+                },
+              }
+            : {},
+        ];
       },
     },
   ];
@@ -413,6 +416,7 @@ const formConfig = computed(() => {
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
       itemWidth: 50,
+      disabled: true,
     },
     {
       type: "select",
@@ -477,6 +481,7 @@ const submitForm = () => {
 const clickOperation = (row) => {
   formData.data = {
     id: row.id,
+    companyId: row.companyId,
     businessType: row.businessType + "",
     businessCode: row.businessCode,
     warehouseId: "",

+ 40 - 17
src/views/purchaseSales/stockManage/inventory/index.vue

@@ -114,6 +114,7 @@ let openProduct = ref(false);
 let roomDialogVisible = ref(false);
 let modalType = ref("add");
 let rules = ref({
+  companyId: [{ required: true, message: "请选择业务公司", trigger: "change" }],
   checkQuantity: [
     { required: true, message: "请输入盘点数量", trigger: "blur" },
   ],
@@ -122,7 +123,12 @@ let rules = ref({
   ],
 });
 const { proxy } = getCurrentInstance();
-const selectConfig = reactive([
+const selectConfig = computed(() => [
+  {
+    label: "业务公司",
+    prop: "companyId",
+    data: proxy.useUserStore().allDict["list_company_data"],
+  },
   {
     label: "盘点结论",
     prop: "result",
@@ -144,6 +150,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "业务公司",
+        prop: "companyName",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "盘点单号",
         prop: "code",
         slot: "code",
@@ -243,23 +256,24 @@ const formOption = reactive({
 });
 const byform = ref(null);
 const treeData = ref([]);
-const formConfig = reactive([
+const formConfig = computed(() => [
+  {
+    type: "treeSelect",
+    prop: "companyId",
+    label: "业务公司",
+    data: proxy.useUserStore().allDict["tree_company_data"],
+    propsTreeLabel: "deptName",
+    propsTreeValue: "deptId",
+    itemWidth: 50,
+    disabeld: modalType.value == "edit",
+  },
   {
     type: "select",
     prop: "warehouseId",
     label: "仓库名称",
-    itemWidth: 100,
-    isLoad: {
-      url: "/warehouse/page",
-      req: {
-        pageNum: 1,
-        pageSize: 9999,
-      },
-      labelKey: "name",
-      labelVal: "id",
-      method: "post",
-      resUrl: "rows",
-    },
+    itemWidth: 50,
+    data: warehouseList.value,
+    disabeld: modalType.value == "edit",
   },
   // {
   //   type: "title1",
@@ -288,7 +302,6 @@ const getList = async (req) => {
 const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";
-  formConfig[0].disabled = false;
   formData.data = {
     list: [],
   };
@@ -332,7 +345,7 @@ const getDtl = (row) => {
     dialogVisible.value = true;
   });
 };
-
+const warehouseList = ref([]);
 const productUnit = ref([]);
 const getDict = () => {
   proxy.getDictOne(["material_unit"]).then((res) => {
@@ -341,6 +354,17 @@ const getDict = () => {
       value: x.dictKey,
     }));
   });
+
+  proxy.post("/warehouse/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      warehouseList.value = res.rows.map((item) => {
+        return {
+          label: item.name,
+          value: item.id,
+        };
+      });
+    }
+  });
 };
 getDict();
 getList();
@@ -569,7 +593,6 @@ const changeClass = ({ row }) => {
 const handleClickCode = (row) => {
   modalType.value = "edit";
   proxy.post("/stockCheck/detail", { id: row.id }).then((res) => {
-    formConfig[0].disabled = true;
     res.list.forEach((x) => {
       if (Number(x.checkQuantity) > Number(x.quantity)) {
         x.result = "盘盈";

+ 42 - 44
src/views/salesMange/saleContract/claim/index.vue

@@ -219,51 +219,49 @@ const config = computed(() => {
         align: "right",
       },
       renderHTML(row) {
-        return proxy.isCurrentCompanyData(row.companyId)
-          ? [
-              row.isClaim != 1
-                ? {
-                    attrs: {
-                      label: "认领",
-                      type: "primary",
-                      text: true,
-                      bg: true,
-                      disabled: false,
+        [
+          row.isClaim != 1
+            ? {
+                attrs: {
+                  label: "认领",
+                  type: "primary",
+                  text: true,
+                  bg: true,
+                  disabled: false,
+                },
+                el: "button",
+                click() {
+                  getDtl(row);
+                },
+              }
+            : {},
+          row.isClaim != 0
+            ? {
+                attrs: {
+                  label: "取消认领",
+                  text: true,
+                  bg: true,
+                  type: "primary",
+                  disabled: false,
+                  style: {
+                    color: "#e6a23c",
+                  },
+                },
+                el: "button",
+                click() {
+                  proxy.$router.replace({
+                    path: "/platform_manage/process/processApproval",
+                    query: {
+                      flowKey: "claim_del_flow",
+                      flowName: "取消认领发起",
+                      random: proxy.random(),
+                      businessId: row.id,
                     },
-                    el: "button",
-                    click() {
-                      getDtl(row);
-                    },
-                  }
-                : {},
-              row.isClaim != 0
-                ? {
-                    attrs: {
-                      label: "取消认领",
-                      text: true,
-                      bg: true,
-                      type: "primary",
-                      disabled: false,
-                      style: {
-                        color: "#e6a23c",
-                      },
-                    },
-                    el: "button",
-                    click() {
-                      proxy.$router.replace({
-                        path: "/platform_manage/process/processApproval",
-                        query: {
-                          flowKey: "claim_del_flow",
-                          flowName: "取消认领发起",
-                          random: proxy.random(),
-                          businessId: row.id,
-                        },
-                      });
-                    },
-                  }
-                : {},
-            ]
-          : [];
+                  });
+                },
+              }
+            : {},
+        ];
       },
     },
   ];

+ 18 - 0
src/views/systemTenant/tenant/userTenant/index.vue

@@ -453,6 +453,24 @@ const submitForm = () => {
         message: modalType.value == "add" ? "添加成功" : "编辑成功",
         type: "success",
       });
+      // 更新业务公司数据
+      proxy
+        .post("/tenantUser/getUserCompanyList", {
+          pageNum: 1,
+          pageSize: 9999,
+        })
+        .then((res) => {
+          proxy.useUserStore().allDict["list_company_data"] = res.map((x) => ({
+            ...x,
+            label: x.deptName,
+            value: x.deptId,
+          }));
+          proxy.useUserStore().allDict["tree_company_data"] = proxy.handleTree(
+            res,
+            "deptId"
+          );
+        });
+
       dialogVisible.value = false;
       getList();
     });