Browse Source

开工确认

cz 10 months ago
parent
commit
70a21a2bca

+ 8 - 7
src/components/PDF/SalaryConfirmationPDF.vue

@@ -55,8 +55,9 @@
         </tr>
         <tr>
           <td v-for="col in salaryStructureData" :key="col.value" :style="`width:${parseFloat(80/salaryStructureData.length).toFixed(2)}%`">
-            <el-input-number onmousewheel="return false;" v-model="pdfData.salaryData[col.value+'-10']" placeholder=" " style="width: 100%"
-                             :precision="2" :controls="false" :min="0" @change="changeAmount('10')" />
+            {{pdfData.salaryData[col.value+'-10']}}
+            <!-- <el-input-number onmousewheel="return false;" v-model="pdfData.salaryData[col.value+'-10']" placeholder=" " style="width: 100%"
+                             :precision="2" :controls="false" :min="0" @change="changeAmount('10')" /> -->
           </td>
           <td>{{pdfData.amount}}</td>
         </tr>
@@ -69,8 +70,9 @@
         </tr>
         <tr>
           <td v-for="col in salaryStructureData" :key="col.value">
-            <el-input-number onmousewheel="return false;" v-model="pdfData.salaryData[col.value+'-20']" placeholder=" " style="width: 100%"
-                             :precision="2" :controls="false" :min="0" @change="changeAmount('20')" />
+            {{pdfData.salaryData[col.value+'-20']}}
+            <!-- <el-input-number onmousewheel="return false;" v-model="pdfData.salaryData[col.value+'-20']" placeholder=" " style="width: 100%"
+                             :precision="2" :controls="false" :min="0" @change="changeAmount('20')" /> -->
           </td>
           <td>{{pdfData.perfAmount}}</td>
         </tr>
@@ -105,9 +107,9 @@
     </div>
     <div style="text-align: center;margin-top:20px">
       <el-button type="primary" v-print="printObj" size="default" v-debounce>打印</el-button>
-      <el-button type="primary" @click="clickDownload()" size="default" v-debounce>下载PDF</el-button>
+      <!-- <el-button type="primary" @click="clickDownload()" size="default" v-debounce>下载PDF</el-button>
       <el-button type="primary" @click="exportExcel()" size="default" v-debounce>导出Excel</el-button>
-      <el-button type="primary" @click="saveData()" size="default" v-debounce>保存</el-button>
+      <el-button type="primary" @click="saveData()" size="default" v-debounce>保存</el-button> -->
 
     </div>
   </div>
@@ -151,7 +153,6 @@ const getPdfData = (query) => {
         res.salaryData[row.salaryStructureId + "-" + row.type] = row.money;
       }
     }
-    console.log(res.salaryData);
     pdfData.value = res;
     loading.value = false;
   });

+ 2 - 3
src/components/contractCom/selectPurchase.vue

@@ -342,9 +342,8 @@ const clickSelect = (row) => {
   line-height: 24px;
   padding-left: 4px;
 }
-</style>
-<style>
-.redClass {
+::v-deep(.redClass) {
   color: #f54a45 !important;
 }
 </style>
+

+ 259 - 0
src/components/process/SF/Become.vue

@@ -0,0 +1,259 @@
+<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: "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: "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: "input",
+      prop: "amount",
+      itemType: "text",
+      label: "学历补贴金额",
+      itemWidth: 50,
+      disabled: true,
+    },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "fileList",
+      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" }],
+  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(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("/educationSubsidy/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);
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 263 - 0
src/components/process/SF/StartConfirm.vue

@@ -0,0 +1,263 @@
+<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%;padding:0 20px">
+          <el-table :data="formData.data.historyList">
+            <el-table-column prop="createTime" label="创建时间" width="160" />
+            <el-table-column prop="expectBeginTime" label="预计上线" width="110" />
+            <el-table-column prop="expectDeliveryTime" label="预计交货" width="110" />
+            <el-table-column prop="isAgreeWork" label="是否同意开工生产" width="140">
+              <template #default="{ row }">
+                <div>
+                  {{dictValueLabel(row.isAgreeWork,isData)}}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="isCabinetConfirm" label="走柜是否明确" width="120">
+              <template #default="{ row }">
+                <div>
+                  {{dictValueLabel(row.isCabinetConfirm,isData)}}
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="cabinetExitTime" label="走柜时间" width="110" />
+            <el-table-column prop="workRemark" label="其他说明" />
+          </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 isData = ref([
+  {
+    label: "否",
+    value: 0,
+  },
+  {
+    label: "是",
+    value: 1,
+  },
+]);
+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: 130,
+  itemWidth: 100,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "开工确认",
+    },
+    {
+      type: "date",
+      itemType: "date",
+      label: "预计上线",
+      prop: "expectBeginTime",
+      itemWidth: 100,
+      disabled: true,
+    },
+    {
+      type: "date",
+      itemType: "date",
+      label: "预计交货",
+      prop: "expectDeliveryTime",
+      itemWidth: 100,
+      disabled: true,
+    },
+    {
+      type: "title1",
+      title: "业务信息",
+    },
+    {
+      type: "radio",
+      label: "是否同意开工生产",
+      prop: "isAgreeWork",
+      data: [
+        { label: "是", value: 1 },
+        { label: "否", value: 0 },
+      ],
+      itemWidth: 100,
+    },
+    {
+      type: "radio",
+      label: "走柜是否明确",
+      prop: "isCabinetConfirm",
+      data: [
+        { label: "是", value: 1 },
+        { label: "否", value: 0 },
+      ],
+      itemWidth: 100,
+    },
+    {
+      type: "date",
+      itemType: "date",
+      label: "走柜时间",
+      prop: "cabinetExitTime",
+      itemWidth: 100,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      label: "其他说明",
+      prop: "workRemark",
+      itemWidth: 100,
+    },
+    {
+      type: "title1",
+      title: "开工确认历史记录",
+    },
+    {
+      type: "slot",
+      slotName: "detail",
+      label: "",
+    },
+  ];
+});
+
+const rules = ref({
+  isAgreeWork: [
+    { required: true, message: "请选择是否同意开工生产", trigger: "change" },
+  ],
+  isCabinetConfirm: [
+    { required: true, message: "请选择走柜是否明确", trigger: "change" },
+  ],
+  cabinetExitTime: [
+    { required: true, message: "请选择走柜时间", trigger: "change" },
+  ],
+  workRemark: [{ 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("/productionBeginConfirm/detail", { id: businessId })
+      .then((res) => {
+        formData.data = res;
+      });
+  }
+};
+
+onMounted(() => {
+  // formOption.disabled = judgeStatus();
+
+  if (route.query.businessId) {
+    getAllData(route.query.businessId);
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 191 - 0
src/views/MES/productionOrder/index.vue

@@ -394,6 +394,46 @@
       </template>
     </el-dialog>
 
+    <el-dialog :title="'开工确认'" v-model="confirmDialogOne" width="60%" destroy-on-close>
+
+      <byForm :formConfig="confirmFormConfigOne" :formOption="confirmFormOptionOne" v-model="confirmFormDataOne.data" :rules="confirmRulesOne"
+              ref="confirmFormDomOne" v-loading="formLoading">
+        <template #detail>
+          <div style="width:100%;padding:0 20px">
+            <el-table :data="confirmFormDataOne.data.historyList">
+              <el-table-column prop="createTime" label="创建时间" width="160" />
+              <el-table-column prop="expectBeginTime" label="预计上线" width="110" />
+              <el-table-column prop="expectDeliveryTime" label="预计交货" width="110" />
+              <el-table-column prop="isAgreeWork" label="是否同意开工生产" width="140">
+                <template #default="{ row }">
+                  <div>
+                    {{dictValueLabel(row.isAgreeWork,isData)}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="isCabinetConfirm" label="走柜是否明确" width="120">
+                <template #default="{ row }">
+                  <div>
+                    {{dictValueLabel(row.isCabinetConfirm,isData)}}
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column prop="cabinetExitTime" label="走柜时间" width="110" />
+              <el-table-column prop="workRemark" label="其他说明" />
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+
+      <template #footer>
+        <el-button @click="confirmDialogOne =false" size="default" v-debounce>取 消</el-button>
+        <el-button @click="submitConfirmOne(true)" type="primary" size="default" v-debounce
+                   v-if="rowData.prodConfirmStatus==null || rowData.prodConfirmStatus==30 ">提
+          交</el-button>
+      </template>
+
+    </el-dialog>
+
   </div>
 </template>
 
@@ -475,6 +515,20 @@ const statusData = ref([
     value: "99",
   },
 ]);
+const prodConfirmStatusData = ref([
+  {
+    label: "未发起",
+    value: null,
+  },
+  {
+    label: "审批中",
+    value: 10,
+  },
+  {
+    label: "审批通过",
+    value: 30,
+  },
+]);
 const arrivalStatusData = ref([
   {
     label: "未到货",
@@ -489,6 +543,16 @@ const arrivalStatusData = ref([
     value: 2,
   },
 ]);
+const isData = ref([
+  {
+    label: "否",
+    value: 0,
+  },
+  {
+    label: "是",
+    value: 1,
+  },
+]);
 const purchaseStatus = ref([
   {
     label: "草稿",
@@ -717,6 +781,33 @@ const config = computed(() => {
         "min-width": 300,
       },
     },
+
+    {
+      attrs: {
+        label: "开工确认状态",
+        prop: "prodConfirmStatus",
+        width: 110,
+        fixed: "right",
+      },
+      render(val) {
+        if (val) {
+          return proxy.dictValueLabel(val, prodConfirmStatusData.value);
+        } else {
+          return "未发起";
+        }
+      },
+    },
+    {
+      attrs: {
+        prop: "isAgreeWork",
+        label: "是否同意开工",
+        width: 120,
+        fixed: "right",
+      },
+      render(val) {
+        return val == 1 ? "是" : "否";
+      },
+    },
     {
       attrs: {
         label: "操作",
@@ -760,6 +851,21 @@ const config = computed(() => {
                 },
               }
             : {},
+          row.confirmStatus == "1"
+            ? // &&
+              // (row.prodConfirmStatus == null || row.prodConfirmStatus == 30)
+              {
+                attrs: {
+                  label: "开工确认",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  startConfirm(row);
+                },
+              }
+            : {},
           // row.produceStatus == 2
           //   ? {
           //       attrs: {
@@ -1458,6 +1564,91 @@ const lookDetail = (row) => {
   shortageMaterialTab.value = "1";
   shortageMaterialDialog.value = true;
 };
+
+const confirmFormDomOne = ref(null);
+const confirmDialogOne = ref(false);
+const confirmFormDataOne = reactive({
+  data: {},
+});
+const confirmFormOptionOne = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  disabled: false,
+});
+const confirmFormConfigOne = computed(() => [
+  {
+    type: "title1",
+    title: "开工确认",
+  },
+  {
+    type: "date",
+    itemType: "date",
+    label: "预计上线",
+    prop: "expectBeginTime",
+    itemWidth: 100,
+  },
+  {
+    type: "date",
+    itemType: "date",
+    label: "预计交货",
+    prop: "expectDeliveryTime",
+    itemWidth: 100,
+  },
+  {
+    type: "title1",
+    title: "开工确认历史记录",
+  },
+  {
+    type: "slot",
+    slotName: "detail",
+    label: "",
+  },
+]);
+const confirmRulesOne = ref({
+  expectBeginTime: [
+    { required: true, message: "请选择预计上线", trigger: "change" },
+  ],
+  expectDeliveryTime: [
+    { required: true, message: "请选择预计交货", trigger: "change" },
+  ],
+  isAgreeWork: [
+    { required: true, message: "请选择是否同意开工生产", trigger: "change" },
+  ],
+  isCabinetConfirm: [
+    { required: true, message: "请选择走柜是否明确", trigger: "change" },
+  ],
+  cabinetExitTime: [
+    { required: true, message: "请选择走柜时间", trigger: "change" },
+  ],
+  // workRemark: [{ required: true, message: "请输入备注", trigger: "blur" }],
+});
+
+const rowData = ref({});
+const startConfirm = (row) => {
+  rowData.value = row;
+  confirmDialogOne.value = true;
+  confirmFormDataOne.data = { prodOrderId: row.id };
+  proxy
+    .post("/productionBeginConfirm/getHistoryList", { prodOrderId: row.id })
+    .then((res) => {
+      confirmFormDataOne.data.historyList = res;
+    });
+};
+
+const submitConfirmOne = (flag) => {
+  confirmFormDomOne.value.handleSubmit(() => {
+    formLoading.value = true;
+    proxy
+      .post("/productionBeginConfirm/add", confirmFormDataOne.data)
+      .then((res) => {
+        proxy.msgTip("操作成功");
+        formLoading.value = false;
+        confirmDialogOne.value = false;
+        getList();
+      });
+  });
+};
 </script>
 <style lang="scss" scoped>
 ::v-deep(.el-progress__text) {

+ 136 - 34
src/views/MES/productionTask/index.vue

@@ -4,7 +4,12 @@
              :pagination="sourceList.pagination" :action-list="[ {
                 text: '历史排程', 
                 action: ()=> lookHistroyData(),
-             },]" :isCustomResetFn="true" @get-list="handleSearch" @search-reset="searchReset">
+             },{
+                text: '导出Excel',
+                action: () => exportExcel(),
+                disabled: false,
+              }
+             ]" :isCustomResetFn="true" @get-list="handleSearch" @search-reset="searchReset">
       <!-- 
         {
                 text: isShowSeveral?'全部工序':'部分工序', 
@@ -104,16 +109,16 @@
 
         <template #btn="{ item }">
           <div style="width: 100%">
-            <span class="el-click" @click="startConfirm(item)" style="margin-left:10px">开工确认</span>
+            <!-- <span class="el-click" @click="startConfirm(item)" style="margin-left:10px">开工确认</span> -->
             <span class="el-click" @click="printQrCode(item)" style="margin-left:10px">任务单</span>
-            <el-popover placement="bottom-start" title="" :width="300" trigger="hover">
+            <!-- <el-popover placement="bottom-start" title="" :width="300" trigger="hover">
               <div style="width:100%">
                 {{item.remark || '无'}}
               </div>
               <template #reference>
                 <span class="el-click" @click="openRemark(item)" style="margin-left:10px">进度说明</span>
               </template>
-            </el-popover>
+            </el-popover> -->
             <span class="el-click" @click="handleChangeStatus(item)" :style="{color:item.reportLock==1?'red':''}"
                   style="margin-left:10px">{{item.reportLock==1?'已':'未'}}锁定</span>
 
@@ -132,6 +137,12 @@
           </div>
         </template>
 
+        <template #remark="{ item }">
+          <div style="width: 100%">
+            <el-input v-model="item.remark" @change="val=>changeRowRemark(val,item.id)"></el-input>
+          </div>
+        </template>
+
         <template #orderCode="{ item }">
           <div style="width: 100%" class="el-click" @click="lookDetails(item)">
             {{item.orderCode}}
@@ -168,6 +179,13 @@
           </div>
         </template>
 
+        <template #isAgreeWork="{item}">
+          <div style="width: 100%">
+            <span v-if="item.isAgreeWork=='0'" class="red"> 否 </span>
+            <span v-else> 是 </span>
+          </div>
+        </template>
+
         <template #produceStatus="{item}">
           <div style="width: 100%">
             <span :class="{
@@ -254,21 +272,27 @@
 
         <template #btn="{ item }">
           <div style="width: 100%">
-            <span class="el-click" @click="startConfirm(item)" style="margin-left:10px">开工确认</span>
+            <!-- <span class="el-click" @click="startConfirm(item)" style="margin-left:10px">开工确认</span> -->
             <span class="el-click" @click="printQrCode(item)" style="margin-left:10px">任务单</span>
-            <el-popover placement="bottom-start" title="" :width="300" trigger="hover">
+            <!-- <el-popover placement="bottom-start" title="" :width="300" trigger="hover">
               <div style="width:100%">
                 {{item.remark || '无'}}
               </div>
               <template #reference>
                 <span class="el-click" @click="openRemark(item)" style="margin-left:10px">进度说明</span>
               </template>
-            </el-popover>
+            </el-popover> -->
             <span class="el-click" @click="handleChangeStatus(item)" :style="{color:item.reportLock==1?'red':''}"
                   style="margin-left:10px">{{item.reportLock==1?'已':'未'}}锁定</span>
           </div>
         </template>
 
+        <template #remark="{ item }">
+          <div style="width: 100%">
+            <el-input v-model="item.remark" @change="(val)=>changeRowRemark(val,item.id)"></el-input>
+          </div>
+        </template>
+
         <template #orderCode="{ item }">
           <div style="width: 100%" class="el-click" @click="lookDetails(item)">
             {{item.orderCode}}
@@ -305,6 +329,13 @@
           </div>
         </template>
 
+        <template #isAgreeWork="{item}">
+          <div style="width: 100%">
+            <span v-if="item.isAgreeWork=='0'" class="red"> 否 </span>
+            <span v-else> 是 </span>
+          </div>
+        </template>
+
         <template #produceStatus="{item}">
           <div style="width: 100%">
             <span :class="{
@@ -1001,9 +1032,9 @@
       </template>
     </el-dialog>
 
-    <el-dialog :title="'开工确认'" v-model="confirmDialog" width="80%" destroy-on-close>
-      <div style="display:flex">
-        <div class="left" style="width:50%;">
+    <el-dialog :title="'开工确认'" v-model="confirmDialog" width="60%" destroy-on-close>
+      <!-- <div style="display:flex">
+        <div class="left" style="width:100%;">
           <TitleInfo :content="'确认信息'" :size="16"></TitleInfo>
           <div style="height:12px"></div>
           <byForm :formConfig="confirmFormConfig" :formOption="confirmFormOption" v-model="confirmFormData.data" :rules="confirmRules"
@@ -1051,11 +1082,31 @@
           </div>
 
         </div>
-      </div>
+      </div> -->
+
+      <byForm :formConfig="confirmFormConfig" :formOption="confirmFormOption" v-model="confirmFormData.data" :rules="confirmRules"
+              ref="confirmFormDom" v-loading="formLoading">
+        <template #detail>
+          <div style="width:100%;padding:0 20px">
+            <el-table :data="confirmFormData.data.purchaseProductList">
+              <el-table-column prop="productCode" label="创建时间" width="160" />
+              <el-table-column prop="productCode" label="是否同意开工生产" width="160" />
+              <el-table-column prop="productName" label="走柜是否明确" min-width="130" />
+              <el-table-column label="走柜时间" prop="走柜时间" width="160" />
+              <el-table-column label="其他说明" prop="quantity" width="100" />
+              <el-table-column label="预计上线" prop="quantity" width="100" />
+              <el-table-column label="预计交货" prop="quantity" width="100" />
+            </el-table>
+          </div>
+        </template>
+      </byForm>
 
       <template #footer>
         <el-button @click="confirmDialog =false" size="default" v-debounce>取 消</el-button>
+        <el-button @click="submitConfirm(true)" type="primary" size="default" v-debounce v-if="confirmFormData.data.isAgreeWork==1">提
+          交</el-button>
       </template>
+
     </el-dialog>
 
   </div>
@@ -1072,7 +1123,8 @@ import "@imengyu/vue3-context-menu/lib/vue3-context-menu.css";
 import ContextMenu from "@imengyu/vue3-context-menu";
 import { computed, reactive } from "vue";
 import { getMonthBetween } from "@/utils/date.js";
-
+import FileSaver from "file-saver";
+import * as XLSX from "xlsx";
 const { proxy } = getCurrentInstance();
 const contractTag = computed(
   () => proxy.useUserStore().allDict["contract_prod_tag"]
@@ -1230,10 +1282,10 @@ const btnData = computed(() => [
     label: "打印",
     value: "10",
   },
-  {
-    label: "排程",
-    value: "20",
-  },
+  // {
+  //   label: "排程",
+  //   value: "20",
+  // },
   {
     label: isShowSeveral.value ? "全部工序" : "部分工序",
     value: "30",
@@ -1299,7 +1351,7 @@ const selectConfig = computed(() => [
     isFilter: false,
   },
   {
-    label: "工厂",
+    label: "订单组别",
     prop: "companyId",
     data: companyData.value,
   },
@@ -1362,6 +1414,14 @@ const config = ref([
   },
   {
     attrs: {
+      slot: "isAgreeWork",
+      label: "是否同意开工",
+      width: 120,
+      fixed: "left",
+    },
+  },
+  {
+    attrs: {
       label: "客户",
       prop: "customerName",
       width: 180,
@@ -1509,7 +1569,7 @@ const config = ref([
   {
     attrs: {
       label: "进度说明",
-      prop: "remark",
+      slot: "remark",
       "min-width": 200,
     },
   },
@@ -1667,6 +1727,14 @@ const configCopy = ref([
   },
   {
     attrs: {
+      slot: "isAgreeWork",
+      label: "是否同意开工",
+      width: 120,
+      fixed: "left",
+    },
+  },
+  {
+    attrs: {
       label: "客户",
       prop: "customerName",
       width: 180,
@@ -1814,7 +1882,7 @@ const configCopy = ref([
   {
     attrs: {
       label: "进度说明",
-      prop: "remark",
+      slot: "remark",
       "min-width": 200,
     },
   },
@@ -3000,18 +3068,8 @@ const confirmFormOption = reactive({
 });
 const confirmFormConfig = computed(() => [
   {
-    type: "date",
-    itemType: "date",
-    label: "预计上线",
-    prop: "expectBeginTime",
-    itemWidth: 100,
-  },
-  {
-    type: "date",
-    itemType: "date",
-    label: "预计交货",
-    prop: "expectDeliveryTime",
-    itemWidth: 100,
+    type: "title1",
+    title: "业务信息",
   },
   {
     type: "radio",
@@ -3047,6 +3105,33 @@ const confirmFormConfig = computed(() => [
     prop: "workRemark",
     itemWidth: 100,
   },
+  {
+    type: "title1",
+    title: "开工确认",
+  },
+  {
+    type: "date",
+    itemType: "date",
+    label: "预计上线",
+    prop: "expectBeginTime",
+    itemWidth: 100,
+  },
+  {
+    type: "date",
+    itemType: "date",
+    label: "预计交货",
+    prop: "expectDeliveryTime",
+    itemWidth: 100,
+  },
+  {
+    type: "title1",
+    title: "开工历史记录",
+  },
+  {
+    type: "slot",
+    slotName: "detail",
+    label: "",
+  },
 ]);
 const confirmRules = ref({
   expectBeginTime: [
@@ -3075,6 +3160,7 @@ const startConfirm = (row) => {
     })
     .then((res) => {
       confirmFormData.data = res;
+      confirmFormData.data.purchaseProductList = [];
       confirmFormOption.disabled = confirmFormData.data.beginWorkStatus == 1;
     });
 };
@@ -3121,9 +3207,9 @@ const endDate = ref();
 const dayList = ref([]);
 const getDataBetween = () => {
   today.value = moment().format("YYYY-MM-DD");
-  beginDate.value = moment(today.value).subtract(2, "d").format("YYYY-MM-DD");
-  endDate.value = moment(today.value).add(3, "d").format("YYYY-MM-DD");
-  dayList.value = getMonthBetween(beginDate.value, endDate.value);
+  // beginDate.value = moment(today.value).subtract(2, "d").format("YYYY-MM-DD");
+  endDate.value = moment(today.value).add(2, "d").format("YYYY-MM-DD");
+  dayList.value = getMonthBetween(today.value, endDate.value);
 };
 getDataBetween();
 
@@ -3197,6 +3283,22 @@ const scheduleBlur = (row, date) => {
       );
   }
 };
+
+const exportExcel = () => {
+  proxy.msgTip("正在导出,请稍后", 2);
+  proxy
+    .postTwo("/produceOrderDetail/exportExcel", sourceList.value.pagination)
+    .then((res) => {
+      proxy.downloadFile(res, "生产订单.xlsx");
+    });
+};
+
+const changeRowRemark = (val, id) => {
+  proxy.post("/produceOrderDetail/editRemark", { id, remark: val }).then(
+    (res) => {},
+    (err) => {}
+  );
+};
 </script>
 
 <style lang="scss" scoped>

+ 66 - 60
src/views/finance/fundManage/flow/index.vue

@@ -443,19 +443,19 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          row.amountCny
-            ? {}
-            : {
-                attrs: {
-                  label: "汇算",
-                  type: "primary",
-                  text: true,
-                },
-                el: "button",
-                click() {
-                  settleAccounts(row);
-                },
-              },
+          // row.amountCny
+          //   ? {}
+          //   : {
+          //       attrs: {
+          //         label: "汇算",
+          //         type: "primary",
+          //         text: true,
+          //       },
+          //       el: "button",
+          //       click() {
+          //         settleAccounts(row);
+          //       },
+          //     },
           // {
           //   attrs: {
           //     label: "修改",
@@ -467,38 +467,37 @@ const config = computed(() => {
           //     update(row);
           //   },
           // },
-
-          {
-            attrs: {
-              label: "删除",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              ElMessageBox.confirm(
-                "此操作将永久删除该数据, 是否继续?",
-                "提示",
-                {
-                  confirmButtonText: "确定",
-                  cancelButtonText: "取消",
-                  type: "warning",
-                }
-              ).then(() => {
-                proxy
-                  .post("/accountRunningWater/delete", {
-                    id: row.id,
-                  })
-                  .then(() => {
-                    ElMessage({
-                      message: "删除成功",
-                      type: "success",
-                    });
-                    getList();
-                  });
-              });
-            },
-          },
+          // {
+          //   attrs: {
+          //     label: "删除",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     ElMessageBox.confirm(
+          //       "此操作将永久删除该数据, 是否继续?",
+          //       "提示",
+          //       {
+          //         confirmButtonText: "确定",
+          //         cancelButtonText: "取消",
+          //         type: "warning",
+          //       }
+          //     ).then(() => {
+          //       proxy
+          //         .post("/accountRunningWater/delete", {
+          //           id: row.id,
+          //         })
+          //         .then(() => {
+          //           ElMessage({
+          //             message: "删除成功",
+          //             type: "success",
+          //           });
+          //           getList();
+          //         });
+          //     });
+          //   },
+          // },
         ];
       },
     },
@@ -702,21 +701,28 @@ const submitForm = () => {
     if (!formData.data.amount || Number(formData.data.amount) == 0) {
       return ElMessage("交易金额不能为0");
     }
-    loadingDialog.value = true;
-    proxy.post("/accountRunningWater/" + modalType.value, formData.data).then(
-      () => {
-        ElMessage({
-          message: modalType.value == "add" ? "添加成功" : "编辑成功",
-          type: "success",
-        });
-        dialogVisible.value = false;
-        getList();
-      },
-      (err) => {
-        console.log(err);
-        loadingDialog.value = false;
-      }
-    );
+    proxy
+      .msgConfirm()
+      .then((res) => {
+        loadingDialog.value = true;
+        proxy
+          .post("/accountRunningWater/" + modalType.value, formData.data)
+          .then(
+            () => {
+              ElMessage({
+                message: modalType.value == "add" ? "添加成功" : "编辑成功",
+                type: "success",
+              });
+              dialogVisible.value = false;
+              getList();
+            },
+            (err) => {
+              console.log(err);
+              loadingDialog.value = false;
+            }
+          );
+      })
+      .catch((err) => {});
   });
 };
 

+ 373 - 0
src/views/finance/salary/become/index.vue

@@ -0,0 +1,373 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
+          {
+            text: '添加',
+            action: () => openModal('add'),
+          },
+        ]" @get-list="getList">
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="50%">
+      <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 { ElMessage, ElMessageBox } from "element-plus";
+import moment from "moment";
+
+const { proxy } = getCurrentInstance();
+const accountCurrency = ref([]);
+const typeData = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const userList = ref([]);
+const deptData = ref([]);
+const contractorData = ref([]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const loading = ref(false);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "结构名称",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "是否额外收入",
+        prop: "type",
+      },
+      render(val) {
+        return val == "1" ? "是" : "否";
+      },
+    },
+    {
+      attrs: {
+        label: "备注",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "创建时间",
+        prop: "createTime",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              update(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/salaryStructure/delete", {
+                      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("/salaryStructure/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 = () => {
+  proxy
+    .get("/tenantUser/listAll", {
+      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");
+    });
+
+  proxy
+    .post("/contractor/page", {
+      pageNum: 1,
+      pageSize: 999,
+    })
+    .then((res) => {
+      contractorData.value = res.rows.map((item) => {
+        return {
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+};
+// getDeptData();
+
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 110,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "input",
+      prop: "name",
+      itemType: "text",
+      label: "名称",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "radio",
+      prop: "type",
+      border: true,
+      label: "是否额外收入",
+      itemWidth: 100,
+      disabled: false,
+      data: [
+        { label: "是", value: "1" },
+        { label: "否", value: "0" },
+      ],
+    },
+    {
+      type: "input",
+      prop: "remark",
+      itemType: "textarea",
+      label: "备注",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  name: [{ required: true, message: "请输入名称", trigger: "blur" }],
+  type: [{ required: true, message: "请选择是否额外收入", trigger: "change" }],
+});
+const formData = reactive({
+  data: {},
+});
+const openModal = (val) => {
+  // modalType.value = val;
+  // formData.data = {
+  //   applyTime: moment().format("YYYY-MM-DD"),
+  //   companyId: proxy.useUserStore().user.companyId,
+  //   deptId: proxy.useUserStore().user.dept.deptId,
+  //   createUser: proxy.useUserStore().user.userId,
+  //   fileList: [],
+  // };
+  // loadingDialog.value = false;
+  // dialogVisible.value = true;
+
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: "education_subsidy_flow1",
+      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("/salaryStructure/" + modalType.value, formData.data).then(
+      () => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.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);
+  // proxy.post("/epibolyBill/detail", { id: row.id }).then((res) => {
+  //   formData.data = res;
+  //   proxy
+  //     .post("/fileInfo/getList", { businessIdList: [row.id] })
+  //     .then((fileObj) => {
+  //       if (fileObj[row.id] && fileObj[row.id].length > 0) {
+  //         formData.data.fileList = fileObj[row.id]
+  //           .filter((x) => x.businessType == "0")
+  //           .map((item) => {
+  //             return {
+  //               ...item,
+  //               name: item.fileName,
+  //               url: item.fileUrl,
+  //             };
+  //           });
+  //       } else {
+  //         formData.data.fileList = [];
+  //       }
+  //     });
+  // });
+  dialogVisible.value = true;
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 307 - 87
src/views/finance/salary/salaryManagement/index.vue

@@ -2,47 +2,67 @@
   <div class="pageIndexClass">
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
-          {
+        
+        ]" @get-list="getList">
+
+        <!-- {
             text: '添加',
             action: () => openModal('add'),
-          },
-        ]" @get-list="getList">
+          }, -->
+
+        <template #nickName="{item}">
+          <div style="width:100%">
+            <span class="el-click" @click="clickPrint(item)">{{item.nickName}}</span>
+          </div>
+        </template>
+
       </byTable>
     </div>
 
-    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="50%">
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="1000px">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
         <template #detail>
-          <div style="width:100%">
-            <el-button type="primary" @click="handleAdd()" plain style="margin-bottom: 16px">添加</el-button>
-            <el-table :data="formData.data.userSalaryDetailList" style="width: 100%;">
-              <el-table-column label="结构名称">
-                <template #default="{ row, $index }">
-                  <el-form-item :prop="'userSalaryDetailList.' + $index + '.salaryStructureId'" :rules="rules.salaryStructureId"
-                                :inline-message="true" class="margin-b-0">
-                    <el-select v-model="row.salaryStructureId" placeholder="请选择" filterable style="width: 100%">
-                      <el-option v-for="item in salaryStructureData" :key="item.value" :label="item.label" :value="item.value" />
-                    </el-select>
-                  </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="'userSalaryDetailList.' + $index + '.money'" :rules="rules.money" :inline-message="true"
-                                  class="margin-b-0 wid100">
-                      <el-input-number onmousewheel="return false;" v-model="row.money" 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">
-                <template #default="{ $index }">
-                  <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
-                </template>
-              </el-table-column>
-            </el-table>
+          <div style="width:100%;padding:0 40px">
+            <table border="1" style="width: 100%" class="table">
+              <tr>
+                <td rowspan="5" style="width:5%">
+                  薪资
+                </td>
+                <td :colspan="salaryStructureData.length+2">
+                  考勤结算 or 业绩/记件结算
+                </td>
+              </tr>
+              <tr>
+                <td rowspan="2" style="width:5%">考勤结算</td>
+                <td v-for="col in salaryStructureData" :key="col.value" :style="`width:${parseFloat(80/salaryStructureData.length).toFixed(2)}%`">
+                  {{col.label}}
+                </td>
+                <td style="width:10%">合计</td>
+              </tr>
+              <tr>
+                <td v-for="col in salaryStructureData" :key="col.value" :style="`width:${parseFloat(80/salaryStructureData.length).toFixed(2)}%`">
+                  <!-- {{formData.data.salaryData[col.value+'-10']}} -->
+                  <el-input-number onmousewheel="return false;" v-model="formData.data.salaryData[col.value+'-10']" placeholder=" "
+                                   style="width: 100%" :precision="2" :controls="false" :min="0" @change="changeAmount('10')" />
+                </td>
+                <td>{{formData.data.amount}}</td>
+              </tr>
+              <tr>
+                <td rowspan="2">业绩/记件结算</td>
+                <td v-for="col in salaryStructureData" :key="col.value">
+                  {{col.label}}
+                </td>
+                <td>合计</td>
+              </tr>
+              <tr>
+                <td v-for="col in salaryStructureData" :key="col.value">
+                  <!-- {{formData.data.salaryData[col.value+'-20']}} -->
+                  <el-input-number onmousewheel="return false;" v-model="formData.data.salaryData[col.value+'-20']" placeholder=" "
+                                   style="width: 100%" :precision="2" :controls="false" :min="0" @change="changeAmount('20')" />
+                </td>
+                <td>{{formData.data.perfAmount}}</td>
+              </tr>
+            </table>
           </div>
         </template>
 
@@ -95,18 +115,39 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="default">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="default">确 定</el-button>
+        <el-button type="primary" @click="submitForm()" size="default" v-if="modalType != 'detail'">确 定</el-button>
       </template>
     </el-dialog>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="920">
       <SalaryConfirmationPDF :rowData="rowData" @getList="getList"></SalaryConfirmationPDF>
     </el-dialog>
+
+    <el-dialog title="薪资变更记录" v-if="recordsDialog" v-model="recordsDialog" width="60%">
+      <el-table :data="recordsData">
+        <el-table-column prop="userName" label="员工姓名" width="110" />
+        <el-table-column prop="employeeType" label="劳动关系" width="90" :formatter="(row)=>dictValueLabel(row.employeeType,employeeTypeData)" />
+        <el-table-column prop="salaryRemark" label="薪资说明 " min-width="150" />
+        <el-table-column prop="amount" label="考勤结算金额 " width="110" />
+        <el-table-column prop="perfAmount" label="记件结算金额" width="110" />
+        <el-table-column prop="dataVer" label="版本号" width="100" />
+        <el-table-column prop="updateTime" label="变更时间" width="160" />
+        <el-table-column label="操作" width="60" align="center" fixed="right">
+          <template #default="{ row,$index }">
+            <el-button type="primary" link @click="handleGetDtl(row)">查看</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <template #footer>
+        <el-button @click="recordsDialog = false" size="default">关闭</el-button>
+      </template>
+    </el-dialog>
+
   </div>
 </template>
 
 <script setup>
-import { computed, ref } from "vue";
+import { computed, ref, watch } from "vue";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import useUserStore from "@/store/modules/user";
@@ -148,68 +189,86 @@ const config = computed(() => {
     {
       attrs: {
         label: "员工姓名",
-        prop: "nickName",
+        slot: "nickName",
       },
     },
     {
       attrs: {
-        label: "劳动关系",
-        prop: "employeeType",
-      },
-      render(val) {
-        return proxy.dictValueLabel(val, employeeTypeData.value);
+        label: "部门名称",
+        prop: "deptNames",
       },
     },
     {
       attrs: {
-        label: "试用期薪资比例",
-        prop: "probationRatio",
-      },
-      render(val) {
-        if (val) {
-          return val + "%";
-        }
+        label: "电话",
+        prop: "phonenumber",
       },
     },
     {
       attrs: {
-        label: "实习期薪资比例",
-        prop: "internshipRatio",
+        label: "劳动关系",
+        prop: "employeeType",
+        width: 100,
       },
       render(val) {
-        if (val) {
-          return val + "%";
-        }
+        return proxy.dictValueLabel(val, employeeTypeData.value);
       },
     },
+    // {
+    //   attrs: {
+    //     label: "试用期薪资比例(%)",
+    //     prop: "probationRatio",
+    //   },
+    //   render(val) {
+    //     if (val) {
+    //       return val + "%";
+    //     }
+    //   },
+    // },
+    // {
+    //   attrs: {
+    //     label: "实习期薪资比例(%)",
+    //     prop: "internshipRatio",
+    //   },
+    //   render(val) {
+    //     if (val) {
+    //       return val + "%";
+    //     }
+    //   },
+    // },
     {
       attrs: {
         label: "入职日期",
         prop: "entryDate",
+        width: 110,
       },
     },
     {
       attrs: {
         label: "生效日期",
         prop: "effectiveDate",
+        width: 110,
       },
     },
     {
       attrs: {
         label: "转正日期",
         prop: "fullTimeDate",
+        width: 110,
       },
     },
     {
       attrs: {
         label: "考勤结算金额",
         prop: "amount",
+        width: 120,
       },
     },
     {
       attrs: {
         label: "记件结算金额",
         prop: "perfAmount",
+        width: 120,
       },
     },
     // {
@@ -221,31 +280,33 @@ const config = computed(() => {
     {
       attrs: {
         label: "操作",
-        width: "120",
+        width: "160",
         align: "center",
       },
       renderHTML(row) {
         return [
+          row.fullTimeDate
+            ? {}
+            : {
+                attrs: {
+                  label: "编辑",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  update(row);
+                },
+              },
           {
             attrs: {
-              label: "修改",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              update(row);
-            },
-          },
-          {
-            attrs: {
-              label: "确认单",
+              label: "薪资变更记录",
               type: "primary",
               text: true,
             },
             el: "button",
             click() {
-              clickPrint(row);
+              clickRecords(row);
             },
           },
           // {
@@ -314,12 +375,14 @@ const getDeptData = () => {
       pageSize: 999,
     })
     .then((res) => {
-      salaryStructureData.value = res.rows.map((item) => {
-        return {
-          label: item.name,
-          value: item.id,
-        };
-      });
+      salaryStructureData.value = res.rows
+        .map((item) => {
+          return {
+            label: item.name,
+            value: item.id,
+          };
+        })
+        .reverse();
     });
 };
 getDeptData();
@@ -330,7 +393,7 @@ const loadingDialog = ref(false);
 const submit = ref(null);
 const formOption = reactive({
   inline: true,
-  labelWidth: 120,
+  labelWidth: 150,
   itemWidth: 100,
   rules: [],
 });
@@ -355,26 +418,35 @@ const formConfig = computed(() => {
       itemWidth: 50,
       disabled: false,
       data: employeeTypeData.value,
+      fn: () => {
+        changeAmount();
+      },
     },
     {
       type: "number",
       prop: "probationRatio",
-      label: "试用期薪资比例",
+      label: "试用期薪资比例(%)",
       precision: 2,
       min: 0,
       max: 100,
       controls: false,
       itemWidth: 50,
+      fn: () => {
+        changeAmount();
+      },
     },
     {
       type: "number",
       prop: "internshipRatio",
-      label: "实习期薪资比例",
+      label: "实习期薪资比例(%)",
       precision: 2,
       min: 0,
       max: 100,
       controls: false,
       itemWidth: 50,
+      fn: () => {
+        changeAmount();
+      },
     },
     {
       type: "date",
@@ -448,6 +520,13 @@ const formConfig = computed(() => {
       itemType: "textarea",
       itemWidth: 100,
     },
+    {
+      type: "upload",
+      listType: "text",
+      accept: "",
+      prop: "fileList",
+      label: "签字附件",
+    },
     // {
     //   type: "date",
     //   itemType: "datetime",
@@ -489,14 +568,14 @@ const formConfig = computed(() => {
     //   itemWidth: 50,
     //   disabled: true,
     // },
-    // {
-    //   type: "title1",
-    //   title: "薪资结构",
-    // },
-    // {
-    //   type: "slot",
-    //   slotName: "detail",
-    // },
+    {
+      type: "title1",
+      title: "薪资",
+    },
+    {
+      type: "slot",
+      slotName: "detail",
+    },
   ];
 });
 const rules = ref({
@@ -514,7 +593,7 @@ const rules = ref({
     { required: true, message: "请选择结构名称", trigger: "change" },
   ],
   money: [{ required: true, message: "请输入金额", trigger: "blur" }],
-  fileList: [{ required: true, message: "请上传签字文件", trigger: "change" }],
+  // fileList: [{ required: true, message: "请上传签字文件", trigger: "change" }],
   // remark: [{ required: true, message: "请输入说明", trigger: "blur" }],
   entryDate: [{ required: true, message: "请选择入职日期", trigger: "change" }],
   effectiveDate: [
@@ -628,6 +707,18 @@ const submitForm = () => {
     //   formData.data.afternoonBeginTime = formData.data.afternoon[0];
     //   formData.data.afternoonEndTime = formData.data.afternoon[1];
     // }
+
+    let userSalaryDetailList = [];
+    for (const key in formData.data.salaryData) {
+      let arr = key.split("-");
+      userSalaryDetailList.push({
+        salaryStructureId: arr[0],
+        type: arr[1],
+        money: formData.data.salaryData[key],
+      });
+    }
+    formData.data.userSalaryDetailList = userSalaryDetailList;
+
     loadingDialog.value = true;
     proxy.post("/userSalaryManage/edit", formData.data).then(
       () => {
@@ -670,10 +761,19 @@ const submitForm = () => {
 };
 
 const update = (row) => {
+  formOption.disabled = false;
   loadingDialog.value = false;
   modalType.value = "edit";
   proxy.post("/userSalaryManage/detail", { userId: row.userId }).then((res) => {
+    res.salaryData = {};
+    if (res.userSalaryDetailList && res.userSalaryDetailList.length > 0) {
+      for (let i = 0; i < res.userSalaryDetailList.length; i++) {
+        const row = res.userSalaryDetailList[i];
+        res.salaryData[row.salaryStructureId + "-" + row.type] = row.money;
+      }
+    }
     formData.data = res;
+
     // if (!res.morningBeginTime) {
     //   formData.data.morning = [];
     // } else {
@@ -708,8 +808,8 @@ const update = (row) => {
           formData.data.fileList = [];
         }
       });
+    dialogVisible.value = true;
   });
-  dialogVisible.value = true;
 };
 
 const openPrint = ref(false);
@@ -720,6 +820,103 @@ const clickPrint = (row) => {
   };
   openPrint.value = true;
 };
+
+const changeRatio = () => {
+  let ratio = 1;
+  if (
+    formData.data.employeeType &&
+    formData.data.internshipRatio &&
+    formData.data.probationRatio
+  ) {
+    switch (formData.data.employeeType) {
+      case "10":
+        ratio = parseFloat(formData.data.internshipRatio / 100).toFixed(2);
+        break;
+      case "20":
+        ratio = parseFloat(formData.data.probationRatio / 100).toFixed(2);
+        break;
+      default:
+        break;
+    }
+    formData.data.amount = parseFloat(
+      formData.data.amount * Number(ratio)
+    ).toFixed(2);
+    formData.data.perfAmount = parseFloat(
+      formData.data.perfAmount * Number(ratio)
+    ).toFixed(2);
+  }
+};
+
+const changeAmount = (type) => {
+  let userSalaryDetailList = [];
+  for (const key in formData.data.salaryData) {
+    let arr = key.split("-");
+    userSalaryDetailList.push({
+      salaryStructureId: arr[0],
+      type: arr[1],
+      money: formData.data.salaryData[key],
+    });
+  }
+  formData.data.userSalaryDetailList = userSalaryDetailList;
+  let amount = formData.data.userSalaryDetailList
+    .filter((x) => x.type == "10")
+    .reduce(
+      (total, x) => Number(parseFloat((total += Number(x.money))).toFixed(2)),
+      0
+    );
+  formData.data.amount = amount;
+  let perfAmount = formData.data.userSalaryDetailList
+    .filter((x) => x.type == "20")
+    .reduce(
+      (total, x) => Number(parseFloat((total += Number(x.money))).toFixed(2)),
+      0
+    );
+  formData.data.perfAmount = perfAmount;
+  changeRatio();
+};
+
+const recordsDialog = ref(false);
+const recordsData = ref([]);
+const clickRecords = (row) => {
+  recordsDialog.value = true;
+  proxy
+    .post("/userSalaryManage/getHistoryVerList", { userId: row.userId })
+    .then((res) => {
+      recordsData.value = res;
+    });
+};
+
+const handleGetDtl = (res) => {
+  formOption.disabled = true;
+  loadingDialog.value = false;
+  modalType.value = "detail";
+  res.salaryData = {};
+  if (res.userSalaryDetailList && res.userSalaryDetailList.length > 0) {
+    for (let i = 0; i < res.userSalaryDetailList.length; i++) {
+      const row = res.userSalaryDetailList[i];
+      res.salaryData[row.salaryStructureId + "-" + row.type] = row.money;
+    }
+  }
+  formData.data = res;
+  proxy
+    .post("/fileInfo/getList", { businessIdList: [res.userId] })
+    .then((fileObj) => {
+      if (fileObj[res.userId] && fileObj[res.userId].length > 0) {
+        formData.data.fileList = fileObj[res.userId]
+          .filter((x) => x.businessType == "10")
+          .map((item) => {
+            return {
+              ...item,
+              name: item.fileName,
+              url: item.fileUrl,
+            };
+          });
+      } else {
+        formData.data.fileList = [];
+      }
+    });
+  dialogVisible.value = true;
+};
 </script>
 
 <style lang="scss" scoped>
@@ -729,4 +926,27 @@ const clickPrint = (row) => {
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }
+
+.table {
+  .title {
+    font-size: 26px;
+    // font-weight: 700;
+  }
+  border-collapse: collapse;
+  border-spacing: 0;
+  width: 100%;
+  td {
+    text-align: center;
+    padding: 6px;
+    font-size: 12px;
+    // padding: 5px 10px;
+  }
+  .align-right {
+    text-align: right;
+  }
+}
+
+:deep(.table .el-input__wrapper) {
+  box-shadow: none;
+}
 </style>

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

@@ -82,6 +82,9 @@
         <ReviewForm ref="makeDom" v-else-if="flowForm.flowKey == 'contract_review_flow'" :queryData="queryData.data">
         </ReviewForm>
 
+        <Become ref="makeDom" v-else-if="flowForm.flowKey == 'education_subsidy_flow1'" :queryData="queryData.data"></Become>
+        <StartConfirm ref="makeDom" v-else-if="flowForm.flowKey == 'prod_begin_confirm_flow'" :queryData="queryData.data"></StartConfirm>
+
         <!-- 取消到账认领 -->
         <!-- <CancelClaim ref="makeDom" v-else-if="flowForm.flowKey == 'claim_del_flow'" :queryData="queryData.data"></CancelClaim> -->
       </div>
@@ -260,6 +263,8 @@ import InvoicingApplication from "@/components/process/SF/InvoicingApplication";
 import ManualWarehousing from "@/components/process/SF/ManualWarehousing";
 import ManualDelivery from "@/components/process/SF/ManualDelivery";
 import ReviewForm from "@/components/process/SF/ReviewForm";
+import StartConfirm from "@/components/process/SF/StartConfirm";
+import Become from "@/components/process/SF/Become";
 
 import PurchasePayment from "@/components/process/PurchasePayment";
 import SendFunds from "@/components/process/SendFunds";
@@ -615,6 +620,8 @@ const skipPage = () => {
     invoice_apply_flow: "InvoicingApplication",
     manual_in_stock_flow: "ManualWarehousing",
     manual_out_stock_flow: "ManualDelivery",
+    education_subsidy_flow1: "Become",
+    prod_begin_confirm_flow: "Contract",
   };
   const useTagsStore = useTagsViewStore();
   useTagsStore.delVisitedView(router.currentRoute.value);