Ver Fonte

部分oa新模块,以及部分页面数据权限更改

cz há 1 ano atrás
pai
commit
d4f8133c1d
39 ficheiros alterados com 3685 adições e 482 exclusões
  1. 1 1
      src/components/process/EHSD/ContractChange.vue
  2. 632 0
      src/components/process/SF/ActivityPriceInventory.vue
  3. 25 13
      src/components/process/SF/Contract.vue
  4. 13 6
      src/components/process/SF/ContractChange.vue
  5. 7 4
      src/components/process/SF/CostControl.vue
  6. 51 34
      src/components/process/SF/DiscussPrice.vue
  7. 8 5
      src/components/process/SF/EducationSubsidy.vue
  8. 21 5
      src/components/process/SF/EncodingCombination.vue
  9. 375 0
      src/components/process/SF/InvoiceTaxDeduction.vue
  10. 21 5
      src/components/process/SF/MedicalAndsocialSecurity.vue
  11. 288 0
      src/components/process/SF/PersonalInvoice.vue
  12. 6 3
      src/components/process/SF/Subscribe.vue
  13. 6 3
      src/components/process/SF/UseSeal.vue
  14. 1 1
      src/components/product/SelectCompanyProduct.vue
  15. 2 2
      src/components/product/SelectCustomerProduct.vue
  16. 1 1
      src/components/product/SelectProduct.vue
  17. 12 0
      src/layout/index.vue
  18. 15 3
      src/utils/util.js
  19. 63 30
      src/views/EHSD/productLibrary/companyProduct/index.vue
  20. 2 2
      src/views/EHSD/productLibrary/customerProduct/index.vue
  21. 80 33
      src/views/EHSD/productLibrary/waitCreateProduct/index.vue
  22. 1 1
      src/views/EHSD/saleContract/PriceSheetDetail.vue
  23. 2 2
      src/views/EHSD/saleContract/contractEHSD/index.vue
  24. 68 16
      src/views/EHSD/saleContract/priceSheetEHSD/index.vue
  25. 4 2
      src/views/EHSD/saleContract/priceSheetEstimate/index.vue
  26. 2 1
      src/views/MES/productionOrder/index.vue
  27. 1 1
      src/views/dataBoard/main/productAnalysis.vue
  28. 606 0
      src/views/oa/application/activityPriceInventory/index.vue
  29. 63 61
      src/views/oa/application/educationSubsidy/index.vue
  30. 63 61
      src/views/oa/application/encodingCombination/index.vue
  31. 493 0
      src/views/oa/application/invoiceTaxDeduction/index.vue
  32. 63 61
      src/views/oa/application/medicalAndsocialSecurity/index.vue
  33. 493 0
      src/views/oa/application/personalInvoice/index.vue
  34. 76 74
      src/views/oa/application/useSeal/index.vue
  35. 43 0
      src/views/process/processApproval/index.vue
  36. 11 11
      src/views/product/material/index.vue
  37. 1 1
      src/views/production/project/processConfig/vueFlow.vue
  38. 1 1
      src/views/salesMange/afterSales/SelectContractProduct.vue
  39. 64 38
      src/views/systemTenant/tenant/roleTenant/index.vue

+ 1 - 1
src/components/process/EHSD/ContractChange.vue

@@ -321,7 +321,7 @@
                           <div>
                             <div>
                               <img src="@/assets/images/money1.png" alt="" class="img" /> <span
-                                    style="font-size:14px;font-weight:700;color:#000">销售业务成本单价:</span>
+                                    style="font-size:14px;font-weight:700;color:#000">销售业务供货价:</span>
                               <div style="padding:5px 0px 0px 20px">
                                 {{row.currency}} {{moneyFormat(row.salePrice,2)}}
                               </div>

+ 632 - 0
src/components/process/SF/ActivityPriceInventory.vue

@@ -0,0 +1,632 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+      <template #detail>
+        <div style="width:100%">
+          <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!judgeStatus()">产品库</el-button>
+          <el-table :data="formData.data.activityPriceInventoryDetailList" style="width: 100%;">
+            <!-- <el-table-column label="产品图片" width="80">
+              <template #default="{ row }">
+                <div v-if="row.fileUrl">
+                  <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
+                </div>
+                <div v-else></div>
+              </template>
+            </el-table-column> -->
+            <el-table-column prop="productName" label="产品名称" />
+            <!-- <el-table-column prop="productCode" label="产品编码" /> -->
+            <el-table-column prop="productColor" label="颜色" width="140" />
+            <el-table-column label="规格尺寸 (cm)" width="130">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="产品分销价" prop="distributionPrice" width="130">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'activityPriceInventoryDetailList.' + $index + '.distributionPrice'" :rules="rules.distributionPrice"
+                                :inline-message="true" class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.distributionPrice" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="原销售价格" prop="salesPrice" width="100" />
+            <el-table-column label="活动价格" width="130">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'activityPriceInventoryDetailList.' + $index + '.activityPrice'" :rules="rules.activityPrice"
+                                :inline-message="true" class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.activityPrice" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
+              <template #default="{ $index }">
+                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+    </byForm>
+    <el-dialog v-if="openProductCompany" v-model="openProductCompany" title="产品库" width="90%" append-to-body>
+      <SelectProduct @selectProduct="selectProduct" :isRawMaterial="'1'" :disablePerm="'1'"></SelectProduct>
+      <template #footer>
+        <el-button @click="openProductCompany = false" size="defualt" v-debounce>关 闭</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import SelectProduct from "@/components/product/SelectProduct.vue";
+import { useRoute } from "vue-router";
+const { proxy } = getCurrentInstance();
+const route = useRoute();
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const openProductCompany = ref(false);
+const selectData = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
+const isData = ref([
+  {
+    label: "是",
+    value: 1,
+  },
+  {
+    label: "否",
+    value: 0,
+  },
+]);
+const formData = reactive({
+  data: {
+    supporterFileList: [],
+    activityPriceInventoryDetailList: [],
+    stockFileList: [],
+  },
+});
+const formDom = ref(null);
+const judgeStatus = () => {
+  if (route.query.processType == 20 || route.query.processType == 10) {
+    return true;
+  }
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
+const formOption = reactive({
+  inline: true,
+  labelWidth: 130,
+  itemWidth: 100,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title",
+      title: "基本信息",
+      haveLine: false,
+    },
+    {
+      type: "input",
+      prop: "code",
+      label: "流水号",
+      placeholder: " ",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "date",
+      prop: "applyTime",
+      itemType: "date",
+      label: "申请日期",
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "select",
+      prop: "createUser",
+      label: "申请人",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "treeSelect",
+      prop: "companyId",
+      label: "所属公司",
+      data: proxy.useUserStore().allDict["tree_all_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      fn: (val) => {},
+      disabled: true,
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "所属部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "title",
+      title: "店铺信息",
+      haveLine: true,
+    },
+    {
+      type: "select",
+      prop: "shopId",
+      label: "店铺名称",
+      filterable: true,
+      multiple: false,
+      data: selectData.value,
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      prop: "shopPlatform",
+      itemType: "text",
+      label: "店铺平台",
+      itemWidth: 33.33,
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "shopBrand",
+      itemType: "text",
+      label: "店铺品牌",
+      itemWidth: 33.33,
+      disabled: false,
+    },
+    {
+      type: "title",
+      title: "申请内容",
+      haveLine: true,
+    },
+    {
+      type: "select",
+      prop: "isPlatformActivity",
+      label: "是否平台活动",
+      filterable: false,
+      multiple: false,
+      data: isData.value,
+      itemWidth: 33.33,
+    },
+    {
+      type: "select",
+      prop: "isProductSupport",
+      label: "是否需要产品价格支持",
+      filterable: false,
+      multiple: false,
+      data: isData.value,
+      itemWidth: 33.33,
+    },
+    {
+      type: "select",
+      prop: "isInventorySupport",
+      label: "是否需要库存支持",
+      filterable: false,
+      multiple: false,
+      data: isData.value,
+      itemWidth: 33.33,
+    },
+    {
+      type: "title",
+      title: "平台活动信息",
+      haveLine: true,
+      isShow: formData.data.isPlatformActivity ? true : false,
+    },
+    {
+      type: "input",
+      prop: "activityName",
+      itemType: "text",
+      label: "活动名称",
+      itemWidth: 50,
+      disabled: false,
+      isShow: formData.data.isPlatformActivity ? true : false,
+    },
+    {
+      type: "input",
+      prop: "activityDays",
+      itemType: "text",
+      label: "活动天数",
+      itemWidth: 50,
+      disabled: false,
+      isShow: formData.data.isPlatformActivity ? true : false,
+    },
+    {
+      type: "date",
+      prop: "activityStartTime",
+      itemType: "date",
+      label: "活动开始日期",
+      itemWidth: 50,
+      disabled: false,
+      isShow: formData.data.isPlatformActivity ? true : false,
+    },
+    {
+      type: "date",
+      prop: "activityEndTime",
+      itemType: "date",
+      label: "活动结束日期",
+      itemWidth: 50,
+      disabled: false,
+      isShow: formData.data.isPlatformActivity ? true : false,
+    },
+    {
+      type: "slot",
+      slotName: "detail",
+      prop: "",
+      label: "活动明细",
+      isShow: formData.data.isPlatformActivity ? true : false,
+    },
+    {
+      type: "title",
+      title: "产品价格支持信息",
+      haveLine: true,
+      isShow: formData.data.isProductSupport ? true : false,
+    },
+    {
+      type: "treeSelect",
+      prop: "supporterId",
+      label: "支持方",
+      data: proxy.useUserStore().allDict["tree_all_company_data"],
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 50,
+      fn: (val) => {},
+      disabled: false,
+      isShow: formData.data.isProductSupport ? true : false,
+    },
+    {
+      type: "input",
+      prop: "supportCycle",
+      itemType: "text",
+      label: "支持周期",
+      itemWidth: 50,
+      disabled: false,
+      isShow: formData.data.isProductSupport ? true : false,
+    },
+    {
+      type: "date",
+      prop: "supporterStartTime",
+      itemType: "date",
+      label: "支持起始日期",
+      itemWidth: 50,
+      disabled: false,
+      isShow: formData.data.isProductSupport ? true : false,
+    },
+    {
+      type: "date",
+      prop: "supporterEndTime",
+      itemType: "date",
+      label: "支持结束日期",
+      itemWidth: 50,
+      disabled: false,
+      isShow: formData.data.isProductSupport ? true : false,
+    },
+    {
+      type: "upload",
+      listType: "text",
+      aisInventorySupportept: "",
+      prop: "supporterFileList",
+      label: "附件",
+      isShow: formData.data.isProductSupport ? true : false,
+    },
+    {
+      type: "input",
+      prop: "productQuotationUser",
+      itemType: "text",
+      label: "商品报价人",
+      itemWidth: 50,
+      disabled: false,
+      isShow: formData.data.isProductSupport ? true : false,
+    },
+    {
+      type: "select",
+      prop: "isReportGm",
+      label: "是否提报总经理",
+      filterable: false,
+      multiple: false,
+      data: isData.value,
+      itemWidth: 50,
+      isShow: formData.data.isProductSupport ? true : false,
+    },
+    {
+      type: "title",
+      title: "库存支持信息",
+      haveLine: true,
+      isShow: formData.data.isInventorySupport ? true : false,
+    },
+    {
+      type: "select",
+      prop: "isNewProduct",
+      label: "是否新品",
+      filterable: false,
+      multiple: false,
+      data: isData.value,
+      itemWidth: 50,
+      isShow: formData.data.isInventorySupport ? true : false,
+    },
+    {
+      type: "upload",
+      listType: "text",
+      aisInventorySupportept: "",
+      prop: "stockFileList",
+      label: "库存明细附件",
+      isShow: formData.data.isInventorySupport ? true : false,
+    },
+  ];
+});
+
+const rules = ref({
+  applyTime: [{ required: true, message: "请选择申请日期", trigger: "change" }],
+  companyId: [{ required: true, message: "请选择所属公司", trigger: "change" }],
+  deptId: [{ required: true, message: "请选择所属部门", trigger: "change" }],
+  createUser: [{ required: true, message: "请选择申请人", trigger: "change" }],
+  shopId: [{ required: true, message: "请选择店铺", trigger: "change" }],
+  shopPlatform: [
+    { required: true, message: "请输入店铺平台", trigger: "blur" },
+  ],
+  shopBrand: [{ required: true, message: "请输入店铺品牌", trigger: "blur" }],
+  isPlatformActivity: [
+    { required: true, message: "请选择是否平台活动", trigger: "change" },
+  ],
+  isProductSupport: [
+    {
+      required: true,
+      message: "请选择是否需要产品价格支持",
+      trigger: "change",
+    },
+  ],
+  isInventorySupport: [
+    { required: true, message: "请选择是否需要库存支持", trigger: "change" },
+  ],
+  activityName: [
+    { required: true, message: "请输入活动名称", trigger: "blur" },
+  ],
+  activityDays: [
+    { required: true, message: "请输入活动天数", trigger: "blur" },
+  ],
+
+  activityStartTime: [
+    { required: true, message: "请选择活动开始日期", trigger: "change" },
+  ],
+  activityEndTime: [
+    { required: true, message: "请选择活动结束日期", trigger: "change" },
+  ],
+  supporterId: [{ required: true, message: "请选择支持方", trigger: "change" }],
+  supportCycle: [
+    { required: true, message: "请输入支持周期", trigger: "blur" },
+  ],
+
+  supporterStartTime: [
+    { required: true, message: "请选择支持起始日期", trigger: "change" },
+  ],
+  supporterEndTime: [
+    { required: true, message: "请选择支持结束日期", trigger: "change" },
+  ],
+  isReportGm: [
+    { required: true, message: "请选择是否提报总经理", trigger: "change" },
+  ],
+  isNewProduct: [
+    { required: true, message: "请选择是否新品", trigger: "change" },
+  ],
+  distributionPrice: [
+    { required: true, message: "请输入产品分销价", trigger: "blur" },
+  ],
+  activityPrice: [
+    { required: true, message: "请输入活动价格", trigger: "blur" },
+  ],
+
+  // supporterFileList: [{ required: true, message: "请上传申请附件", trigger: "change" }],
+});
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
+const getDeptData = () => {
+  proxy
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      // ancestors: proxy.useUserStore().user.companyId,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDeptData();
+
+const getDict = () => {
+  proxy
+    .post("shopInfo/page", {
+      pageNum: 1,
+      pageSize: 999,
+    })
+    .then((res) => {
+      selectData.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+    });
+};
+getDict();
+
+const selectProduct = async (row) => {
+  let fileUrl = "";
+  if (row.fileList && row.fileList.length > 0) {
+    fileUrl = row.fileList[0].fileUrl;
+  }
+  let flag = formData.data.activityPriceInventoryDetailList.some(
+    (x) => x.productId == row.id
+  );
+  if (!flag) {
+    formData.data.activityPriceInventoryDetailList.push({
+      fileUrl: fileUrl,
+      productId: row.id,
+      productClassifyName: row.classifyName,
+      productName: row.name,
+      productCode: row.customCode,
+      productLength: row["length"],
+      productWidth: row.width,
+      productHeight: row.height,
+      productColor: row.color,
+      productNetWeight: row.netWeight,
+      productUnit: row.unit,
+      distributionPrice: null,
+      salesPrice: row.price,
+      activityPrice: null,
+    });
+    return proxy.msgTip("添加成功", 1);
+  } else {
+    return proxy.msgTip("该产品已选择", 2);
+  }
+};
+
+const handleRemove = (index) => {
+  formData.data.activityPriceInventoryDetailList.splice(index, 1);
+};
+
+const handleSubmit = async (isStag = false) => {
+  if (isStag) {
+    return true;
+  }
+  let flag = await formDom.value.handleSubmit(() => {});
+  if (flag) {
+    if (formData.data.isPlatformActivity) {
+      if (
+        !(
+          formData.data.activityPriceInventoryDetailList &&
+          formData.data.activityPriceInventoryDetailList.length > 0
+        )
+      ) {
+        proxy.msgTip("请添加活动明细", 2);
+        return false;
+      }
+    }
+    return true;
+  } else {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView();
+    }, 0);
+  }
+  return flag;
+};
+
+const getFormData = () => {
+  return proxy.deepClone(formData.data);
+};
+// 向父组件暴露
+defineExpose({
+  getFormData,
+  handleSubmit,
+});
+
+const getAllData = (businessId) => {
+  if (businessId) {
+    proxy
+      .post("/activityPriceInventory/detail", { id: businessId })
+      .then((res) => {
+        res.isNewProduct = Number(res.isNewProduct);
+        formData.data = res;
+        proxy
+          .post("/fileInfo/getList", { businessIdList: [businessId] })
+          .then((fileObj) => {
+            if (fileObj[businessId] && fileObj[businessId].length > 0) {
+              formData.data.supporterFileList = fileObj[businessId]
+                .filter((x) => x.businessType == "10")
+                .map((item) => {
+                  return {
+                    ...item,
+                    name: item.fileName,
+                    url: item.fileUrl,
+                  };
+                });
+              formData.data.stockFileList = fileObj[businessId]
+                .filter((x) => x.businessType == "20")
+                .map((item) => {
+                  return {
+                    ...item,
+                    name: item.fileName,
+                    url: item.fileUrl,
+                  };
+                });
+            } else {
+              formData.data.supporterFileList = [];
+              formData.data.stockFileList = [];
+            }
+          });
+      });
+  }
+};
+
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  formData.data.applyTime = proxy.parseTime(new Date());
+  formData.data.companyId = proxy.useUserStore().user.companyId;
+  formData.data.deptId = proxy.useUserStore().user.dept.deptId;
+  formData.data.createUser = proxy.useUserStore().user.userId;
+  if (route.query.businessId) {
+    getAllData(route.query.businessId);
+  }
+  // 删除莫名多出的一个textarea
+  nextTick(() => {
+    setTimeout(() => {
+      let dom = document.getElementsByTagName("textarea");
+      if (dom && dom.length > 0) {
+        for (let i = 0; i < dom.length; i++) {
+          if (!dom[i].className) {
+            dom[i].style.display = "none";
+          }
+        }
+      }
+    }, 100);
+  });
+});
+</script>
+
+<style lang="scss" scoped>
+</style>

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

@@ -15,8 +15,9 @@
             <el-row style="width: 100%">
               <el-col :span="12">
                 <el-form-item prop="ofCompanyId" label="" label-width="0px" class="margin-b-0 wid100">
-                  <el-tree-select v-model="formData.data.ofCompanyId" :data="useUserStore().allDict['tree_company_data']" style="width: 100%"
-                                  placeholder="公司" default-expand-all
+                  <el-tree-select v-model="formData.data.ofCompanyId"
+                                  :data="isFormDetail ?useUserStore().allDict['tree_all_company_data']:useUserStore().allDict['tree_company_data']"
+                                  style="width: 100%" placeholder="公司" default-expand-all
                                   :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
                                   @change="handleOfCompanyIdChange" :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
                 </el-form-item>
@@ -467,7 +468,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="出厂单价" prop="factoryPrice" width="100">
+            <el-table-column label="业务供货价" prop="businessCostPrice" width="100">
             </el-table-column>
             <el-table-column prop="amount" label="小计" width="110">
               <template #default="{ row, $index }">
@@ -476,7 +477,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="amountTwo" label="出厂小计金额" width="110">
+            <el-table-column prop="amountTwo" label="业务小计金额" width="110">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   ¥ {{row.amountTwo}}
@@ -821,6 +822,7 @@ const formConfig = computed(() => {
       prop: "salesmanId",
       label: "业务员",
       data: userList.value,
+      disabled: true,
       itemWidth: 50,
     },
     {
@@ -1222,7 +1224,7 @@ const formConfig = computed(() => {
     {
       type: "input",
       prop: "factoryAmount",
-      label: "出⼚总⾦额",
+      label: "业务总⾦额",
       itemWidth: 25,
       disabled: true,
     },
@@ -1313,9 +1315,9 @@ const rules = ref({
   buyContactName: [
     { required: true, message: "请输入联系人", trigger: ["change", "blur"] },
   ],
-  buyContactNumber: [
-    { required: true, message: "请输入联系电话", trigger: "blur" },
-  ],
+  // buyContactNumber: [
+  //   { required: true, message: "请输入联系电话", trigger: "blur" },
+  // ],
   quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
   payName: [
@@ -1389,6 +1391,11 @@ const getaccountList = (val) => {
       });
     });
 };
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
+
 const getDict = () => {
   proxy
     .post("/contractTemplate/page", {
@@ -1451,7 +1458,7 @@ const getDict = () => {
     });
 
   proxy
-    .get("/tenantUser/list", {
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
       tenantId: proxy.useUserStore().user.tenantId,
@@ -1496,7 +1503,7 @@ const handleOfCompanyIdChange = (val) => {
         pageNum: 1,
         pageSize: 9999,
         keyword: "",
-        ancestors: val,
+        ancestors: isFormDetail.value ? "" : val,
         tenantId: proxy.useUserStore().user.tenantId,
         // type: 2,
       })
@@ -1704,7 +1711,7 @@ const selectProduct = async (goods) => {
           prodFilePath: goods.prodFilePath,
           quantity: null,
           price: goods.price || null,
-          factoryPrice: goods.factoryPrice || null,
+          businessCostPrice: goods.businessCostPrice || null,
           amount: "",
           remark: "",
           fileList: [],
@@ -1828,7 +1835,7 @@ const handleDeleteMaterial = (index, sonIndex) => {
   );
 };
 
-const calculationAmount = (flag = flase) => {
+const calculationAmount = (flag = false) => {
   if (
     formData.data.contractProductList &&
     formData.data.contractProductList.length > 0
@@ -1840,7 +1847,7 @@ const calculationAmount = (flag = flase) => {
       ).toFixed(2);
       formData.data.contractProductList[i].amountTwo = parseFloat(
         Number(formData.data.contractProductList[i].quantity) *
-          Number(formData.data.contractProductList[i].factoryPrice)
+          Number(formData.data.contractProductList[i].businessCostPrice)
       ).toFixed(2);
       let row = formData.data.contractProductList[i];
       if (flag) {
@@ -2319,6 +2326,7 @@ const getPriceSheetData = (id) => {
     formData.data = res;
     formData.data = {
       contractType: route.query.contractType,
+      salesmanId: proxy.useUserStore().user.userId,
       templateContent: "",
       quotationId: res.id,
       // companyId: res.companyId,
@@ -2353,6 +2361,10 @@ const getPriceSheetData = (id) => {
       quantity: x.quantity,
       price: x.price,
       amount: x.amount,
+      businessCostPrice: x.businessCostPrice,
+      amountTwo: Number(
+        parseFloat(x.quantity * x.businessCostPrice).toFixed(2)
+      ),
       fileList: [],
       contractProductBomList: x.quotationProductBomList.map((y) => {
         y.quotationProductBomId = y.id;

+ 13 - 6
src/components/process/SF/ContractChange.vue

@@ -15,8 +15,9 @@
             <el-row style="width: 100%">
               <el-col :span="12">
                 <el-form-item prop="ofCompanyId" label="" label-width="0px" class="margin-b-0 wid100">
-                  <el-tree-select v-model="formData.data.ofCompanyId" :data="useUserStore().allDict['tree_company_data']" style="width: 100%"
-                                  placeholder="公司" default-expand-all
+                  <el-tree-select v-model="formData.data.ofCompanyId"
+                                  :data="isFormDetail ?useUserStore().allDict['tree_all_company_data']:useUserStore().allDict['tree_company_data']"
+                                  style="width: 100%" placeholder="公司" default-expand-all
                                   :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
                                   @change="handleOfCompanyIdChange" :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
                 </el-form-item>
@@ -467,7 +468,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="出厂单价" prop="factoryPrice" width="100">
+            <el-table-column label="工厂供货价" prop="factoryPrice" width="100">
             </el-table-column>
             <el-table-column prop="amount" label="小计" width="110">
               <template #default="{ row, $index }">
@@ -821,6 +822,7 @@ const formConfig = computed(() => {
       prop: "salesmanId",
       label: "业务员",
       data: userList.value,
+      disabled: true,
       itemWidth: 50,
     },
     {
@@ -1389,6 +1391,11 @@ const getaccountList = (val) => {
       });
     });
 };
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
+
 const getDict = () => {
   proxy
     .post("/contractTemplate/page", {
@@ -1451,7 +1458,7 @@ const getDict = () => {
     });
 
   proxy
-    .get("/tenantUser/list", {
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
       tenantId: proxy.useUserStore().user.tenantId,
@@ -1496,7 +1503,7 @@ const handleOfCompanyIdChange = (val) => {
         pageNum: 1,
         pageSize: 9999,
         keyword: "",
-        ancestors: val,
+        ancestors: isFormDetail.value ? "" : val,
         tenantId: proxy.useUserStore().user.tenantId,
         // type: 2,
       })
@@ -1828,7 +1835,7 @@ const handleDeleteMaterial = (index, sonIndex) => {
   );
 };
 
-const calculationAmount = (flag = flase) => {
+const calculationAmount = (flag = false) => {
   if (
     formData.data.contractProductList &&
     formData.data.contractProductList.length > 0

+ 7 - 4
src/components/process/SF/CostControl.vue

@@ -1135,14 +1135,17 @@ const changApplyUserId = (val) => {
     formData.data.accountNumber = current.accountNumber;
   }
 };
-
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
 const getDeptData = (val) => {
   proxy
-    .get("/tenantUser/list", {
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
       tenantId: proxy.useUserStore().user.tenantId,
-      companyId: val,
+      // companyId: val,
     })
     .then((res) => {
       userList.value = res.rows.map((item) => {
@@ -1159,7 +1162,7 @@ const getDeptData = (val) => {
       pageNum: 1,
       pageSize: 9999,
       keyword: "",
-      ancestors: val,
+      ancestors: isFormDetail.value ? "" : val,
       tenantId: proxy.useUserStore().user.tenantId,
       // type: 2,
     })

+ 51 - 34
src/components/process/SF/DiscussPrice.vue

@@ -17,7 +17,7 @@
                     </el-col>
                     <el-col :span="14" style="display:flex;justify-content:space-around">
                       <span>数量:{{product.quantity}}</span>
-                      <span> 业务成本单价:{{moneyFormat(product.businessCostPrice,2)}}</span>
+                      <span> 业务供货价:{{moneyFormat(product.businessCostPrice,2)}}</span>
                       <span> 最低价:{{moneyFormat(product.minPrice,2)}}</span>
                       <span> 最高价:{{moneyFormat(product.maxPrice,2)}}</span>
                     </el-col>
@@ -38,14 +38,14 @@
                     </div>
                     <div style="width: 100%;padding-left:15px">
                       <el-row>
-                        <el-col :span="12">
+                        <!-- <el-col :span="12">
                           <el-form-item :prop="'quotationProductList.' +index + '.rawMaterialId'" :rules="rules.rawMaterialId" :inline-message="true"
                                         label="原材料" class="wid100">
                             <el-select v-model="product.rawMaterialId" placeholder="请选择" style="width:100%">
                               <el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" />
                             </el-select>
                           </el-form-item>
-                        </el-col>
+                        </el-col> -->
                         <el-col :span="12">
                           <el-form-item label="颜色" class="margin-b-0 wid100">
                             <el-row style="width: 100%">
@@ -62,10 +62,8 @@
                             </el-row>
                           </el-form-item>
                         </el-col>
-                      </el-row>
-                      <el-row>
                         <el-col :span="12">
-                          <el-form-item label="尺寸" class="margin-b-0 wid100" required>
+                          <el-form-item label="尺寸" required>
                             <el-row style="width:100%">
                               <el-col :span="8">
                                 <el-form-item :prop="'quotationProductList.' +index + '.productLength'" :rules="rules.productLength"
@@ -91,6 +89,9 @@
                             </el-row>
                           </el-form-item>
                         </el-col>
+                      </el-row>
+                      <el-row>
+
                         <el-col :span="12">
                           <el-form-item label="净重(kg)" prop="netWeight" class="margin-b-0 wid100">
                             <el-input-number v-model="product.netWeight" placeholder="请输入" style="width: 100%" :precision="2" :controls="false"
@@ -102,23 +103,24 @@
                     </div>
 
                     <div style="margin:10px 0">
-                      <TitleInfo :content="'辅材'"></TitleInfo>
+                      <TitleInfo :content="'BOM'"></TitleInfo>
                     </div>
                     <div style="width: 100%;padding-left:15px">
                       <el-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
-                        <el-table-column prop="productName" label="物料名称" />
-                        <el-table-column prop="productCode" label="物料编码" />
-                        <el-table-column label="数量" width="150">
+                        <el-table-column prop="productName" label="物料名称" width="170" />
+                        <el-table-column prop="productCode" label="物料编码" width="180" />
+                        <el-table-column label="规格尺寸(cm)" width="130">
                           <template #default="{ row, $index }">
-                            <div style="width: 100%">
-                              <el-form-item :prop="'quotationProductList.' + index + '.quotationProductBomList.' + $index + '.quantity'"
-                                            :rules="rules.quantity" :inline-message="true" class="margin-b-0 wid100">
-                                <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder=" " style="width: 100%"
-                                                 :precision="0" :controls="false" :min="1" />
-                              </el-form-item>
+                            <div style="width: 100%" v-if="row.productLength&&row.productWidth && row.productHeight">
+                              {{row.productLength}}*{{row.productWidth}}*{{row.productHeight}}
                             </div>
                           </template>
                         </el-table-column>
+                        <el-table-column prop="productColor" label="颜色" width="170" />
+                        <el-table-column prop="standardDosage" label="标准用量" width="100" />
+                        <el-table-column prop="lossRate" label="损耗率(%)" width="100" />
+                        <el-table-column prop="quantity" label="数量" width="100" />
+                        <el-table-column prop="remark" label="备注" min-width="150" />
                       </el-table>
                     </div>
 
@@ -127,7 +129,7 @@
                     </div>
 
                     <div style="width:100%;padding-left:15px">
-                      <div class="small-title">
+                      <!-- <div class="small-title">
                         ① 工艺线路
                       </div>
                       <el-row style="width:100%">
@@ -139,9 +141,9 @@
                             </el-select>
                           </el-form-item>
                         </el-col>
-                      </el-row>
+                      </el-row> -->
                       <div class="small-title">
-                         LOGO
+                         LOGO
                       </div>
                       <el-row style="width:100%">
                         <el-col :span="12">
@@ -179,7 +181,7 @@
                         </el-col>
                       </el-row>
                       <div class="small-title">
-                         折叠
+                         折叠
                       </div>
                       <el-row style="width:100%">
                         <el-col :span="12">
@@ -200,7 +202,7 @@
                         </el-col>
                       </el-row>
                       <div class="small-title">
-                         包装要求
+                         包装要求
                       </div>
                       <el-row style="width:100%">
                         <el-col :span="12">
@@ -212,7 +214,7 @@
                         </el-col>
                       </el-row>
                       <div class="small-title">
-                         是否定制
+                         是否定制
                       </div>
                       <el-row style="width:100%">
                         <el-col :span="12">
@@ -1001,18 +1003,18 @@ const getAllData = (businessId) => {
         } else {
           iele.packAsk = [];
         }
-        if (
-          iele.quotationProductBomList &&
-          iele.quotationProductBomList.length > 0
-        ) {
-          iele.quotationProductBomList = iele.quotationProductBomList
-            .filter((x) => x.type == 2)
-            .map((x) => ({
-              ...x,
-              materialName: x.productName,
-              materialCode: x.productCode,
-            }));
-        }
+        // if (
+        //   iele.quotationProductBomList &&
+        //   iele.quotationProductBomList.length > 0
+        // ) {
+        //   iele.quotationProductBomList = iele.quotationProductBomList
+        //     .filter((x) => x.type == 2)
+        //     .map((x) => ({
+        //       ...x,
+        //       materialName: x.productName,
+        //       materialCode: x.productCode,
+        //     }));
+        // }
         if (
           iele.quotationProductCustomInfoList &&
           iele.quotationProductCustomInfoList.length > 0
@@ -1032,6 +1034,18 @@ const getAllData = (businessId) => {
           }
         }
       }
+      if (route.query && route.query.arr) {
+        let arr = JSON.parse(route.query.arr);
+        for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+          const iele = formData.data.quotationProductList[i];
+          for (let j = 0; j < arr.length; j++) {
+            const jele = arr[j];
+            if (iele.id == jele.id) {
+              iele.price = jele.price;
+            }
+          }
+        }
+      }
     }
 
     isShowYiJia.value = false;
@@ -1061,6 +1075,9 @@ onMounted(() => {
   if (route.query && route.query.businessId && route.query.processType) {
     let businessId = route.query.businessId;
     getAllData(businessId);
+  } else if (route.query && route.query.businessId) {
+    let businessId = route.query.businessId;
+    getAllData(businessId);
   }
 });
 

+ 8 - 5
src/components/process/SF/EducationSubsidy.vue

@@ -81,7 +81,7 @@ const formConfig = computed(() => {
       type: "treeSelect",
       prop: "companyId",
       label: "所属公司",
-      data: proxy.useUserStore().allDict["tree_company_data"],
+      data: proxy.useUserStore().allDict["tree_all_company_data"],
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
       itemWidth: 50,
@@ -141,14 +141,17 @@ const rules = ref({
     { required: true, message: "请上传学历证明附件", trigger: "change" },
   ],
 });
-
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
 const getDeptData = () => {
   proxy
-    .get("/tenantUser/list", {
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
       tenantId: proxy.useUserStore().user.tenantId,
-      companyId: proxy.useUserStore().user.companyId,
+      // companyId: proxy.useUserStore().user.companyId,
     })
     .then((res) => {
       userList.value = res.rows.map((item) => {
@@ -164,7 +167,7 @@ const getDeptData = () => {
       pageNum: 1,
       pageSize: 9999,
       keyword: "",
-      ancestors: proxy.useUserStore().user.companyId,
+      // ancestors: proxy.useUserStore().user.companyId,
       tenantId: proxy.useUserStore().user.tenantId,
       // type: 2,
     })

+ 21 - 5
src/components/process/SF/EncodingCombination.vue

@@ -81,7 +81,7 @@ const formConfig = computed(() => {
       type: "treeSelect",
       prop: "companyId",
       label: "所属公司",
-      data: proxy.useUserStore().allDict["tree_company_data"],
+      data: proxy.useUserStore().allDict["tree_all_company_data"],
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
       itemWidth: 50,
@@ -124,14 +124,17 @@ const rules = ref({
   educationId: [{ required: true, message: "请选择学历", trigger: "change" }],
   // fileList: [{ required: true, message: "请上传申请附件", trigger: "change" }],
 });
-
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
 const getDeptData = () => {
   proxy
-    .get("/tenantUser/list", {
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
       tenantId: proxy.useUserStore().user.tenantId,
-      companyId: proxy.useUserStore().user.companyId,
+      // companyId: proxy.useUserStore().user.companyId,
     })
     .then((res) => {
       userList.value = res.rows.map((item) => {
@@ -147,7 +150,7 @@ const getDeptData = () => {
       pageNum: 1,
       pageSize: 9999,
       keyword: "",
-      ancestors: proxy.useUserStore().user.companyId,
+      // ancestors: proxy.useUserStore().user.companyId,
       tenantId: proxy.useUserStore().user.tenantId,
       // type: 2,
     })
@@ -232,6 +235,19 @@ onMounted(() => {
   if (route.query.businessId) {
     getAllData(route.query.businessId);
   }
+  // 删除莫名多出的一个textarea
+  nextTick(() => {
+    setTimeout(() => {
+      let dom = document.getElementsByTagName("textarea");
+      if (dom && dom.length > 0) {
+        for (let i = 0; i < dom.length; i++) {
+          if (!dom[i].className) {
+            dom[i].style.display = "none";
+          }
+        }
+      }
+    }, 100);
+  });
 });
 </script>
 

+ 375 - 0
src/components/process/SF/InvoiceTaxDeduction.vue

@@ -0,0 +1,375 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+      <template #detail>
+        <div style="width:100%">
+          <el-button type="primary" @click="handleAdd()" plain style="margin-bottom: 16px" v-if="!judgeStatus()">添加</el-button>
+          <el-table :data="formData.data.invoiceTaxDeductionDetailsList" style="width: 100%;">
+            <el-table-column label="发票附件(电子发票需上传PDF或OFD格式)">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'invoiceTaxDeductionDetailsList.' + $index + '.fileList'" :rules="rules.fileList" :inline-message="true"
+                              class="margin-b-0">
+                  <el-upload :file-list="row.fileList" :action="uploadUrl" :data="row.uploadData" :limit="1" :list-type="'text'"
+                             :before-upload="(file)=>handleBeforeUploadOne(file,$index,'fileList')"
+                             :on-success="()=>handleSuccessOne($index,'fileList')" :on-remove="(file)=>handleRemoveFile(file,$index,'fileList')"
+                             :on-preview="onPreviewFile" :on-exceed="()=>msgTip(`上传文件数量不可大于1`, 2)">
+                    <el-button type="primary" plain>上传</el-button>
+                  </el-upload>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column label="金额" width="130">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-form-item :prop="'invoiceTaxDeductionDetailsList.' + $index + '.amount'" :rules="rules.amount" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.amount" placeholder="请输入" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" @change="handleChangeAmount" />
+                  </el-form-item>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
+              <template #default="{ $index }">
+                <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </template>
+    </byForm>
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import { useRoute } from "vue-router";
+const { proxy } = getCurrentInstance();
+const route = useRoute();
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const selectData = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
+
+const formData = reactive({
+  data: {
+    fileList: [],
+    invoiceTaxDeductionDetailsList: [],
+  },
+});
+const formDom = ref(null);
+const judgeStatus = () => {
+  if (route.query.processType == 20 || route.query.processType == 10) {
+    return true;
+  }
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
+const formOption = reactive({
+  inline: true,
+  labelWidth: 120,
+  itemWidth: 100,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title",
+      title: "基本信息",
+      haveLine: false,
+    },
+    {
+      type: "input",
+      prop: "code",
+      label: "流水号",
+      placeholder: " ",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "select",
+      prop: "createUser",
+      label: "提交人",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "date",
+      prop: "applyTime",
+      itemType: "date",
+      label: "提交日期",
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "amount",
+      label: "抵扣金额汇总",
+      precision: 2,
+      min: 0,
+      controls: false,
+      disabled: true,
+      itemWidth: 50,
+    },
+    {
+      type: "date",
+      prop: "deductionSalaryMonth",
+      itemType: "month",
+      label: "抵扣工资月份",
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "title",
+      title: "抵扣明细",
+      haveLine: false,
+    },
+    {
+      type: "slot",
+      slotName: "detail",
+      prop: "",
+      label: "",
+    },
+  ];
+});
+
+const rules = ref({
+  applyTime: [{ required: true, message: "请选择提交日期", trigger: "change" }],
+  companyId: [{ required: true, message: "请选择所属公司", trigger: "change" }],
+  deptId: [{ required: true, message: "请选择所属部门", trigger: "change" }],
+  createUser: [{ required: true, message: "请选择提交人", trigger: "change" }],
+  deductionSalaryMonth: [
+    { required: true, message: "请选择抵扣工资月份", trigger: "change" },
+  ],
+  amount: [{ required: true, message: "请输入金额", trigger: "blur" }],
+  fileList: [{ required: true, message: "请上传发票附件", trigger: "change" }],
+  // remark: [{ required: true, message: "请输入摘要", trigger: "blur" }],
+});
+
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
+const getDeptData = () => {
+  proxy
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  // proxy
+  //   .get("/tenantDept/list", {
+  //     pageNum: 1,
+  //     pageSize: 9999,
+  //     keyword: "",
+  //     // ancestors: proxy.useUserStore().user.companyId,
+  //     tenantId: proxy.useUserStore().user.tenantId,
+  //     // type: 2,
+  //   })
+  //   .then((res) => {
+  //     deptData.value = proxy.handleTree(res.data, "deptId");
+  //   });
+};
+getDeptData();
+
+const getDict = () => {
+  proxy
+    .post("/educationConfig/page", {
+      pageNum: 1,
+      pageSize: 999,
+    })
+    .then((res) => {
+      selectData.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+    });
+};
+// getDict();
+
+const handleAdd = () => {
+  formData.data.invoiceTaxDeductionDetailsList.push({
+    fileList: [],
+    amount: null,
+    uploadData: {},
+  });
+};
+
+const handleRemove = (index) => {
+  formData.data.invoiceTaxDeductionDetailsList.splice(index, 1);
+};
+
+const handleChangeAmount = () => {
+  let money = 0;
+  if (
+    formData.data.invoiceTaxDeductionDetailsList &&
+    formData.data.invoiceTaxDeductionDetailsList.length > 0
+  ) {
+    for (
+      let i = 0;
+      i < formData.data.invoiceTaxDeductionDetailsList.length;
+      i++
+    ) {
+      if (formData.data.invoiceTaxDeductionDetailsList[i].amount) {
+        money = parseFloat(
+          Number(money) +
+            Number(formData.data.invoiceTaxDeductionDetailsList[i].amount)
+        ).toFixed(2);
+      }
+    }
+  }
+  formData.data.amount = money;
+};
+
+const handleBeforeUploadOne = async (file, index) => {
+  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
+  file.id = res.id;
+  file.fileUrl = res.fileUrl;
+  formData.data.invoiceTaxDeductionDetailsList[index].uploadData =
+    res.uploadBody;
+  formData.data.invoiceTaxDeductionDetailsList[index].fileData = res;
+  return true;
+};
+
+const handleSuccessOne = (index, att) => {
+  if (
+    formData.data.invoiceTaxDeductionDetailsList[index].fileData &&
+    formData.data.invoiceTaxDeductionDetailsList[index].fileData.fileUrl
+  ) {
+    let file = formData.data.invoiceTaxDeductionDetailsList[index].fileData;
+    formData.data.invoiceTaxDeductionDetailsList[index][att].push({
+      id: file.id,
+      fileName: file.fileName,
+      name: file.fileName,
+      url: file.fileUrl,
+      fileUrl: file.fileUrl,
+    });
+    formData.data.invoiceTaxDeductionDetailsList[index].fileData = {};
+  }
+};
+
+const handleRemoveFile = (file, index, att) => {
+  let sonIndex = formData.data.invoiceTaxDeductionDetailsList[index][
+    att
+  ].findIndex((x) => x.id == file.id || x.id == file.raw.id);
+  if (sonIndex > -1) {
+    formData.data.invoiceTaxDeductionDetailsList[index][att].splice(
+      sonIndex,
+      1
+    );
+  }
+};
+
+const onPreviewFile = (file) => {
+  if (file && file.fileUrl) {
+    window.open(file.fileUrl, "_blank");
+  } else {
+    window.open(file.raw.fileUrl, "_blank");
+  }
+};
+
+const handleSubmit = async (isStag = false) => {
+  if (isStag) {
+    return true;
+  }
+  let flag = await formDom.value.handleSubmit(() => {});
+  if (flag) {
+    if (
+      !(
+        formData.data.invoiceTaxDeductionDetailsList &&
+        formData.data.invoiceTaxDeductionDetailsList.length > 0
+      )
+    ) {
+      proxy.msgTip("请添加抵扣明细", 2);
+      return false;
+    }
+    return true;
+  } else {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView();
+    }, 0);
+  }
+  return flag;
+};
+
+const getFormData = () => {
+  return proxy.deepClone(formData.data);
+};
+// 向父组件暴露
+defineExpose({
+  getFormData,
+  handleSubmit,
+});
+
+const getAllData = (businessId) => {
+  if (businessId) {
+    proxy
+      .post("/invoiceTaxDeduction/detail", { id: businessId })
+      .then((res) => {
+        res.invoiceTaxDeductionDetailsList.map((x) => (x.fileList = []));
+        formData.data = res;
+        let ids = formData.data.invoiceTaxDeductionDetailsList.map((x) => x.id);
+        proxy.getFileData({
+          businessIdList: ids,
+          data: formData.data.invoiceTaxDeductionDetailsList,
+          att: "id",
+          businessType: "0",
+          fileAtt: "fileList",
+          filePathAtt: "fileUrl",
+        });
+      });
+  }
+};
+
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  formData.data.applyTime = proxy.parseTime(new Date());
+  formData.data.companyId = proxy.useUserStore().user.companyId;
+  formData.data.deptId = proxy.useUserStore().user.dept.deptId;
+  formData.data.createUser = proxy.useUserStore().user.userId;
+  if (route.query.businessId) {
+    getAllData(route.query.businessId);
+  }
+  // 删除莫名多出的一个textarea
+  nextTick(() => {
+    setTimeout(() => {
+      let dom = document.getElementsByTagName("textarea");
+      if (dom && dom.length > 0) {
+        for (let i = 0; i < dom.length; i++) {
+          if (!dom[i].className) {
+            dom[i].style.display = "none";
+          }
+        }
+      }
+    }, 100);
+  });
+});
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 21 - 5
src/components/process/SF/MedicalAndsocialSecurity.vue

@@ -82,7 +82,7 @@ const formConfig = computed(() => {
       type: "treeSelect",
       prop: "companyId",
       label: "所属公司",
-      data: proxy.useUserStore().allDict["tree_company_data"],
+      data: proxy.useUserStore().allDict["tree_all_company_data"],
       propsTreeLabel: "deptName",
       propsTreeValue: "deptId",
       itemWidth: 50,
@@ -175,14 +175,17 @@ const rules = ref({
     { required: true, message: "请上传学历证明附件", trigger: "change" },
   ],
 });
-
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
 const getDeptData = () => {
   proxy
-    .get("/tenantUser/list", {
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
       tenantId: proxy.useUserStore().user.tenantId,
-      companyId: proxy.useUserStore().user.companyId,
+      // companyId: proxy.useUserStore().user.companyId,
     })
     .then((res) => {
       userList.value = res.rows.map((item) => {
@@ -198,7 +201,7 @@ const getDeptData = () => {
       pageNum: 1,
       pageSize: 9999,
       keyword: "",
-      ancestors: proxy.useUserStore().user.companyId,
+      // ancestors: proxy.useUserStore().user.companyId,
       tenantId: proxy.useUserStore().user.tenantId,
       // type: 2,
     })
@@ -273,6 +276,19 @@ onMounted(() => {
   if (route.query.businessId) {
     getAllData(route.query.businessId);
   }
+  // 删除莫名多出的一个textarea
+  nextTick(() => {
+    setTimeout(() => {
+      let dom = document.getElementsByTagName("textarea");
+      if (dom && dom.length > 0) {
+        for (let i = 0; i < dom.length; i++) {
+          if (!dom[i].className) {
+            dom[i].style.display = "none";
+          }
+        }
+      }
+    }, 100);
+  });
 });
 </script>
 

+ 288 - 0
src/components/process/SF/PersonalInvoice.vue

@@ -0,0 +1,288 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+    </byForm>
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+import { useRoute } from "vue-router";
+const { proxy } = getCurrentInstance();
+const route = useRoute();
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const selectData = ref([]);
+const userList = ref([]);
+const deptData = ref([]);
+
+const formData = reactive({
+  data: {
+    fileList: [],
+  },
+});
+const formDom = ref(null);
+const judgeStatus = () => {
+  if (route.query.processType == 20 || route.query.processType == 10) {
+    return true;
+  }
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
+const formOption = reactive({
+  inline: true,
+  labelWidth: 120,
+  itemWidth: 100,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title",
+      title: "基本信息",
+      haveLine: false,
+    },
+    {
+      type: "input",
+      prop: "code",
+      label: "流水号",
+      placeholder: " ",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "select",
+      prop: "createUser",
+      label: "提交人",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "date",
+      prop: "applyTime",
+      itemType: "date",
+      label: "提交日期",
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "amount",
+      label: "发票金额",
+      precision: 2,
+      min: 0,
+      controls: false,
+      itemWidth: 50,
+    },
+    //  {
+    //   type: "input",
+    //   prop: "amount",
+    //   itemType: "text",
+    //   label: "发票金额",
+    //   itemWidth: 50,
+    //   disabled: false,
+    // },
+    // {
+    //   type: "treeSelect",
+    //   prop: "companyId",
+    //   label: "所属公司",
+    //   data: proxy.useUserStore().allDict["tree_all_company_data"],
+    //   propsTreeLabel: "deptName",
+    //   propsTreeValue: "deptId",
+    //   itemWidth: 50,
+    //   fn: (val) => {},
+    //   disabled: true,
+    // },
+    // {
+    //   type: "treeSelect",
+    //   prop: "deptId",
+    //   label: "所属部门",
+    //   data: deptData.value,
+    //   propsTreeLabel: "deptName",
+    //   propsTreeValue: "deptId",
+    //   itemWidth: 50,
+    //   disabled: true,
+    // },
+    // {
+    //   type: "select",
+    //   prop: "educationId",
+    //   label: "学历",
+    //   filterable: true,
+    //   multiple: false,
+    //   data: selectData.value,
+    //   itemWidth: 50,
+    //   fn: (val) => {
+    //     let current = selectData.value.find((x) => x.value == val);
+    //     if (current) {
+    //       formData.data.amount = current.amount;
+    //     }
+    //   },
+    // },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "fileList",
+      label: "发票附件",
+    },
+    {
+      type: "input",
+      prop: "remark",
+      itemType: "textarea",
+      label: "摘要",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+
+const rules = ref({
+  applyTime: [{ required: true, message: "请选择提交日期", trigger: "change" }],
+  companyId: [{ required: true, message: "请选择所属公司", trigger: "change" }],
+  deptId: [{ required: true, message: "请选择所属部门", trigger: "change" }],
+  createUser: [{ required: true, message: "请选择提交人", trigger: "change" }],
+  amount: [{ required: true, message: "请输入发票金额", trigger: "blur" }],
+  fileList: [{ required: true, message: "请上传发票附件", trigger: "change" }],
+  // remark: [{ required: true, message: "请输入摘要", trigger: "blur" }],
+});
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
+const getDeptData = () => {
+  proxy
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      // ancestors: proxy.useUserStore().user.companyId,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDeptData();
+
+const getDict = () => {
+  proxy
+    .post("/educationConfig/page", {
+      pageNum: 1,
+      pageSize: 999,
+    })
+    .then((res) => {
+      selectData.value = res.rows.map((x) => ({
+        ...x,
+        label: x.name,
+        value: x.id,
+      }));
+    });
+};
+getDict();
+
+const handleSubmit = async (isStag = false) => {
+  if (isStag) {
+    return true;
+  }
+  let flag = await formDom.value.handleSubmit(() => {});
+  if (flag) {
+    return true;
+  } else {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView();
+    }, 0);
+  }
+  return flag;
+};
+
+const getFormData = () => {
+  return proxy.deepClone(formData.data);
+};
+// 向父组件暴露
+defineExpose({
+  getFormData,
+  handleSubmit,
+});
+
+const getAllData = (businessId) => {
+  if (businessId) {
+    proxy.post("/personalInvoice/detail", { id: businessId }).then((res) => {
+      formData.data = res;
+      proxy
+        .post("/fileInfo/getList", { businessIdList: [businessId] })
+        .then((fileObj) => {
+          if (fileObj[businessId] && fileObj[businessId].length > 0) {
+            formData.data.fileList = fileObj[businessId]
+              .filter((x) => x.businessType == "0")
+              .map((item) => {
+                return {
+                  ...item,
+                  name: item.fileName,
+                  url: item.fileUrl,
+                };
+              });
+          } else {
+            formData.data.fileList = [];
+          }
+        });
+    });
+  }
+};
+
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  formData.data.applyTime = proxy.parseTime(new Date());
+  formData.data.companyId = proxy.useUserStore().user.companyId;
+  formData.data.deptId = proxy.useUserStore().user.dept.deptId;
+  formData.data.createUser = proxy.useUserStore().user.userId;
+  if (route.query.businessId) {
+    getAllData(route.query.businessId);
+  }
+  // 删除莫名多出的一个textarea
+  nextTick(() => {
+    setTimeout(() => {
+      let dom = document.getElementsByTagName("textarea");
+      if (dom && dom.length > 0) {
+        for (let i = 0; i < dom.length; i++) {
+          if (!dom[i].className) {
+            dom[i].style.display = "none";
+          }
+        }
+      }
+    }, 100);
+  });
+});
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 6 - 3
src/components/process/SF/Subscribe.vue

@@ -427,14 +427,17 @@ const changeSupplier = (val) => {
   });
   changeSupplierPrice(val);
 };
-
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
 const getDeptData = (val) => {
   proxy
-    .get("/tenantUser/list", {
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
       tenantId: proxy.useUserStore().user.tenantId,
-      companyId: val,
+      // companyId: val,
     })
     .then((res) => {
       userList.value = res.rows.map((item) => {

+ 6 - 3
src/components/process/SF/UseSeal.vue

@@ -263,14 +263,17 @@ const rules = ref({
     { required: true, message: "请选择销售订单", trigger: "blur" },
   ],
 });
-
+const isFormDetail = ref(false);
+if (route.query && route.query.processType && route.query.processType == 20) {
+  isFormDetail.value = true;
+}
 const getDeptData = () => {
   proxy
-    .get("/tenantUser/list", {
+    .get(isFormDetail.value ? "/tenantUser/listAll" : "/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
       tenantId: proxy.useUserStore().user.tenantId,
-      companyId: proxy.useUserStore().user.companyId,
+      // companyId: proxy.useUserStore().user.companyId,
     })
     .then((res) => {
       userList.value = res.rows.map((item) => {

+ 1 - 1
src/components/product/SelectCompanyProduct.vue

@@ -336,7 +336,7 @@ const formConfig = computed(() => {
       type: "selectInput",
       prop: "price",
       selectProp: "currency",
-      label: "销售业务成本单价",
+      label: "销售业务供货价",
       itemWidth: 50,
       style: {
         width: "100%",

+ 2 - 2
src/components/product/SelectCustomerProduct.vue

@@ -221,7 +221,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "销售业务成本单价",
+        label: "销售业务供货价",
         slot: "price",
         width: 150,
       },
@@ -339,7 +339,7 @@ const formConfig = computed(() => {
       type: "selectInput",
       prop: "price",
       selectProp: "currency",
-      label: "销售业务成本单价",
+      label: "销售业务供货价",
       itemWidth: 50,
       style: {
         width: "100%",

+ 1 - 1
src/components/product/SelectProduct.vue

@@ -371,7 +371,7 @@ const formConfig = computed(() => {
       type: "selectInput",
       prop: "price",
       selectProp: "currency",
-      label: "销售业务成本单价",
+      label: "销售业务供货价",
       itemWidth: 50,
       style: {
         width: "100%",

+ 12 - 0
src/layout/index.vue

@@ -85,6 +85,18 @@ const getAllDict = () => {
             "deptId"
           );
         });
+      proxy
+        .get("/tenantDept/list", {
+          pageNum: 1,
+          pageSize: 9999,
+          keyword: "",
+          tenantId: proxy.useUserStore().user.tenantId,
+          type: 0,
+        })
+        .then((res) => {
+          proxy.useUserStore().allDict["tree_all_company_data"] =
+            proxy.handleTree(res.data, "deptId");
+        });
     })
     .catch(() => {});
 };

+ 15 - 3
src/utils/util.js

@@ -24,7 +24,11 @@ export function getFile(businessIdList, dataSource, att = 'id', fileAtt = 'fileL
         const ele = dataSource[i];
         for (const key in res) {
           if (ele[att] == key && res[key] && res[key].length > 0) {
-            ele[fileAtt] = res[key]
+            ele[fileAtt] = res[key].map((x) => ({
+              ...x,
+              name: x.fileName,
+              url: x.fileUrl
+            }))
             if (filePathAtt) {
               ele[filePathAtt] = res[key][0].fileUrl
             }
@@ -67,9 +71,17 @@ export function getFileData(option = {}) {
                 if (ele[att] == key && res[key] && res[key].length > 0) {
                   let list = []
                   if (businessType) {
-                    list = res[key].filter((x) => x.businessType == businessType)
+                    list = res[key].filter((x) => x.businessType == businessType).map((x) => ({
+                      ...x,
+                      name: x.fileName,
+                      url: x.fileUrl
+                    }))
                   } else {
-                    list = res[key]
+                    list = res[key].map((x) => ({
+                      ...x,
+                      name: x.fileName,
+                      url: x.fileUrl
+                    }))
                   }
                   ele[fileAtt] = list
                   if (filePathAtt) {

+ 63 - 30
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -888,36 +888,7 @@ const formConfig = computed(() => {
       itemWidth: 50,
       disabled: false,
     },
-    {
-      type: "number",
-      prop: "price",
-      label: "销售价",
-      precision: 2,
-      min: 0.01,
-      controls: false,
-      itemWidth: 50,
-      disabled: false,
-    },
-    {
-      type: "number",
-      prop: "factoryPrice",
-      label: "出⼚单价",
-      precision: 2,
-      min: 0.01,
-      controls: false,
-      itemWidth: 50,
-      disabled: false,
-    },
-    {
-      type: "number",
-      prop: "flatPrice",
-      label: "平铺价",
-      precision: 2,
-      min: 0.01,
-      controls: false,
-      itemWidth: 50,
-      disabled: false,
-    },
+
     {
       type: "select",
       prop: "frontalTexture",
@@ -1011,6 +982,50 @@ const formConfig = computed(() => {
     // },
     {
       type: "title1",
+      title: "单价",
+    },
+    {
+      type: "number",
+      prop: "price",
+      label: "销售价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "factoryPrice",
+      label: "工厂供货价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "flatPrice",
+      label: "平铺价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "businessCostPrice",
+      label: "业务供货价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "title1",
       title: "BOM",
     },
     // {
@@ -1267,6 +1282,23 @@ const submitForm = () => {
       return proxy.msgTip("请上传生产plt文件", 2);
     }
 
+    if (
+      !(
+        formData.data.productBomDetailList &&
+        formData.data.productBomDetailList.length > 0
+      )
+    ) {
+      return proxy.msgTip("请添加BOM", 2);
+    } else {
+      let type1 = null;
+      let type3 = null;
+      type1 = formData.data.productBomDetailList.find((x) => x.type == 1);
+      type3 = formData.data.productBomDetailList.find((x) => x.type == 3);
+      if (!(type1 && type3)) {
+        return proxy.msgTip("未选择主材和工艺", 2);
+      }
+    }
+
     let checkNum = 0;
     for (let i = 0; i < formData.data.productCustomInfoList.length; i++) {
       const ele = formData.data.productCustomInfoList[i];
@@ -1795,6 +1827,7 @@ const selectTechnology = (row) => {
     row.processRouteList &&
     row.processRouteList.length > 0
   ) {
+    formData.data.technologyId = row.id;
     formData.data.productBomDetailList =
       formData.data.productBomDetailList.filter((x) => x.type != 3);
     let index = formData.data.productBomDetailList.findIndex(

+ 2 - 2
src/views/EHSD/productLibrary/customerProduct/index.vue

@@ -222,7 +222,7 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "销售业务成本单价",
+        label: "销售业务供货价",
         slot: "price",
         width: 150,
       },
@@ -386,7 +386,7 @@ const formConfig = computed(() => {
       type: "selectInput",
       prop: "price",
       selectProp: "currency",
-      label: "销售业务成本单价",
+      label: "销售业务供货价",
       itemWidth: 50,
       style: {
         width: "100%",

+ 80 - 33
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -726,36 +726,7 @@ const formConfig = computed(() => {
       itemWidth: 50,
       disabled: false,
     },
-    {
-      type: "number",
-      prop: "price",
-      label: "销售价",
-      precision: 2,
-      min: 0.01,
-      controls: false,
-      itemWidth: 50,
-      disabled: false,
-    },
-    {
-      type: "number",
-      prop: "factoryPrice",
-      label: "出⼚单价",
-      precision: 2,
-      min: 0.01,
-      controls: false,
-      itemWidth: 50,
-      disabled: false,
-    },
-    {
-      type: "number",
-      prop: "flatPrice",
-      label: "平铺价",
-      precision: 2,
-      min: 0.01,
-      controls: false,
-      itemWidth: 50,
-      disabled: false,
-    },
+
     {
       type: "select",
       prop: "frontalTexture",
@@ -841,6 +812,50 @@ const formConfig = computed(() => {
       prop: "prodFileList",
       label: "生产plt文件",
     },
+    {
+      type: "title1",
+      title: "单价",
+    },
+    {
+      type: "number",
+      prop: "price",
+      label: "销售价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "factoryPrice",
+      label: "工厂供货价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "flatPrice",
+      label: "平铺价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "number",
+      prop: "businessCostPrice",
+      label: "业务供货价",
+      precision: 2,
+      min: 0.01,
+      controls: false,
+      itemWidth: 50,
+      disabled: false,
+    },
     // {
     //   type: "slot",
     //   slotName: "productionFile",
@@ -1099,6 +1114,23 @@ const submitForm = () => {
       return proxy.msgTip("请上传生产plt文件", 2);
     }
 
+    if (
+      !(
+        formData.data.productBomDetailList &&
+        formData.data.productBomDetailList.length > 0
+      )
+    ) {
+      return proxy.msgTip("请添加BOM", 2);
+    } else {
+      let type1 = null;
+      let type3 = null;
+      type1 = formData.data.productBomDetailList.find((x) => x.type == 1);
+      type3 = formData.data.productBomDetailList.find((x) => x.type == 3);
+      if (!(type1 && type3)) {
+        return proxy.msgTip("未选择主材和工艺", 2);
+      }
+    }
+
     let checkNum = 0;
     for (let i = 0; i < formData.data.productCustomInfoList.length; i++) {
       const ele = formData.data.productCustomInfoList[i];
@@ -1159,19 +1191,33 @@ const getDtl = (row) => {
     customCode: row.productCode,
     nameEnglish: "",
     price: row.price || null,
-    factoryPrice: row.businessCostPrice || null,
+    factoryPrice: row.prodPrice || null,
+    businessCostPrice: row.businessCostPrice || null,
     flatPrice: null,
     imageUrl: "",
     fileList: [],
     hsCode: "",
     prodFileList: [],
     prodImgPath: "",
+    technologyId: row.technologyId,
     color: row.productColor,
     length: row.productLength,
     width: row.productWidth,
     height: row.productHeight,
-    productBomDetailList:
-      row.quotationProductBomList.filter((x) => x.type == 2) || [],
+    productBomDetailList: row.quotationProductBomList.map((x) => ({
+      type: x.type,
+      materialName: x.productName,
+      materialCode: x.productCode,
+      materialLength: x.productLength,
+      materialWidth: x.productWidth,
+      materialHeight: x.productHeight,
+      materialColor: x.productColor,
+      materialId: x.materialId,
+      standardDosage: x.standardDosage,
+      lossRate: x.lossRate,
+      quantity: x.quantity,
+      remark: x.remark || "",
+    })),
     productCustomInfoList: row.quotationProductCustomInfoList || [],
     rawMaterialIdLabel: row.rawMaterialName + "," + row.rawMaterialCode,
     rawMaterialSize: `${row.rawMaterialLength}*${row.rawMaterialWidth}*${row.rawMaterialHeight}`,
@@ -1431,6 +1477,7 @@ const selectTechnology = (row) => {
     row.processRouteList &&
     row.processRouteList.length > 0
   ) {
+    formData.data.technologyId = row.id;
     formData.data.productBomDetailList =
       formData.data.productBomDetailList.filter((x) => x.type != 3);
     let index = formData.data.productBomDetailList.findIndex(

+ 1 - 1
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -164,7 +164,7 @@
                         <el-input-number v-model="product.quantity" placeholder="请输入" style="width: 100%" :precision="0" :controls="false" :min="1"
                                          onmousewheel="return false;" />
                       </el-form-item> -->
-                      单价:<span>{{product.quantity}}</span>
+                      数量:<span>{{product.quantity}}</span>
                     </el-col>
                     <el-col :span="6" style="padding-left:15px">
                       <!-- <el-form-item label="单价" class="margin-b-0" @click.stop>

+ 2 - 2
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -1036,7 +1036,7 @@ const config = computed(() => {
               }
             : {},
           // row.produceStatus == 1
-          row.status == 30
+          row.status == 30 && row.produceStatus == 1
             ? {
                 attrs: {
                   label: "终止生产",
@@ -1063,7 +1063,7 @@ const config = computed(() => {
               }
             : {},
           // && row.outboundStatus == 0 && row.produceStatus == 2
-          row.status == 30
+          row.status == 30 && row.produceStatus >= 0
             ? {
                 attrs: {
                   label: "出库申请",

+ 68 - 16
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -177,8 +177,8 @@
           <div style="width: 100%;padding-left:25px">
             <el-button type="warning" @click="clickPushProduct" plain style="margin-bottom: 16px" v-if="!isDetail"
                        :disabled="!formData.data.companyId">定制</el-button>
-            <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!isDetail"
-                       :disabled="!formData.data.companyId">选择产品库</el-button>
+            <!-- <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!isDetail"
+                       :disabled="!formData.data.companyId">选择产品库</el-button> -->
             <el-collapse v-model="activeNames">
               <el-card style="margin-bottom:15px" v-for="(product,index) in formData.data.quotationProductList" :key="index">
                 <el-collapse-item :name="index">
@@ -583,7 +583,7 @@
               <el-table-column prop="productColor" label="颜色" width="100" />
               <el-table-column label="数量" width="110" prop="quantity">
               </el-table-column>
-              <el-table-column label="业务成本单价" width="100" prop="guidePrice">
+              <el-table-column label="业务供货价" width="100" prop="guidePrice">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
                     <span class="tag-active">{{row.guidePrice}}</span>
@@ -635,7 +635,7 @@
                       </el-col>
                       <el-col :span="16" style="display:flex;justify-content:space-around">
                         <span>数量:{{product.quantity}}</span>
-                        <span> 业务成本单价:{{moneyFormat(product.businessCostPrice,2)}}</span>
+                        <span> 业务供货价:{{moneyFormat(product.businessCostPrice,2)}}</span>
                         <span> 最低价:{{moneyFormat(product.minPrice,2)}}</span>
                         <span> 最高价:{{moneyFormat(product.maxPrice,2)}}</span>
                       </el-col>
@@ -909,7 +909,7 @@
                           <span>数量:{{product.quantity}}</span>
                         </el-col>
                         <el-col :span="6">
-                          <span> 工厂出厂单价:<span v-if="product.prodPrice">{{moneyFormat(product.prodPrice,2)}}</span></span>
+                          <span> 工厂供货价:<span v-if="product.prodPrice">{{moneyFormat(product.prodPrice,2)}}</span></span>
                         </el-col>
                         <el-col :span="6">
                           <span> 小计:<span v-if="product.amount">{{moneyFormat(product.amount,2)}}</span></span>
@@ -917,12 +917,14 @@
                       </el-row>
                       <el-row style="width:100%">
                         <el-col :span="6" style="padding-left:15px;">
-                          <el-form-item label="业务成本单价" class="margin-b-0" :prop="'quotationProductList.' +index + '.businessCostPrice'"
-                                        :rules="rulesTwo.businessCostPrice" :inline-message="true" @click.stop v-if="!isDetailData">
-                            <el-input-number v-model="product.businessCostPrice" placeholder="请输入" style="width: 100%" :precision="2"
-                                             :controls="false" :min="0" onmousewheel="return false;" @change="changeQuantityOne" />
-                          </el-form-item>
-                          <span v-else> 业务成本单价:<span v-if="product.businessCostPrice">{{moneyFormat(product.businessCostPrice,2)}}</span> </span>
+                          <el-tooltip class="box-item" effect="dark" content="默认上调10%" placement="top-start" v-if="!isDetailData">
+                            <el-form-item label="业务供货价" class="margin-b-0" :prop="'quotationProductList.' +index + '.businessCostPrice'"
+                                          :rules="rulesTwo.businessCostPrice" :inline-message="true" @click.stop>
+                              <el-input-number v-model="product.businessCostPrice" placeholder="请输入" style="width: 100%" :precision="2"
+                                               :controls="false" :min="0" onmousewheel="return false;" @change="changeQuantityOne" />
+                            </el-form-item>
+                          </el-tooltip>
+                          <span v-else> 业务供货价:<span v-if="product.businessCostPrice">{{moneyFormat(product.businessCostPrice,2)}}</span> </span>
                         </el-col>
                         <el-col :span="6">
                           <el-form-item label="业务员最低报价" class="margin-b-0" :prop="'quotationProductList.' +index + '.minPrice'"
@@ -2368,7 +2370,15 @@ const handleSubmit = (type) => {
             iele.quotationProductBomList.length > 0
           )
         ) {
-          return proxy.msgTip("请添加辅材", 2);
+          return proxy.msgTip("请添加BOM", 2);
+        } else {
+          let type1 = null;
+          let type3 = null;
+          type1 = iele.quotationProductBomList.find((x) => x.type == 1);
+          type3 = iele.quotationProductBomList.find((x) => x.type == 3);
+          if (!(type1 && type3)) {
+            return proxy.msgTip("未选择主材和工艺", 2);
+          }
         }
         // iele.quotationProductBomList.push({
         //   materialId: iele.rawMaterialId,
@@ -2532,7 +2542,7 @@ const formConfigOne = computed(() => {
     },
     {
       type: "input",
-      prop: "showAmount",
+      prop: "amount",
       label: "报价总金额",
       itemWidth: 25,
       disabled: true,
@@ -2577,7 +2587,9 @@ const rulesOne = ref({
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
   // coefficient: [{ required: true, message: "请输入系数", trigger: "blur" }],
 });
+const rowData = ref({});
 const handleForeign = (row) => {
+  rowData.value = row;
   foreignDialog.value = true;
   proxy.post("/saleQuotation/detail", { id: row.id }).then((res) => {
     formData.data = res;
@@ -2726,7 +2738,46 @@ const handleSubmitOne = () => {
   });
 };
 
+const handleResult = (res) => {
+  if (
+    (res.userList == null && res.success) ||
+    (res.flowDefinitionNodeList == null && res.success)
+  ) {
+    skipPage();
+  } else if (res.userList && res.userList.length > 0) {
+    flowDefinitionNodeList.value = [];
+    dialogTitle.value = "下一处理人";
+    dialogVisible.value = true;
+    nextHandleUser.value = res.userList;
+  } else if (
+    res.flowDefinitionNodeList &&
+    res.flowDefinitionNodeList.length > 0
+  ) {
+    nextHandleUser.value = [];
+    dialogTitle.value = "退回到指定节点";
+    dialogVisible.value = true;
+    flowDefinitionNodeList.value = res.flowDefinitionNodeList;
+  } else {
+    return ElMessage({
+      message: "请联系管理员!",
+      type: "info",
+    });
+  }
+};
+
 const handleSubmitYiJia = () => {
+  foreignDialog.value = false;
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "discuss_price_flow",
+      flowName: "议价申请流程",
+      random: proxy.random(),
+      businessId: rowData.value.id,
+      arr: JSON.stringify(formData.data.quotationProductList),
+    },
+  });
+  return;
   formDomOne.value.handleSubmit(() => {
     proxy
       .msgConfirm()
@@ -3113,10 +3164,10 @@ const changeForeignQuantity = () => {
       } else {
         iele.isShowYiJia = false;
       }
-      iele.amountaa = Number(parseFloat(iele.price * iele.quantity).toFixed(2));
-      money += Number(iele.amountaa);
+      iele.amount = Number(parseFloat(iele.price * iele.quantity).toFixed(2));
+      money += Number(iele.amount);
     }
-    formData.data.showAmount = parseFloat(money).toFixed(2);
+    formData.data.amount = parseFloat(money).toFixed(2);
   }
   isShowYiJia.value = num > 0 ? true : false;
 };
@@ -3273,6 +3324,7 @@ const selectTechnology = (row) => {
     row.processRouteList &&
     row.processRouteList.length > 0
   ) {
+    formData.data.quotationProductList[indexValue.value].technologyId = row.id;
     formData.data.quotationProductList[
       indexValue.value
     ].quotationProductBomList = formData.data.quotationProductList[

+ 4 - 2
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -1693,12 +1693,14 @@ const changeTotalAmount = () => {
         ).toFixed(2);
       }
     } else if (ele.type == 2) {
-      ele.totalQuantity = ele.quantity * formData.data.quantity;
+      ele.totalQuantity = ele.quantity;
+      // ele.totalQuantity = ele.quantity * formData.data.quantity;
       amount = parseFloat(
         Number(ele.price) * Number(ele.totalQuantity)
       ).toFixed(2);
     } else if (ele.type == 3) {
-      ele.totalQuantity = formData.data.quantity;
+      ele.totalQuantity = ele.quantity;
+      // ele.totalQuantity = formData.data.quantity;
       amount = parseFloat(
         Number(ele.price) * Number(ele.totalQuantity)
       ).toFixed(2);

+ 2 - 1
src/views/MES/productionOrder/index.vue

@@ -55,7 +55,8 @@
                   <div>产品数量:{{product.quantity}}</div>
                 </div>
                 <template #reference>
-                  <el-progress type="circle" :percentage="(Number(product.finishQuantity) / Number(product.quantity))*100" width="60"
+                  <el-progress type="circle"
+                               :percentage="Number(parseFloat((Number(product.finishQuantity) / Number(product.quantity))*100).toFixed(2))" width="60"
                                :status="(Number(product.finishQuantity) / Number(product.quantity))*100 == 100 ? 'success' : ''" />
                 </template>
               </el-popover>

+ 1 - 1
src/views/dataBoard/main/productAnalysis.vue

@@ -17,7 +17,7 @@
         <el-table-column label="产品" fixed align="center">
           <el-table-column label="产品名称" prop="productName" min-width="150">
           </el-table-column>
-          <!-- <el-table-column label="销售业务成本单价" prop="expenditureAmount" width="120">
+          <!-- <el-table-column label="销售业务供货价" prop="expenditureAmount" width="120">
             <template #default="{ row }">
               <div>   {{ moneyFormat(row.expenditureAmount ,2) }}</div>
             </template>

+ 606 - 0
src/views/oa/application/activityPriceInventory/index.vue

@@ -0,0 +1,606 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :selectConfig="selectConfig" :config="config" :loading="loading"
+               highlight-current-row :action-list="[
+          {
+            text: '添加',
+            action: () => openModal('add'),
+          },
+        ]" @get-list="getList">
+
+        <template #code="{item}">
+          <div style="width:100%">
+            <span class="el-click" @click="getDtl(item)">{{item.code}}</span>
+          </div>
+        </template>
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '归还' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="500">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" 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 moment from "moment";
+// import $bus from "@/bus/index.js";
+import useRefreshTableData from "@/hooks/refreshTableData";
+
+const { proxy } = getCurrentInstance();
+const sealType = computed(() => proxy.useUserStore().allDict["seal_type"]);
+const sealCategory = computed(
+  () => proxy.useUserStore().allDict["seal_category"]
+);
+const isData = ref([
+  {
+    label: "是",
+    value: 1,
+  },
+  {
+    label: "否",
+    value: 0,
+  },
+]);
+const userList = ref([]);
+const deptData = ref([]);
+const typeData = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const loading = ref(false);
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+]);
+const isReturnedData = ref([
+  {
+    label: "是",
+    value: 1,
+  },
+  {
+    label: "否",
+    value: 0,
+  },
+]);
+
+const useMethodData = ref([
+  {
+    dictValue: "借章",
+    dictKey: "1",
+  },
+  {
+    dictValue: "盖章",
+    dictKey: "2",
+  },
+]);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "审批状态",
+      prop: "status",
+      data: statusData.value,
+    },
+    // {
+    //   label: "使用方式",
+    //   prop: "useMethod",
+    //   data: useMethodData.value,
+    // },
+    // {
+    //   label: "印章类型",
+    //   prop: "sealType",
+    //   data: sealType.value,
+    // },
+    // {
+    //   label: "盖章类别",
+    //   prop: "stampedType",
+    //   data: sealCategory.value,
+    // },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "流水号",
+        slot: "code",
+        width: 130,
+        fixed: "left",
+      },
+    },
+    {
+      attrs: {
+        label: "申请人",
+        prop: "createUserName",
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "申请日期",
+        prop: "applyTime",
+        width: 100,
+      },
+    },
+
+    {
+      attrs: {
+        label: "店铺名称",
+        prop: "shopName",
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "店铺平台",
+        prop: "shopPlatform",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "店铺品牌",
+        prop: "shopBrand",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "是否平台活动",
+        prop: "isPlatformActivity",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, isData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "是否产品支持",
+        prop: "isProductSupport",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, isData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "是否库存支持",
+        prop: "isInventorySupport",
+        width: 110,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, isData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "活动名称",
+        prop: "activityName",
+        width: 150,
+      },
+    },
+    {
+      attrs: {
+        label: "活动天数",
+        prop: "activityDays",
+        width: 90,
+      },
+    },
+    {
+      attrs: {
+        label: "活动开始时间",
+        prop: "activityStartTime",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "活动结束时间",
+        prop: "activityEndTime",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "产品支持方",
+        prop: "supporterName",
+        width: 100,
+      },
+    },
+    {
+      attrs: {
+        label: "产品支持周期",
+        prop: "supportCycle",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
+        label: "产品支持开始时间",
+        prop: "supporterStartTime",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "产品支持结束时间",
+        prop: "supporterEndTime",
+        width: 140,
+      },
+    },
+    {
+      attrs: {
+        label: "是否提报总经理",
+        prop: "isReportGm",
+        width: 130,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, isData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "是否新品",
+        prop: "isNewProduct",
+        width: 90,
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, isData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "审批状态",
+        prop: "status",
+        width: 100,
+        fixed: "right",
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, statusData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return row.createUser == proxy.useUserStore().user.userId
+          ? [
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "修改",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickUpdate(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "删除",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/activityPriceInventory/delete", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 10 || row.status == 30
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/activityPriceInventory/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+            ]
+          : [];
+      },
+    },
+  ];
+});
+const corporationList = ref([]);
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/activityPriceInventory/page", sourceList.value.pagination).then(
+    (res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    },
+    (err) => {
+      loading.value = false;
+    }
+  );
+};
+getList();
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: proxy.useUserStore().user.companyId,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDeptData();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "date",
+      prop: "realityReturnedTime",
+      itemType: "date",
+      label: "归还日期",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  realityReturnedTime: [
+    { required: true, message: "请选择归还日期", trigger: "change" },
+  ],
+});
+const formData = reactive({
+  data: {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  },
+});
+const openModal = (val) => {
+  // modalType.value = val;
+  // formData.data = {
+  //   accountRemainderList: [{ currency: "", remainder: undefined }],
+  // };
+  // loadingDialog.value = false;
+  // dialogVisible.value = true;
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "activity_price_inventory_flow",
+      flowName: "活动、价格、库存申请发起流程",
+      random: proxy.random(),
+    },
+  });
+};
+const clickBalance = () => {
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
+  } else {
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.accountRemainderList.splice(index, 1);
+};
+const isRepeat = (arr) => {
+  var hash = {};
+  for (var i in arr) {
+    if (hash[arr[i].currency]) return true;
+    hash[arr[i].currency] = true;
+  }
+  return false;
+};
+
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/activityPriceInventory/returned", formData.data).then(
+      () => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        loadingDialog.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+    // if (
+    //   formData.data.accountRemainderList &&
+    //   formData.data.accountRemainderList.length > 0
+    // ) {
+    //   if (isRepeat(formData.data.accountRemainderList)) {
+    //     return ElMessage("请勿重复添加货币余额");
+    //   } else {
+    //     loadingDialog.value = true;
+    //     proxy.post("/accountManagement/" + modalType.value, formData.data).then(
+    //       () => {
+    //         ElMessage({
+    //           message: modalType.value == "add" ? "添加成功" : "编辑成功",
+    //           type: "success",
+    //         });
+    //         dialogVisible.value = false;
+    //         getList();
+    //       },
+    //       (err) => {
+    //         console.log(err);
+    //         loadingDialog.value = false;
+    //       }
+    //     );
+    //   }
+    // } else {
+    //   return ElMessage("请添加至少一条类型余额");
+    // }
+  });
+};
+
+const update = (row) => {
+  loadingDialog.value = false;
+  modalType.value = "edit";
+  formData.data = proxy.deepClone(row);
+  dialogVisible.value = true;
+};
+
+const clickUpdate = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "activity_price_inventory_flow",
+      flowName: "活动、价格、库存申请发起流程",
+      random: proxy.random(),
+      businessId: row.id,
+    },
+  });
+};
+
+const getDtl = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "activity_price_inventory_flow",
+      flowName: "活动、价格、库存申请流程查看",
+      random: proxy.random(),
+      businessId: row.id,
+      processType: 20,
+    },
+  });
+};
+
+const handleReturn = (row) => {
+  modalType.value = "add";
+  formData.data = {
+    id: row.id,
+    realityReturnedTime: moment().format("YYYY-HH-MM"),
+  };
+  dialogVisible.value = true;
+};
+
+useRefreshTableData(getList);
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 63 - 61
src/views/oa/application/educationSubsidy/index.vue

@@ -165,71 +165,73 @@ const config = computed(() => {
         align: "center",
       },
       renderHTML(row) {
-        return [
-          row.status == 0
-            ? {
-                attrs: {
-                  label: "修改",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  clickUpdate(row);
-                },
-              }
-            : {},
-          row.status == 0
-            ? {
-                attrs: {
-                  label: "删除",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
+        return row.createUser == proxy.useUserStore().user.userId
+          ? [
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "修改",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickUpdate(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "删除",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
                       proxy
-                        .post("/educationSubsidy/delete", {
-                          id: row.id,
-                        })
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-          row.status == 10 || row.status == 30
-            ? {
-                attrs: {
-                  label: "作废",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
-                      proxy
-                        .post("/educationSubsidy/cancellation", {
-                          id: row.id,
+                          proxy
+                            .post("/educationSubsidy/delete", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
                         })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 10 || row.status == 30
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-        ];
+                          proxy
+                            .post("/educationSubsidy/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+            ]
+          : [];
       },
     },
   ];

+ 63 - 61
src/views/oa/application/encodingCombination/index.vue

@@ -163,71 +163,73 @@ const config = computed(() => {
         align: "center",
       },
       renderHTML(row) {
-        return [
-          row.status == 0
-            ? {
-                attrs: {
-                  label: "修改",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  clickUpdate(row);
-                },
-              }
-            : {},
-          row.status == 0
-            ? {
-                attrs: {
-                  label: "删除",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
+        return row.createUser == proxy.useUserStore().user.userId
+          ? [
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "修改",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickUpdate(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "删除",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
                       proxy
-                        .post("/erpCodingGroup/delete", {
-                          id: row.id,
-                        })
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-          row.status == 10 || row.status == 30
-            ? {
-                attrs: {
-                  label: "作废",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
-                      proxy
-                        .post("/erpCodingGroup/cancellation", {
-                          id: row.id,
+                          proxy
+                            .post("/erpCodingGroup/delete", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
                         })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 10 || row.status == 30
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-        ];
+                          proxy
+                            .post("/erpCodingGroup/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+            ]
+          : [];
       },
     },
   ];

+ 493 - 0
src/views/oa/application/invoiceTaxDeduction/index.vue

@@ -0,0 +1,493 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :selectConfig="selectConfig" :config="config" :loading="loading"
+               highlight-current-row :action-list="[
+          {
+            text: '添加',
+            action: () => openModal('add'),
+          },
+        ]" @get-list="getList">
+
+        <template #code="{item}">
+          <div style="width:100%">
+            <span class="el-click" @click="getDtl(item)">{{item.code}}</span>
+          </div>
+        </template>
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '归还' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="500">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" 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 moment from "moment";
+// import $bus from "@/bus/index.js";
+import useRefreshTableData from "@/hooks/refreshTableData";
+
+const { proxy } = getCurrentInstance();
+const sealType = computed(() => proxy.useUserStore().allDict["seal_type"]);
+const sealCategory = computed(
+  () => proxy.useUserStore().allDict["seal_category"]
+);
+const sealIsContract = computed(
+  () => proxy.useUserStore().allDict["seal_is_contract"]
+);
+const userList = ref([]);
+const deptData = ref([]);
+const typeData = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const loading = ref(false);
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+]);
+const isReturnedData = ref([
+  {
+    label: "是",
+    value: 1,
+  },
+  {
+    label: "否",
+    value: 0,
+  },
+]);
+
+const useMethodData = ref([
+  {
+    dictValue: "借章",
+    dictKey: "1",
+  },
+  {
+    dictValue: "盖章",
+    dictKey: "2",
+  },
+]);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "审批状态",
+      prop: "status",
+      data: statusData.value,
+    },
+    // {
+    //   label: "是否归还",
+    //   prop: "isReturned",
+    //   data: isReturnedData.value,
+    // },
+    // {
+    //   label: "使用方式",
+    //   prop: "useMethod",
+    //   data: useMethodData.value,
+    // },
+    // {
+    //   label: "印章类型",
+    //   prop: "sealType",
+    //   data: sealType.value,
+    // },
+    // {
+    //   label: "盖章类别",
+    //   prop: "stampedType",
+    //   data: sealCategory.value,
+    // },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "流水号",
+        slot: "code",
+        // width: 130,
+        fixed: "left",
+      },
+    },
+
+    {
+      attrs: {
+        label: "申请人",
+        prop: "createUserName",
+        // width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "申请日期",
+        prop: "applyTime",
+        // width: 100,
+      },
+    },
+
+    {
+      attrs: {
+        label: "抵扣金额",
+        prop: "amount",
+        // width: 130,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+
+    {
+      attrs: {
+        label: "抵扣工资月份",
+        prop: "deductionSalaryMonth",
+      },
+    },
+
+    {
+      attrs: {
+        label: "审批状态",
+        prop: "status",
+        // width: 100,
+        fixed: "right",
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, statusData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return row.createUser == proxy.useUserStore().user.userId
+          ? [
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "修改",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickUpdate(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "删除",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/invoiceTaxDeduction/delete", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 10 || row.status == 30
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/invoiceTaxDeduction/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+            ]
+          : [];
+      },
+    },
+  ];
+});
+const corporationList = ref([]);
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/invoiceTaxDeduction/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+getList();
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: proxy.useUserStore().user.companyId,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDeptData();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "date",
+      prop: "realityReturnedTime",
+      itemType: "date",
+      label: "归还日期",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  realityReturnedTime: [
+    { required: true, message: "请选择归还日期", trigger: "change" },
+  ],
+});
+const formData = reactive({
+  data: {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  },
+});
+const openModal = (val) => {
+  // modalType.value = val;
+  // formData.data = {
+  //   accountRemainderList: [{ currency: "", remainder: undefined }],
+  // };
+  // loadingDialog.value = false;
+  // dialogVisible.value = true;
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "invoice_tax_deduction_flow",
+      flowName: "电子发票抵税提交发起流程",
+      random: proxy.random(),
+    },
+  });
+};
+const clickBalance = () => {
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
+  } else {
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.accountRemainderList.splice(index, 1);
+};
+const isRepeat = (arr) => {
+  var hash = {};
+  for (var i in arr) {
+    if (hash[arr[i].currency]) return true;
+    hash[arr[i].currency] = true;
+  }
+  return false;
+};
+
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/invoiceTaxDeduction/returned", formData.data).then(
+      () => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        loadingDialog.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+    // if (
+    //   formData.data.accountRemainderList &&
+    //   formData.data.accountRemainderList.length > 0
+    // ) {
+    //   if (isRepeat(formData.data.accountRemainderList)) {
+    //     return ElMessage("请勿重复添加货币余额");
+    //   } else {
+    //     loadingDialog.value = true;
+    //     proxy.post("/accountManagement/" + modalType.value, formData.data).then(
+    //       () => {
+    //         ElMessage({
+    //           message: modalType.value == "add" ? "添加成功" : "编辑成功",
+    //           type: "success",
+    //         });
+    //         dialogVisible.value = false;
+    //         getList();
+    //       },
+    //       (err) => {
+    //         console.log(err);
+    //         loadingDialog.value = false;
+    //       }
+    //     );
+    //   }
+    // } else {
+    //   return ElMessage("请添加至少一条类型余额");
+    // }
+  });
+};
+
+const update = (row) => {
+  loadingDialog.value = false;
+  modalType.value = "edit";
+  formData.data = proxy.deepClone(row);
+  dialogVisible.value = true;
+};
+
+const clickUpdate = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "invoice_tax_deduction_flow",
+      flowName: "电子发票抵税提交发起流程",
+      random: proxy.random(),
+      businessId: row.id,
+    },
+  });
+};
+
+const getDtl = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "invoice_tax_deduction_flow",
+      flowName: "电子发票抵税提交流程查看",
+      random: proxy.random(),
+      businessId: row.id,
+      processType: 20,
+    },
+  });
+};
+
+const handleReturn = (row) => {
+  modalType.value = "add";
+  formData.data = {
+    id: row.id,
+    realityReturnedTime: moment().format("YYYY-HH-MM"),
+  };
+  dialogVisible.value = true;
+};
+
+useRefreshTableData(getList);
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 63 - 61
src/views/oa/application/medicalAndsocialSecurity/index.vue

@@ -180,71 +180,73 @@ const config = computed(() => {
         align: "center",
       },
       renderHTML(row) {
-        return [
-          row.status == 0
-            ? {
-                attrs: {
-                  label: "修改",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  clickUpdate(row);
-                },
-              }
-            : {},
-          row.status == 0
-            ? {
-                attrs: {
-                  label: "删除",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
+        return row.createUser == proxy.useUserStore().user.userId
+          ? [
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "修改",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickUpdate(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "删除",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
                       proxy
-                        .post("/medicalInsurance/delete", {
-                          id: row.id,
-                        })
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-          row.status == 10 || row.status == 30
-            ? {
-                attrs: {
-                  label: "作废",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
-                      proxy
-                        .post("/medicalInsurance/cancellation", {
-                          id: row.id,
+                          proxy
+                            .post("/medicalInsurance/delete", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
                         })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 10 || row.status == 30
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-        ];
+                          proxy
+                            .post("/medicalInsurance/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+            ]
+          : [];
       },
     },
   ];

+ 493 - 0
src/views/oa/application/personalInvoice/index.vue

@@ -0,0 +1,493 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :selectConfig="selectConfig" :config="config" :loading="loading"
+               highlight-current-row :action-list="[
+          {
+            text: '添加',
+            action: () => openModal('add'),
+          },
+        ]" @get-list="getList">
+
+        <template #code="{item}">
+          <div style="width:100%">
+            <span class="el-click" @click="getDtl(item)">{{item.code}}</span>
+          </div>
+        </template>
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '归还' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="500">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" 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 moment from "moment";
+// import $bus from "@/bus/index.js";
+import useRefreshTableData from "@/hooks/refreshTableData";
+
+const { proxy } = getCurrentInstance();
+const sealType = computed(() => proxy.useUserStore().allDict["seal_type"]);
+const sealCategory = computed(
+  () => proxy.useUserStore().allDict["seal_category"]
+);
+const sealIsContract = computed(
+  () => proxy.useUserStore().allDict["seal_is_contract"]
+);
+const userList = ref([]);
+const deptData = ref([]);
+const typeData = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const loading = ref(false);
+const statusData = ref([
+  {
+    label: "草稿",
+    value: 0,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批驳回",
+    value: 20,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+  {
+    label: "作废",
+    value: 88,
+  },
+]);
+const isReturnedData = ref([
+  {
+    label: "是",
+    value: 1,
+  },
+  {
+    label: "否",
+    value: 0,
+  },
+]);
+
+const useMethodData = ref([
+  {
+    dictValue: "借章",
+    dictKey: "1",
+  },
+  {
+    dictValue: "盖章",
+    dictKey: "2",
+  },
+]);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "审批状态",
+      prop: "status",
+      data: statusData.value,
+    },
+    // {
+    //   label: "是否归还",
+    //   prop: "isReturned",
+    //   data: isReturnedData.value,
+    // },
+    // {
+    //   label: "使用方式",
+    //   prop: "useMethod",
+    //   data: useMethodData.value,
+    // },
+    // {
+    //   label: "印章类型",
+    //   prop: "sealType",
+    //   data: sealType.value,
+    // },
+    // {
+    //   label: "盖章类别",
+    //   prop: "stampedType",
+    //   data: sealCategory.value,
+    // },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "流水号",
+        slot: "code",
+        width: 130,
+        fixed: "left",
+      },
+    },
+
+    {
+      attrs: {
+        label: "申请人",
+        prop: "createUserName",
+        width: 130,
+      },
+    },
+    {
+      attrs: {
+        label: "申请日期",
+        prop: "applyTime",
+        width: 100,
+      },
+    },
+
+    {
+      attrs: {
+        label: "发票金额",
+        prop: "amount",
+        width: 130,
+      },
+      render(val) {
+        return proxy.moneyFormat(val, 2);
+      },
+    },
+
+    {
+      attrs: {
+        label: "摘要",
+        prop: "remark",
+      },
+    },
+
+    {
+      attrs: {
+        label: "审批状态",
+        prop: "status",
+        width: 100,
+        fixed: "right",
+      },
+      render(type) {
+        return proxy.dictValueLabel(type, statusData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return row.createUser == proxy.useUserStore().user.userId
+          ? [
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "修改",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickUpdate(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "删除",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/personalInvoice/delete", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 10 || row.status == 30
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
+                        .then((res) => {
+                          proxy
+                            .post("/personalInvoice/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+            ]
+          : [];
+      },
+    },
+  ];
+});
+const corporationList = ref([]);
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/personalInvoice/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+getList();
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: proxy.useUserStore().user.companyId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: proxy.useUserStore().user.companyId,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDeptData();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "date",
+      prop: "realityReturnedTime",
+      itemType: "date",
+      label: "归还日期",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  realityReturnedTime: [
+    { required: true, message: "请选择归还日期", trigger: "change" },
+  ],
+});
+const formData = reactive({
+  data: {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  },
+});
+const openModal = (val) => {
+  // modalType.value = val;
+  // formData.data = {
+  //   accountRemainderList: [{ currency: "", remainder: undefined }],
+  // };
+  // loadingDialog.value = false;
+  // dialogVisible.value = true;
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "personal_invoice_flow",
+      flowName: "个人电子发票提交发起流程",
+      random: proxy.random(),
+    },
+  });
+};
+const clickBalance = () => {
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
+  } else {
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.accountRemainderList.splice(index, 1);
+};
+const isRepeat = (arr) => {
+  var hash = {};
+  for (var i in arr) {
+    if (hash[arr[i].currency]) return true;
+    hash[arr[i].currency] = true;
+  }
+  return false;
+};
+
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/personalInvoice/returned", formData.data).then(
+      () => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        loadingDialog.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+    // if (
+    //   formData.data.accountRemainderList &&
+    //   formData.data.accountRemainderList.length > 0
+    // ) {
+    //   if (isRepeat(formData.data.accountRemainderList)) {
+    //     return ElMessage("请勿重复添加货币余额");
+    //   } else {
+    //     loadingDialog.value = true;
+    //     proxy.post("/accountManagement/" + modalType.value, formData.data).then(
+    //       () => {
+    //         ElMessage({
+    //           message: modalType.value == "add" ? "添加成功" : "编辑成功",
+    //           type: "success",
+    //         });
+    //         dialogVisible.value = false;
+    //         getList();
+    //       },
+    //       (err) => {
+    //         console.log(err);
+    //         loadingDialog.value = false;
+    //       }
+    //     );
+    //   }
+    // } else {
+    //   return ElMessage("请添加至少一条类型余额");
+    // }
+  });
+};
+
+const update = (row) => {
+  loadingDialog.value = false;
+  modalType.value = "edit";
+  formData.data = proxy.deepClone(row);
+  dialogVisible.value = true;
+};
+
+const clickUpdate = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "personal_invoice_flow",
+      flowName: "个人电子发票提交发起流程",
+      random: proxy.random(),
+      businessId: row.id,
+    },
+  });
+};
+
+const getDtl = (row) => {
+  proxy.$router.push({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "personal_invoice_flow",
+      flowName: "个人电子发票提交流程查看",
+      random: proxy.random(),
+      businessId: row.id,
+      processType: 20,
+    },
+  });
+};
+
+const handleReturn = (row) => {
+  modalType.value = "add";
+  formData.data = {
+    id: row.id,
+    realityReturnedTime: moment().format("YYYY-HH-MM"),
+  };
+  dialogVisible.value = true;
+};
+
+useRefreshTableData(getList);
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 76 - 74
src/views/oa/application/useSeal/index.vue

@@ -267,84 +267,86 @@ const config = computed(() => {
         fixed: "right",
       },
       renderHTML(row) {
-        return [
-          row.status == 30 && row.useMethod == 1 && row.isReturned == 0
-            ? {
-                attrs: {
-                  label: "归还",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  handleReturn(row);
-                },
-              }
-            : {},
-          row.status == 0
-            ? {
-                attrs: {
-                  label: "修改",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  clickUpdate(row);
-                },
-              }
-            : {},
-          row.status == 0
-            ? {
-                attrs: {
-                  label: "删除",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
+        return row.createUser == proxy.useUserStore().user.userId
+          ? [
+              row.status == 30 && row.useMethod == 1 && row.isReturned == 0
+                ? {
+                    attrs: {
+                      label: "归还",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      handleReturn(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "修改",
+                      type: "primary",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      clickUpdate(row);
+                    },
+                  }
+                : {},
+              row.status == 0
+                ? {
+                    attrs: {
+                      label: "删除",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
                       proxy
-                        .post("/sealUse/delete", {
-                          id: row.id,
-                        })
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-          row.status == 10 || row.status == 30
-            ? {
-                attrs: {
-                  label: "作废",
-                  type: "danger",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  proxy
-                    .msgConfirm()
-                    .then((res) => {
-                      proxy
-                        .post("/sealUse/cancellation", {
-                          id: row.id,
+                          proxy
+                            .post("/sealUse/delete", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
                         })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+              row.status == 10 || row.status == 30
+                ? {
+                    attrs: {
+                      label: "作废",
+                      type: "danger",
+                      text: true,
+                    },
+                    el: "button",
+                    click() {
+                      proxy
+                        .msgConfirm()
                         .then((res) => {
-                          proxy.msgTip("操作成功", 1);
-                          getList();
-                        });
-                    })
-                    .catch((err) => {});
-                },
-              }
-            : {},
-        ];
+                          proxy
+                            .post("/sealUse/cancellation", {
+                              id: row.id,
+                            })
+                            .then((res) => {
+                              proxy.msgTip("操作成功", 1);
+                              getList();
+                            });
+                        })
+                        .catch((err) => {});
+                    },
+                  }
+                : {},
+            ]
+          : [];
       },
     },
   ];

+ 43 - 0
src/views/process/processApproval/index.vue

@@ -62,6 +62,13 @@
 
         <EncodingCombination ref="makeDom" v-else-if="flowForm.flowKey == 'erp_coding_group_flow'" :queryData="queryData.data"></EncodingCombination>
 
+        <ActivityPriceInventory ref="makeDom" v-else-if="flowForm.flowKey == 'activity_price_inventory_flow'" :queryData="queryData.data">
+        </ActivityPriceInventory>
+
+        <PersonalInvoice ref="makeDom" v-else-if="flowForm.flowKey == 'personal_invoice_flow'" :queryData="queryData.data"></PersonalInvoice>
+        <InvoiceTaxDeduction ref="makeDom" v-else-if="flowForm.flowKey == 'invoice_tax_deduction_flow'" :queryData="queryData.data">
+        </InvoiceTaxDeduction>
+
         <!-- 取消到账认领 -->
         <!-- <CancelClaim ref="makeDom" v-else-if="flowForm.flowKey == 'claim_del_flow'" :queryData="queryData.data"></CancelClaim> -->
       </div>
@@ -223,6 +230,9 @@ import EducationSubsidy from "@/components/process/SF/EducationSubsidy";
 import MedicalAndsocialSecurity from "@/components/process/SF/MedicalAndsocialSecurity";
 import UseSeal from "@/components/process/SF/UseSeal";
 import EncodingCombination from "@/components/process/SF/EncodingCombination";
+import ActivityPriceInventory from "@/components/process/SF/ActivityPriceInventory";
+import PersonalInvoice from "@/components/process/SF/PersonalInvoice";
+import InvoiceTaxDeduction from "@/components/process/SF/InvoiceTaxDeduction";
 
 import PurchasePayment from "@/components/process/PurchasePayment";
 import SendFunds from "@/components/process/SendFunds";
@@ -251,6 +261,9 @@ const StagFlowKey = ref([
   "medical_insurance_flow",
   "seal_use_flow",
   "erp_coding_group_flow",
+  "activity_price_inventory_flow",
+  "personal_invoice_flow",
+  "invoice_tax_deduction_flow",
 ]);
 // tab切换逻辑
 const activeName = ref("first");
@@ -483,6 +496,33 @@ const handleSubmitStag = async (_type) => {
                 btnLoading.value = false;
               }
             );
+          } else if (flowForm.flowKey == "activity_price_inventory_flow") {
+            proxy.post("/activityPriceInventory/add", data).then(
+              (res) => {
+                skipPage();
+              },
+              (err) => {
+                btnLoading.value = false;
+              }
+            );
+          } else if (flowForm.flowKey == "personal_invoice_flow") {
+            proxy.post("/personalInvoice/add", data).then(
+              (res) => {
+                skipPage();
+              },
+              (err) => {
+                btnLoading.value = false;
+              }
+            );
+          } else if (flowForm.flowKey == "invoice_tax_deduction_flow") {
+            proxy.post("/invoiceTaxDeduction/add", data).then(
+              (res) => {
+                skipPage();
+              },
+              (err) => {
+                btnLoading.value = false;
+              }
+            );
           }
         }
       });
@@ -512,6 +552,9 @@ const skipPage = () => {
     medical_insurance_flow: "MedicalAndsocialSecurity",
     seal_use_flow: "UseSeal",
     erp_coding_group_flow: "EncodingCombination",
+    activity_price_inventory_flow: "ActivityPriceInventory",
+    personal_invoice_flow: "PersonalInvoice",
+    invoice_tax_deduction_flow: "InvoiceTaxDeduction",
   };
   const useTagsStore = useTagsViewStore();
   useTagsStore.delVisitedView(router.currentRoute.value);

+ 11 - 11
src/views/product/material/index.vue

@@ -452,17 +452,17 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          {
-            attrs: {
-              label: "产品反查",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getAssociationProduct(row);
-            },
-          },
+          // {
+          //   attrs: {
+          //     label: "产品反查",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     getAssociationProduct(row);
+          //   },
+          // },
           {
             attrs: {
               label: "修改",

+ 1 - 1
src/views/production/project/processConfig/vueFlow.vue

@@ -743,6 +743,6 @@ defineExpose({
 }
 
 #stencil .x6-widget-stencil-content .x6-widget-stencil-group-content .x6-graph {
-  height: 900px !important;
+  height: 1500px !important;
 }
 </style>

+ 1 - 1
src/views/salesMange/afterSales/SelectContractProduct.vue

@@ -327,7 +327,7 @@ const formConfig = computed(() => {
       type: "selectInput",
       prop: "price",
       selectProp: "currency",
-      label: "销售业务成本单价",
+      label: "销售业务供货价",
       itemWidth: 50,
       style: {
         width: "100%",

+ 64 - 38
src/views/systemTenant/tenant/roleTenant/index.vue

@@ -80,6 +80,22 @@ const config = computed(() => {
     // },
     {
       attrs: {
+        label: "是否系统角色",
+        prop: "isSystem",
+        align: "left",
+      },
+      render(val) {
+        return val == 1 ? "是" : "否";
+      },
+    },
+    {
+      attrs: {
+        label: "排序",
+        prop: "roleSort",
+      },
+    },
+    {
+      attrs: {
         label: "创建时间",
         prop: "createTime",
       },
@@ -114,41 +130,43 @@ const config = computed(() => {
               getDtl(row);
             },
           },
-          {
-            attrs: {
-              label: "删除",
-              type: "danger",
-              text: true,
-            },
-            el: "button",
-            click() {
-              ElMessageBox.confirm(
-                "此操作将永久删除该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
-                proxy
-                  .post(
-                    "/tenantRole/" + row.roleId,
+          row.isSystem != 1
+            ? {
+                attrs: {
+                  label: "删除",
+                  type: "danger",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  ElMessageBox.confirm(
+                    "此操作将永久删除该数据, 是否继续?",
+                    "提示",
                     {
-                      id: row.roleId,
-                    },
-                    "delete"
-                  )
-                  .then((res) => {
-                    ElMessage({
-                      message: "删除成功",
-                      type: "success",
-                    });
-                    getList();
+                      confirmButtonText: "确定",
+                      cancelButtonText: "取消",
+                      type: "warning",
+                    }
+                  ).then(() => {
+                    proxy
+                      .post(
+                        "/tenantRole/" + row.roleId,
+                        {
+                          id: row.roleId,
+                        },
+                        "delete"
+                      )
+                      .then((res) => {
+                        ElMessage({
+                          message: "删除成功",
+                          type: "success",
+                        });
+                        getList();
+                      });
                   });
-              });
-            },
-          },
+                },
+              }
+            : {},
         ];
       },
     },
@@ -214,11 +232,13 @@ const formConfig = computed(() => {
       type: "input",
       prop: "roleKey",
       label: "角色编码",
+      disabled: formData.data.isSystem == 1,
     },
     {
       type: "input",
       prop: "roleName",
       label: "角色名称",
+      disabled: formData.data.isSystem == 1,
     },
     {
       type: "select",
@@ -236,6 +256,16 @@ const formConfig = computed(() => {
     //     width: "100%",
     //   },
     // },
+
+    {
+      type: "number",
+      prop: "roleSort",
+      label: "排序",
+      precision: 0,
+      min: 0,
+      // controls: false,
+      // itemWidth: 50,
+    },
   ];
 });
 const rules = ref({
@@ -258,11 +288,7 @@ const submitForm = () => {
     const method = modalType.value == "add" ? "POST" : "PUT";
     loadingDialog.value = true;
     proxy
-      .post(
-        "/tenantRole",
-        { ...formData.data, roleSort: 1, status: "0" },
-        method
-      )
+      .post("/tenantRole", { ...formData.data, status: "0" }, method)
       .then(() => {
         ElMessage({
           message: modalType.value == "add" ? "添加成功" : "编辑成功",