Parcourir la source

部分新功能

cz il y a 1 an
Parent
commit
00cd58767c

+ 7 - 5
src/components/byForm/index.vue

@@ -446,11 +446,13 @@ const handleSubmit = async (onSubmit) => {
   } catch (err) {
     setTimeout(() => {
       const errorDiv = document.getElementsByClassName("is-error");
-      errorDiv[0].scrollIntoView({
-        behavior: "smooth",
-        block: "center",
-        inline: "nearest",
-      });
+      if (errorDiv && errorDiv[0]) {
+        errorDiv[0].scrollIntoView({
+          behavior: "smooth",
+          block: "center",
+          inline: "nearest",
+        });
+      }
     }, 0);
     console.log("请检查表单!", err);
     return false;

+ 50 - 13
src/components/headerBar/header-bar.vue

@@ -139,14 +139,14 @@
           </div>
           <template #dropdown>
             <el-dropdown-menu>
-              <router-link to="/user/profile">
+              <!-- <router-link to="/user/profile">
                 <el-dropdown-item>{{
                   $t("header.personalCenter")
                 }}</el-dropdown-item>
-              </router-link>
-              <el-dropdown-item command="setLayout">
+              </router-link> -->
+              <!-- <el-dropdown-item command="setLayout">
                 <span>{{ $t("header.layoutSettings") }}</span>
-              </el-dropdown-item>
+              </el-dropdown-item> -->
               <el-dropdown-item divided command="logout">
                 <span>{{ $t("header.logout") }}</span>
               </el-dropdown-item>
@@ -356,15 +356,34 @@
     </el-drawer>
 
     <el-dialog title="使用说明" v-model="plugsDialog" v-if="plugsDialog" width="40%">
-      <div style="font-size: 14px; line-height: 36px">
-        <div>1、<span style="color: red">下载插件后解压,</span>把printer文件夹拷贝到D盘下</div>
-        <div>2、打开printer文件夹,双击printer.reg安装,即完成</div>
-      </div>
-      <template #footer>
-        <el-button type="primary" @click="plugDowload()" size="default">
-          已阅读,下载
-        </el-button>
-      </template>
+      <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-change="handleTabChange">
+        <el-tab-pane label="共享文件夹插件" name="1">
+          <div style="font-size: 14px; line-height: 36px">
+            <div>1、<span style="color: red">下载插件后解压,</span>把printer文件夹拷贝到D盘下</div>
+            <div>2、打开printer文件夹,双击printer.reg安装,即完成</div>
+          </div>
+          <div style="text-align:center;margin-top:30px">
+            <el-button type="primary" @click="plugDowload()" size="default">
+              已阅读,下载
+            </el-button>
+          </div>
+        </el-tab-pane>
+        <el-tab-pane label="APP(安卓)" name="2">
+          <!-- style="text-align:center;display:flex;flex-direction:column;align-items:center" -->
+          <div>
+            <div style="color: red;margin-bottom:20px">
+              请用手机扫码下载安装
+            </div>
+            <div ref="appCode" style="width:200px;height:200px">
+            </div>
+          </div>
+        </el-tab-pane>
+        <el-tab-pane label="APP(IOS)" name="3">
+          <div style="color: red">
+            请打开App Store,搜索 “三梵科技” 下载APP
+          </div>
+        </el-tab-pane>
+      </el-tabs>
     </el-dialog>
 
   </div>
@@ -379,6 +398,8 @@ import notice from "@/components/notice/index";
 import TitleInfoOne from "@/components/TitleInfo/indexOne.vue";
 import Sortable from "sortablejs";
 import { tansParams } from "@/utils/ruoyi";
+import QRCode from "qrcodejs2-fix";
+
 const router = useRouter();
 const userStore = useUserStore();
 const { proxy } = getCurrentInstance();
@@ -390,6 +411,7 @@ const isEidtType = ref(false);
 const leftBanerType = ref(1);
 const noticeTableModal = ref(false);
 const plugsDialog = ref(false);
+const activeName = ref("1");
 const userData = ref(Cookies.get("nickName") || "");
 const commonsRouterList = ref([]);
 const activeLeftData = ref({});
@@ -428,6 +450,21 @@ const handleSearchMenu = (val) => {
     keywordRouters.value = [];
   }
 };
+const handleTabChange = (val) => {
+  if (val == "2") {
+    nextTick(() => {
+      proxy.$refs["appCode"].innerHTML = ""; //清除二维码方法一
+      new QRCode(proxy.$refs["appCode"], {
+        text: "awawawawawawawawawawawawawawawawawaw",
+        width: 200,
+        height: 200,
+        colorDark: "#000000",
+        colorLight: "#ffffff",
+        correctLevel: QRCode.CorrectLevel.H,
+      });
+    });
+  }
+};
 const openLeftBaner = (i, index) => {
   // leftBanerType.value = 1;
   activeLeftData.value = i;

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

@@ -461,6 +461,7 @@ const companyId = computed(() => proxy.useUserStore().user.companyId);
 const accountList = ref([]);
 const customerList = ref([]);
 const templateList = ref([]);
+const userList = ref([]);
 const corporationList = ref([]);
 const customerUserList = ref([]);
 const countryData = ref([]);
@@ -570,6 +571,13 @@ const formConfig = computed(() => {
       },
     },
     {
+      type: "select",
+      prop: "merchUserId",
+      label: "跟单员",
+      data: userList.value,
+      itemWidth: 50,
+    },
+    {
       type: "title",
       title: "贸易信息",
       haveLine: true,
@@ -626,6 +634,38 @@ const formConfig = computed(() => {
       itemWidth: 25,
     },
     {
+      type: "select",
+      prop: "isTax",
+      label: "是否含税",
+      data: [
+        {
+          dictKey: "1",
+          dictValue: "含税",
+        },
+        {
+          dictKey: "0",
+          dictValue: "不含税",
+        },
+      ],
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "isFreight",
+      label: "是否含运费",
+      data: [
+        {
+          dictKey: "1",
+          dictValue: "含运费",
+        },
+        {
+          dictKey: "0",
+          dictValue: "不含运费",
+        },
+      ],
+      itemWidth: 25,
+    },
+    {
       type: "input",
       prop: "remark",
       label: "付款条件",
@@ -915,6 +955,22 @@ const getDict = () => {
     .then((res) => {
       treeData.value = proxy.handleTree(res.data, "deptId");
     });
+
+  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 {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
 };
 const getCityData = (id, type, isChange) => {
   proxy.post("/customizeArea/list", { parentId: id }).then((res) => {

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

@@ -461,6 +461,7 @@ const companyId = computed(() => proxy.useUserStore().user.companyId);
 const accountList = ref([]);
 const customerList = ref([]);
 const templateList = ref([]);
+const userList = ref([]);
 const corporationList = ref([]);
 const customerUserList = ref([]);
 const countryData = ref([]);
@@ -571,6 +572,13 @@ const formConfig = computed(() => {
       },
     },
     {
+      type: "select",
+      prop: "merchUserId",
+      label: "跟单员",
+      data: userList.value,
+      itemWidth: 50,
+    },
+    {
       type: "title",
       title: "贸易信息",
       haveLine: true,
@@ -627,6 +635,38 @@ const formConfig = computed(() => {
       itemWidth: 25,
     },
     {
+      type: "select",
+      prop: "isTax",
+      label: "是否含税",
+      data: [
+        {
+          dictKey: "1",
+          dictValue: "含税",
+        },
+        {
+          dictKey: "0",
+          dictValue: "不含税",
+        },
+      ],
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "isFreight",
+      label: "是否含运费",
+      data: [
+        {
+          dictKey: "1",
+          dictValue: "含运费",
+        },
+        {
+          dictKey: "0",
+          dictValue: "不含运费",
+        },
+      ],
+      itemWidth: 25,
+    },
+    {
       type: "input",
       prop: "remark",
       label: "付款条件",
@@ -916,6 +956,22 @@ const getDict = () => {
     .then((res) => {
       treeData.value = proxy.handleTree(res.data, "deptId");
     });
+
+  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 {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
 };
 const getCityData = (id, type, isChange) => {
   proxy.post("/customizeArea/list", { parentId: id }).then((res) => {

+ 51 - 39
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -12,14 +12,14 @@
       </template>
       <template #amount="{ item }">
         <div>
-          <span style="padding-right: 4px">{{ item.currency }}</span>
-          <span>{{ moneyFormat(item.amount, 2) }}</span>
+          <!-- <span style="padding-right: 4px">{{ item.currency }}</span> -->
+          <span>{{ moneyFormat(item.amount, 2) }}</span>
         </div>
       </template>
       <template #sumPayMoney="{ item }">
         <div>
-          <span style="padding-right: 4px">{{ item.currency }}</span>
-          <span>{{ moneyFormat(item.sumPayMoney, 2) }}</span>
+          <!-- <span style="padding-right: 4px">{{ item.currency }}</span> -->
+          <span>{{ moneyFormat(item.sumPayMoney, 2) }}</span>
         </div>
       </template>
 
@@ -46,7 +46,7 @@
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
         <template #details>
           <div style="width:100%;padding:0 15px">
-            <el-table :data="formData.data.purchaseProductList">
+            <el-table :data="formData.data.arrivalDetailList">
               <el-table-column label="商品图片" width="80">
                 <template #default="{ row }">
                   <div v-if="row.fileUrl">
@@ -63,13 +63,12 @@
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column label="采购数量" prop="quantity" width="100" />
-              <el-table-column label="已到货数量" prop="quantity" width="100" />
-              <el-table-column prop="contractMoney" label="到货数量" width="130">
+              <el-table-column label="采购数量" prop="purchaseQuantity" width="100" />
+              <el-table-column label="已到货数量" prop="arrivalQuantity" width="100" />
+              <el-table-column prop="quantity" label="到货数量" width="130">
                 <template #default="{ row, $index }">
-                  <el-form-item :prop="'purchaseProductList.' + $index + '.contractMoney'" :rules="rules.contractMoney" :inline-message="true"
-                                class="margin-b-0">
-                    <el-input-number onmousewheel="return false;" v-model="row.contractMoney" placeholder="请输入" style="width: 100%" :precision="0"
+                  <el-form-item :prop="'arrivalDetailList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
                                      :controls="false" :min="0" />
                   </el-form-item>
                 </template>
@@ -523,7 +522,7 @@ const formConfig = computed(() => {
     },
     {
       type: "date",
-      prop: "aa",
+      prop: "arrivalTime",
       label: "到货日期",
       itemType: "date",
       itemWidth: 50,
@@ -539,37 +538,45 @@ const formConfig = computed(() => {
     },
   ];
 });
+
 const rules = ref({
-  productSn: [{ required: true, message: "请输入商品Sn", trigger: "blur" }],
-  type: [{ required: true, message: "请选择售后类型", trigger: "change" }],
-  remark: [{ required: true, message: "请输入售后说明", trigger: "blur" }],
-  contactName: [
-    { required: true, message: "请输入客户联系人", trigger: "blur" },
-  ],
-  contactInfo: [
-    { required: true, message: "请输入客户联系方式", trigger: "blur" },
-  ],
-  afterSalesPersonId: [
-    { required: true, message: "请选择售后人员", trigger: "change" },
+  arrivalTime: [
+    { required: true, message: "请选择到货日期", trigger: "change" },
   ],
-  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+  quantity: [{ required: true, message: "请输入到货数量", trigger: "blur" }],
 });
 
 const formDom = ref(null);
 const arrivalDialog = ref(false);
+const submitLoading = ref(false);
 const handleArrival = (row) => {
   proxy.post("/ehsdPurchase/detail", { id: row.id }).then((res) => {
-    formData.data = res;
+    formData.data = {
+      purchaseId: row.id,
+      code: row.code,
+      sellCorporationName: res.sellCorporationName,
+      arrivalDetailList: res.purchaseProductList.map((x) => ({
+        // ...x,
+        productId: x.productId,
+        productCode: x.productCode,
+        productName: x.productName,
+        productLength: x.productLength,
+        productWidth: x.productWidth,
+        productHeight: x.productHeight,
+        purchaseDetailId: x.id,
+        purchaseQuantity: x.quantity,
+        arrivalQuantity: x.arrivalQuantity,
+        quantity: null,
+      })),
+    };
     if (
-      formData.data.purchaseProductList &&
-      formData.data.purchaseProductList.length > 0
+      formData.data.arrivalDetailList &&
+      formData.data.arrivalDetailList.length > 0
     ) {
-      let productIds = formData.data.purchaseProductList.map(
-        (x) => x.productId
-      );
+      let productIds = formData.data.arrivalDetailList.map((x) => x.productId);
       proxy.getFileData({
         businessIdList: productIds,
-        data: formData.data.purchaseProductList,
+        data: formData.data.arrivalDetailList,
         att: "productId",
         businessType: "0",
         fileAtt: "fileList",
@@ -581,25 +588,30 @@ const handleArrival = (row) => {
 };
 const submitForm = () => {
   formDom.value.handleSubmit(() => {
-    submitLoading.value = true;
-    for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
-      const ele = formData.data.purchaseProductList[i];
+    let allQuantity = 0;
+    for (let i = 0; i < formData.data.arrivalDetailList.length; i++) {
+      const ele = formData.data.arrivalDetailList[i];
+      allQuantity += ele.quantity;
       if (
-        ele.quantity + ele.aaqus >
-        Number(parseFloat(Number(ele.quantity * 1.05)).toFixed(2))
+        ele.quantity + ele.arrivalQuantity >
+        Number(parseFloat(Number(ele.purchaseQuantity * 1.05)).toFixed(2))
       ) {
         return proxy.msgTip("到货量超出上限,若要接收,请另发申购单", 2);
       }
     }
-    proxy.post("/afterSalesRecord/add", formData.data).then(
+    if (!(allQuantity > 0)) {
+      return proxy.msgTip("到货总量不能为0", 2);
+    }
+    submitLoading.value = true;
+    proxy.post("/arrival/add", formData.data).then(
       (res) => {
         ElMessage({
           message: "操作成功",
           type: "success",
         });
-        dialogVisible.value = false;
+        arrivalDialog.value = false;
         submitLoading.value = false;
-        getList();
+        // getList();
       },
       (err) => {
         submitLoading.value = false;

+ 72 - 15
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -23,6 +23,12 @@
           </div>
         </template>
 
+        <template #produceStatus="{ item }">
+          <div style="width: 100%">
+            <span :class="item.produceStatus==10?'tag-active':''"> {{ dictValueLabel(item.produceStatus, produceStatusData) }}</span>
+          </div>
+        </template>
+
         <template #amount="{ item }">
           <div>
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -66,6 +72,18 @@
           </div>
         </template>
 
+        <template #deliveryTime="{ item }">
+          <div style="width: 100%;display:flex;align-items:center">
+            <el-icon v-if="item.orderDistributeStatus==1" :size="16" style="cursor:pointer;margin-right: 8px;" color="#409EFF"
+                     @click="clickDistributeProduction(item)">
+              <Edit />
+            </el-icon>
+            <div>
+              {{item.deliveryTime}}
+            </div>
+          </div>
+        </template>
+
         <template #prodTag="{ item }">
           <div style="width: 100%;display:flex;align-items:center">
             <el-icon :size="16" style="cursor:pointer;margin-right: 8px;" color="#409EFF" @click="handleEditTag(item)">
@@ -225,11 +243,7 @@
     <el-dialog :title="'生产'" v-model="productionDialog" width="700px" destroy-on-close>
       <byForm :formConfig="productionFormConfig" :formOption="formOption" v-model="formData.data" :rules="productionRules" ref="productionFormDom"
               v-loading="formLoading">
-        <template #companyName>
-          <div style="width:100%">
-            {{formData.data.companyName}}
-          </div>
-        </template>
+
       </byForm>
       <template #footer>
         <el-button @click="productionDialog =false" size="default">取 消</el-button>
@@ -286,7 +300,24 @@ const isSettled = ref([
 const shippingMethod = ref([]);
 const customerTag = ref([]);
 const openDetailsDialog = ref(false);
-
+const produceStatusData = ref([
+  {
+    label: "未开始",
+    value: "0",
+  },
+  {
+    label: "进行中",
+    value: "1",
+  },
+  {
+    label: "已完成",
+    value: "2",
+  },
+  {
+    label: "已出库",
+    value: "10",
+  },
+]);
 const status = ref([
   {
     label: "草稿",
@@ -337,6 +368,7 @@ const sourceList = ref({
     deliveryTimeSta: "",
     deliveryTimeEnd: "",
     type: route.query.pageType,
+    produceStatus: "",
   },
 });
 const loading = ref(false);
@@ -352,6 +384,11 @@ const selectConfig = computed(() => {
       prop: "companyId",
       data: companyData.value,
     },
+    // {
+    //   label: "生产状态",
+    //   prop: "produceStatus",
+    //   data: produceStatusData.value,
+    // },
     {
       label: "业务员",
       prop: "userId",
@@ -444,6 +481,17 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "生产状态",
+        prop: "produceStatus",
+        slot: "produceStatus",
+        width: 100,
+      },
+      // render(val) {
+      //   return proxy.dictValueLabel(val, produceStatusData.value);
+      // },
+    },
+    {
+      attrs: {
         label: "销售部门",
         prop: "deptName",
         width: 120,
@@ -469,8 +517,8 @@ const config = computed(() => {
     {
       attrs: {
         label: "交期",
-        prop: "deliveryTime",
-        width: 160,
+        slot: "deliveryTime",
+        width: 180,
       },
     },
     {
@@ -605,7 +653,8 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          row.status == 30 && row.orderDistributeStatus != 1
+          row.status == 30 &&
+          (row.orderDistributeStatus == 0 || row.orderDistributeStatus == 2)
             ? {
                 attrs: {
                   label: "生产",
@@ -657,7 +706,7 @@ const config = computed(() => {
                 },
               }
             : {},
-          row.status == 30
+          row.status == 30 && row.produceStatus != 10
             ? {
                 attrs: {
                   label: "变更",
@@ -835,7 +884,8 @@ const getDict = () => {
     .get("/tenantUser/list", {
       pageNum: 1,
       pageSize: 10000,
-      tenantId: useUserStore().user.tenantId,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // companyId: proxy.useUserStore().user.companyId,
     })
     .then((res) => {
       userList.value = res.rows.map((item) => {
@@ -1381,10 +1431,12 @@ const productionFormConfig = computed(() => [
   },
   {
     type: "input",
+    itemType: "textarea",
     label: "驳回原因",
-    prop: "aa",
+    prop: "rejectRemark",
     itemWidth: 100,
-    isShow: formData.data.companyName ? true : false,
+    isShow: formData.data.rejectRemark ? true : false,
+    disabled: true,
   },
   {
     type: "date",
@@ -1412,14 +1464,19 @@ const clickDistributeProduction = (row) => {
     contractId: row.id,
     deliveryPeriod: "",
     produceCompanyId: row.companyId,
-    companyName: row.quotationId ? row.companyName : "",
+    rejectRemark: row.rejectRemark,
+    orderDistributeStatus: row.orderDistributeStatus,
   };
   productionDialog.value = true;
 };
 const submitProduction = () => {
   productionFormDom.value.handleSubmit(() => {
+    let url =
+      formData.data.orderDistributeStatus == 1
+        ? "/produceOrder/editDeliveryPeriod"
+        : "/produceOrder/createOrder";
     formLoading.value = true;
-    proxy.post("/produceOrder/createOrder", formData.data).then((res) => {
+    proxy.post(url, formData.data).then((res) => {
       proxy.msgTip("操作成功");
       formLoading.value = false;
       productionDialog.value = false;

+ 1209 - 0
src/views/MES/processScheduling/index.vue

@@ -0,0 +1,1209 @@
+<template>
+  <div>
+    <div class="pageIndexClass" style="display:flex">
+      <div style="width:calc(65% - 10px);margin-right:10px">
+        <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+                 :selectConfig="selectConfig" :action-list="[ 
+              
+        ]" :table-events="{
+          //element talbe事件都能传
+          select: selectRow,
+       'select-all':selectRow
+        }" @get-list="getList">
+
+          <template #orderCode="{ item }">
+            <div style="width: 100%" class="el-click" @click="lookDetails(item)">
+              {{item.orderCode}}
+            </div>
+          </template>
+
+          <template #pic="{ item }">
+            <div v-if="item.fileList &&item.fileList.length > 0">
+              <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
+            </div>
+            <div v-else></div>
+          </template>
+
+          <template #picOne="{ item }">
+            <div v-if="item.fileListOne &&item.fileListOne.length > 0">
+              <img :src="item.fileListOne[0].fileUrl" class="pic" @click="handleClickFile(item.fileListOne[0])" />
+            </div>
+            <div v-else></div>
+          </template>
+
+          <template #size="{ item }">
+            <div v-if="item.productLength && item.productWidth && item.productHeight">
+              <span>{{ item.productLength }}</span>*
+              <span>{{ item.productWidth }}</span>*
+              <span>{{ item.productHeight }}</span>
+            </div>
+          </template>
+
+          <template #isOverdue="{item}">
+            <div style="width: 100%">
+              <span class="red" v-if="item.isOverdue=='1'"> 逾期 </span>
+            </div>
+          </template>
+
+          <template #prodTag="{ item }">
+            <div style="width: 100%">
+              <el-popover placement="top-start" :width="300" trigger="hover">
+                <div>
+                  备注:{{item.prodRemark}}
+                </div>
+                <template #reference>
+                  <div style="width:100%;display:inline-block">
+                    <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.prodTags" :key="index">
+                      {{ dictKeyValue(tag, contractTag) }}
+                    </el-tag>
+                  </div>
+                </template>
+              </el-popover>
+            </div>
+          </template>
+
+          <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
+            <div style="width:100%">
+              <span v-if="isShowCotent(slotItem,item)" style="font-weight:700;min-width:50px;line-height:18px;display:inline-block"
+                    :class="showCotentQuantity(slotItem,item)">
+                {{showCotent(slotItem,item)}}
+              </span>
+              <div v-else class="no-bk">
+                -
+              </div>
+            </div>
+          </template>
+        </byTable>
+      </div>
+      <div style="width:35%">
+        <div class="schedule-right">
+          <div class="schedule-top">
+            <el-row>
+              <!-- <el-col :span="10" style="text-align: left">
+            <el-select v-model="status" style="width: 110px">
+              <el-option v-for="item in tableStatus" :key="item.value" :label="item.label" :value="item.value" />
+            </el-select>
+            <el-button type="info" style="margin-left: 8px" @click="clickToday()" plain>今日</el-button>
+          </el-col> -->
+              <el-col :span="24" style="text-align: center; height: 32px; line-height: 32px">
+                <div style="display: flex; justify-content: space-between">
+                  <el-button @click="clickToday()" plain>今日</el-button>
+                  <el-button :icon="ArrowLeftBold" @click="prevMonth()" />
+                  <span style="font-weight: 700">{{ month }}</span>
+                  <el-button :icon="ArrowRightBold" @click="nextMonth()" />
+                </div>
+              </el-col>
+              <!-- <el-col :span="10" style="text-align: right">
+            <el-button type="primary" @click="newSchedule()">新建日程</el-button>
+          </el-col> -->
+            </el-row>
+          </div>
+          <div class="schedule-bottom">
+            <el-calendar v-model="today" ref="calendar">
+              <template #date-cell="{ data }">
+                <div>
+                  <div style="font-size:14px;text-align:center;">
+                    {{ data.day.substr(8, 10) }}
+                  </div>
+                  <div style="width:100%">
+                    <div v-for="item in processesData" :key="item.id">
+                      {{item.name}}:99999
+                    </div>
+                  </div>
+                  <!-- <el-popover placement="left" :width="400" style="height" trigger="hover" @show="onShow(data.day)">
+                    <template #reference>
+                      <div v-if="isShow(data.day)">
+                        <div style="height:5px;margin-bottom:5px;border-radius:2px" v-for="(item,index) in judgeDay(data.day)" :key="index"
+                             :style="{ background: colorData[item]}">
+                        </div>
+                      </div>
+                    </template>
+                    <div style="height:500px;overflow:auto">
+                      <div v-for="item in showData" :key="item" style="margin-bottom:20px">
+                        <div style="display:flex">
+                          <div>颜色:</div>
+                          <div :style="{ background: colorData[item]}" style="width:20px;height:20px;border-radius:10px"></div>
+                        </div>
+                        <div>
+                          订单号:<span v-if="rightDataObj[item]">{{rightDataObj[item]['code']}}</span>
+                        </div>
+                        <div>
+                          产品:<span v-if="rightDataObj[item]">{{rightDataObj[item]['productName']}}</span>
+                        </div>
+                      </div>
+                    </div>
+                  </el-popover> -->
+                </div>
+              </template>
+            </el-calendar>
+          </div>
+        </div>
+      </div>
+    </div>
+    <el-dialog :title="'打印任务单'" v-model="dialogVisible" width="840px" destroy-on-close :before-close="beforeClose">
+      <div style="height:calc(100vh - 280px);overflow:auto;padding: 0 10px">
+        <div id="pdfDom" style="width:100%">
+          <!-- <div style="font-size:20px;text-align:center">
+            {{printData.name}}
+          </div> -->
+          <div v-for="item in printList" :key="item.id" style="margin-bottom:20px">
+            <div style="font-size:32px;font-weight:700;color:#000;text-align:center">
+              生产任务单
+            </div>
+            <div style="float:right;margin: 20px 0px 5px 0;">
+              {{printTime}}
+            </div>
+            <table class="table" border>
+              <tr>
+                <td style="width:25%">
+                  <div :ref="item.id">
+                  </div>
+                </td>
+                <td style="width:75%">
+                  <div style="display:flex;margin-bottom:10px">
+                    <div style="width:50%">
+                      <div class="top-title">
+                        订单号
+                      </div>
+                      <div>
+                        {{item.orderCode}}
+                      </div>
+                    </div>
+                    <div style="width:50%">
+                      <div class="top-title">
+                        交期
+                      </div>
+                      <div v-if="item.deliveryPeriod">
+                        {{item.deliveryPeriod.substr(0,10)}}
+                      </div>
+                    </div>
+                  </div>
+                  <div style="display:flex;margin-bottom:10px">
+                    <div style="width:50%">
+                      <div class="top-title">
+                        产品编码
+                      </div>
+                      <div>
+                        {{item.productCode}}
+                      </div>
+                    </div>
+                    <div style="width:50%">
+                      <div class="top-title">
+                        生产数量
+                      </div>
+                      <div>
+                        {{item.quantity}}
+                      </div>
+                    </div>
+                  </div>
+                  <div style="margin-bottom:10px">
+                    <div class="top-title">
+                      产品名称
+                    </div>
+                    <div>
+                      {{item.productName}}
+                    </div>
+                  </div>
+                  <div style="margin-bottom:10px">
+                    <div class="top-title">
+                      产品尺寸(cm)
+                    </div>
+                    <div>
+                      {{item.productLength}} * {{item.productWidth}} * {{item.productHeight}}
+                    </div>
+                  </div>
+                </td>
+              </tr>
+              <tr>
+                <td style="text-align:center" rowspan="4">
+                  <div>
+                    <div style="font-weight:700">产品图</div>
+                    <img v-if="item.fileList &&item.fileList.length > 0" class="bigImg" :src="item.fileList[0].fileUrl" alt="">
+                  </div>
+                  <div style="margin-top:20px">
+                    <div style="font-weight:700">设计图</div>
+                    <img v-if="item.fileListOne &&item.fileListOne.length > 0" class="bigImg" :src="item.fileListOne[0].fileUrl" alt="">
+                  </div>
+                </td>
+                <td style="height:60px;vertical-align:top">
+                  <div>
+                    <div class="top-title">
+                      产品备注
+                    </div>
+                    <div>
+                      {{item.productRemark}}
+                    </div>
+                  </div>
+                </td>
+              </tr>
+              <tr>
+                <td style="height:60px;vertical-align:top">
+                  <div class="top-title">
+                    生产工序
+                  </div>
+                  <div>
+                    <!-- <el-checkbox v-for="proess in item.productionTaskProgressList" :key="proess.processesId" :label="proess.progressName"
+                                 size="small" /> -->
+                    <span v-for="(proess,index) in item.productionTaskProgressList" :key="proess.processesId">{{proess.progressName}} <span
+                            v-if="index<item.productionTaskProgressList.length-1"> > </span> </span>
+                  </div>
+                </td>
+              </tr>
+              <tr>
+                <td style="height:107px">
+                  <div style="margin-bottom:10px">
+                    <div class="top-title">
+                      原材料编码
+                    </div>
+                    <div>
+                      {{item.rawMaterialCode}}
+                    </div>
+                  </div>
+                  <div>
+                    <div class="top-title">
+                      原材料名称
+                    </div>
+                    <div>
+                      {{item.rawMaterialName}}
+                    </div>
+                  </div>
+                </td>
+              </tr>
+              <tr>
+                <td style="vertical-align:top">
+                  <div class="top-title">BOM</div>
+                  <div>
+                    <table border class="table son">
+                      <tr>
+                        <td style="width:85%">名称</td>
+                        <!-- <td style="width:15%">单价</td> -->
+                        <td style="width:15%">数量</td>
+                      </tr>
+                      <tr v-for="son in item.contractProductBomList" :key="son.id">
+                        <td>
+                          <div>
+                            {{son.productCode}}
+                          </div>
+                          <div>
+                            {{son.productName}}
+                          </div>
+                        </td>
+                        <!-- <td>{{son.price}}</td> -->
+                        <td>{{son.quantity}}</td>
+                      </tr>
+                    </table>
+                  </div>
+                </td>
+              </tr>
+
+            </table>
+            <div style="page-break-after: always"></div>
+          </div>
+        </div>
+      </div>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="defualt">取 消</el-button>
+        <el-button type="primary" v-print="printObj" size="defualt">打 印</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="备注" v-model="remarkDialog" width="500" destroy-on-close v-if="remarkDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+      </byForm>
+      <template #footer>
+        <el-button @click="remarkDialog = false" size="defualt" v-debounce>取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="defualt" v-debounce>
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="记录查看" v-model="recordDialog" width="70%" destroy-on-close v-if="recordDialog">
+      <byForm :formConfig="recordFormConfig" :formOption="recordFormOption" v-model="formData.recordData">
+        <template #detail1>
+          <div style="width:100%">
+            a
+          </div>
+        </template>
+        <template #detail2>
+          <div style="width:100%">
+            b
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="recordDialog = false" size="defualt" v-debounce>关闭</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import QRCode from "qrcodejs2-fix";
+import moment from "moment";
+import { ArrowLeftBold, ArrowRightBold } from "@element-plus/icons-vue";
+
+const { proxy } = getCurrentInstance();
+const contractTag = computed(
+  () => proxy.useUserStore().allDict["contract_prod_tag"]
+);
+const companyData = ref([]);
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    produceStatus: "",
+    staDeliveryPeriod: "",
+    endDeliveryPeriod: "",
+    beginTime: "",
+    endTime: "",
+    isOverdue: "",
+  },
+});
+const treeData = ref([]);
+const dialogVisible = ref(false);
+const remarkDialog = ref(false);
+
+const modalType = ref("add");
+const statusData = ref([
+  {
+    label: "未开始",
+    value: "0",
+  },
+  {
+    label: "进行中",
+    value: "1",
+  },
+  {
+    label: "已完成",
+    value: "2",
+  },
+]);
+
+const isOverdueData = ref([
+  {
+    label: "是",
+    value: "1",
+  },
+  {
+    label: "否",
+    value: "0",
+  },
+]);
+
+const selectConfig = computed(() => [
+  // {
+  //   label: "生产公司",
+  //   prop: "companyId",
+  //   data: companyData.value,
+  // },
+  {
+    label: "生产状态",
+    prop: "produceStatus",
+    data: statusData.value,
+  },
+  {
+    label: "是否逾期",
+    prop: "isOverdue",
+    data: isOverdueData.value,
+  },
+  {
+    type: "time",
+    label: "交期",
+    placeholder: "开始日期",
+    prop: "staDeliveryPeriod",
+    placeholderOne: "结束日期",
+    propOne: "endDeliveryPeriod",
+  },
+  // {
+  //   type: "time",
+  //   label: "下单日期",
+  //   placeholder: "开始日期",
+  //   prop: "beginTime",
+  //   placeholderOne: "结束日期",
+  //   propOne: "endTime",
+  // },
+]);
+const config = ref([
+  // {
+  //   type: "selection",
+  //   attrs: {
+  //     checkAtt: "isCheck",
+  //     width: 60,
+  //   },
+  // },
+  // {
+  //   attrs: {
+  //     label: "操作",
+  //     width: "160",
+  //     align: "left",
+  //     // fixed: "right",
+  //   },
+  //   renderHTML(row) {
+  //     return [
+  //       {
+  //         attrs: {
+  //           label: "打印任务单",
+  //           type: "primary",
+  //           text: true,
+  //         },
+  //         el: "button",
+  //         click() {
+  //           printQrCode(row);
+  //         },
+  //       },
+  //       {
+  //         attrs: {
+  //           label: "备注",
+  //           type: "primary",
+  //           text: true,
+  //         },
+  //         el: "button",
+  //         click() {
+  //           openRemark(row);
+  //         },
+  //       },
+  //     ];
+  //   },
+  // },
+  {
+    attrs: {
+      label: "生产公司",
+      prop: "companyName",
+      width: 100,
+      // align: "center",
+    },
+  },
+  {
+    attrs: {
+      label: "订单号",
+      slot: "orderCode",
+      width: 130,
+    },
+  },
+  {
+    attrs: {
+      label: "产品图片",
+      slot: "pic",
+      width: 80,
+    },
+  },
+  {
+    attrs: {
+      label: "设计图",
+      slot: "picOne",
+      width: 80,
+    },
+  },
+  {
+    attrs: {
+      label: "产品编码",
+      prop: "productCode",
+      width: 130,
+    },
+  },
+  {
+    attrs: {
+      label: "产品名称",
+      prop: "productName",
+      "min-width": 200,
+    },
+  },
+  {
+    attrs: {
+      label: "产品尺寸 (cm)",
+      slot: "size",
+      width: 160,
+    },
+  },
+  {
+    attrs: {
+      label: "产品颜色",
+      prop: "productColor",
+      width: 80,
+    },
+  },
+  {
+    attrs: {
+      label: "生产件数",
+      prop: "quantity",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
+      label: "已完成",
+      prop: "finishQuantity",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
+      label: "未完成",
+      prop: "incomplete",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
+      label: "生产状态",
+      prop: "produceStatus",
+      width: 100,
+    },
+    render(val) {
+      return proxy.dictValueLabel(val, statusData.value);
+    },
+  },
+  {
+    attrs: {
+      label: "是否逾期",
+      slot: "isOverdue",
+      width: 80,
+    },
+  },
+  {
+    attrs: {
+      label: "生产指示",
+      slot: "prodTag",
+      "min-width": 220,
+    },
+  },
+  {
+    attrs: {
+      label: "下单时间",
+      prop: "orderCreateTime",
+      width: 160,
+    },
+  },
+  {
+    attrs: {
+      label: "交期",
+      prop: "deliveryPeriod",
+      width: 160,
+    },
+  },
+  {
+    attrs: {
+      label: "投产时间",
+      prop: "produceTime",
+      width: 160,
+    },
+  },
+  {
+    attrs: {
+      label: "完成时间",
+      prop: "finishTime",
+      width: 160,
+    },
+  },
+
+  {
+    attrs: {
+      label: "生产用时",
+      prop: "usageTime",
+      width: 100,
+    },
+  },
+  {
+    attrs: {
+      label: "备注",
+      prop: "remark",
+      "min-width": 200,
+    },
+  },
+]);
+const formData = reactive({
+  data: {},
+  recordData: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "remark",
+      itemType: "textarea",
+      label: "备注",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  remark: [{ required: true, message: "请输入备注", trigger: "blur" }],
+});
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/produceOrderDetail/page", sourceList.value.pagination)
+    .then((res) => {
+      res.rows.forEach((x) => {
+        if (x.prodTag) {
+          x.prodTags = x.prodTag.split(",");
+        } else {
+          x.prodTags = [];
+        }
+        x.incomplete = x.quantity - x.finishQuantity;
+      });
+      sourceList.value.data = res.rows.map((x) => ({ ...x, isCheck: true }));
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+      const productIdList = res.rows.map((x) => x.productId);
+      // 请求文件数据并回显
+      if (productIdList.length > 0) {
+        // proxy.getFile(productIdList, sourceList.value.data, "productId");
+        proxy
+          .post("/fileInfo/getList", { businessIdList: productIdList })
+          .then((fileObj) => {
+            for (let i = 0; i < sourceList.value.data.length; i++) {
+              const ele = sourceList.value.data[i];
+              for (const key in fileObj) {
+                if (
+                  ele.productId == key &&
+                  fileObj[ele.productId] &&
+                  fileObj[ele.productId].length > 0
+                ) {
+                  ele.fileList = fileObj[ele.productId].filter(
+                    (x) => x.businessType == "0"
+                  );
+                }
+              }
+            }
+          });
+      }
+
+      const productIdListOne = res.rows.map((x) => x.contractDetailId);
+      // 请求文件数据并回显
+      if (productIdListOne.length > 0) {
+        proxy
+          .post("/fileInfo/getList", { businessIdList: productIdListOne })
+          .then((fileObj) => {
+            for (let i = 0; i < sourceList.value.data.length; i++) {
+              const ele = sourceList.value.data[i];
+              for (const key in fileObj) {
+                if (
+                  ele.contractDetailId == key &&
+                  fileObj[ele.contractDetailId] &&
+                  fileObj[ele.contractDetailId].length > 0
+                ) {
+                  ele.fileListOne = fileObj[ele.contractDetailId].filter(
+                    (x) => x.businessType == "0"
+                  );
+                }
+              }
+            }
+          });
+        // proxy.getFile(
+        //   productIdListOne,
+        //   sourceList.value.data,
+        //   "contractDetailId",
+        //   "fileListOne"
+        // );
+      }
+    });
+};
+
+const printList = ref([]);
+
+const selectIds = ref([]);
+const selectRow = (data) => {
+  selectIds.value = data.map((x) => x.id);
+};
+const printTime = ref("");
+const openModal = () => {
+  proxy.msgTip("请稍后", 2);
+  proxy
+    .post("/produceOrderDetail/detailByIds", { taskIds: selectIds.value })
+    .then((res) => {
+      printList.value = res;
+      for (let i = 0; i < printList.value.length; i++) {
+        const iele = printList.value[i];
+        for (let j = 0; j < sourceList.value.data.length; j++) {
+          const jele = sourceList.value.data[j];
+          if (iele.id == jele.id) {
+            iele.fileList = jele.fileList;
+            iele.fileListOne = jele.fileListOne;
+            break;
+          }
+        }
+      }
+      printTime.value = moment().format("yyyy-MM-DD HH:mm:ss");
+      dialogVisible.value = true;
+      nextTick(() => {
+        for (let i = 0; i < printList.value.length; i++) {
+          const row = printList.value[i];
+          proxy.$refs[row.id][0].innerHTML = ""; //清除二维码方法一
+          new QRCode(proxy.$refs[row.id][0], {
+            text: row.id,
+            width: 200,
+            height: 200,
+            colorDark: "#000000",
+            colorLight: "#ffffff",
+            correctLevel: QRCode.CorrectLevel.H,
+          });
+        }
+      });
+    });
+};
+
+const submitForm = () => {
+  formDom.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/produceOrderDetail/editRemark", formData.data).then(
+      (res) => {
+        proxy.msgTip("操作成功", 1);
+        remarkDialog.value = false;
+        submitLoading.value = false;
+        getList();
+      },
+      (err) => {
+        submitLoading.value = false;
+      }
+    );
+  });
+};
+
+const getDtl = (row) => {
+  modalType.value = "edit";
+  proxy.post("/shopInfo/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+const processesData = ref([]);
+const getProcesses = () => {
+  proxy
+    .post("/productionProcesses/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      for (let i = 0; i < res.rows.length; i++) {
+        const ele = res.rows[i];
+        let attrs = {
+          label: `[ ${ele.name} ]`,
+          slot: ele.id,
+          isNeedHeaderSlot: false,
+          width: 90,
+          align: "center",
+          fixed: "right",
+        };
+        config.value.push({
+          attrs,
+        });
+      }
+
+      // config.value.push({
+      //   attrs: {
+      //     label: "操作",
+      //     width: "160",
+      //     align: "center",
+      //     fixed: "right",
+      //   },
+      //   renderHTML(row) {
+      //     return [
+      //       {
+      //         attrs: {
+      //           label: "打印任务单",
+      //           type: "primary",
+      //           text: true,
+      //         },
+      //         el: "button",
+      //         click() {
+      //           printQrCode(row);
+      //         },
+      //       },
+      //       {
+      //         attrs: {
+      //           label: "备注",
+      //           type: "primary",
+      //           text: true,
+      //         },
+      //         el: "button",
+      //         click() {
+      //           openRemark(row);
+      //         },
+      //       },
+      //     ];
+      //   },
+      // });
+      processesData.value = res.rows;
+    });
+};
+getProcesses();
+getList();
+const printType = ref(false);
+
+const printQrCode = (row) => {
+  printType.value = true;
+  selectIds.value = [row.id];
+  openModal();
+};
+const beforeClose = () => {
+  if (printType.value) {
+    selectIds.value = [];
+  }
+  dialogVisible.value = false;
+};
+const printObj = ref({
+  id: "pdfDom",
+  popTitle: "",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
+
+const handleClickFile = (file) => {
+  window.open(file.fileUrl, "_blank");
+};
+
+const isShowCotent = (slot, item) => {
+  if (item && item.productionTaskProgressList) {
+    return item.productionTaskProgressList.some(
+      (x) => x.processesId == slot.id
+    );
+  } else {
+    return false;
+  }
+};
+const showCotent = (slot, item) => {
+  if (item && item.productionTaskProgressList) {
+    const current = item.productionTaskProgressList.find(
+      (x) => x.processesId == slot.id
+    );
+    if (current) {
+      return current.finishQuantity;
+    }
+  } else {
+    return false;
+  }
+};
+
+const showCotentQuantity = (slot, item) => {
+  if (item && item.productionTaskProgressList) {
+    const current = item.productionTaskProgressList.find(
+      (x) => x.processesId == slot.id
+    );
+    if (current && Number(current.finishQuantity) > 0) {
+      if (Number(current.finishQuantity) >= item.quantity) {
+        return "tag-active";
+      } else if (Number(current.finishQuantity) < item.quantity) {
+        return "tag-active-1";
+      }
+    }
+  }
+};
+
+const getDict = () => {
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
+    .then((res) => {
+      companyData.value = res.data.map((x) => ({
+        ...x,
+        label: x.deptName,
+        value: x.deptId,
+      }));
+      // treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDict();
+
+const openRemark = (row) => {
+  formData.data = {
+    id: row.id,
+    remark: row.remark,
+  };
+  remarkDialog.value = true;
+};
+const recordDialog = ref(false);
+const recordFormOption = reactive({
+  inline: true,
+  labelWidth: 40,
+  itemWidth: 100,
+});
+const recordFormConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "采购记录",
+    },
+    {
+      type: "slot",
+      slotName: "detail1",
+      label: " ",
+    },
+    {
+      type: "title1",
+      title: "出入库流水记录",
+    },
+    {
+      type: "slot",
+      slotName: "detail2",
+      label: " ",
+    },
+  ];
+});
+const lookDetails = (item) => {
+  recordDialog.value = true;
+};
+const today = ref(moment().format("yyyy-MM-DD"));
+const dateList = ref({});
+const month = ref(moment().format("yyyy年MM月"));
+const monthOne = ref(moment().format("yyyy-MM"));
+
+const calendar = ref(null);
+const rightData = ref([]);
+const rightDataObj = ref({});
+const colorData = ref({});
+let colorList = [
+  "#BBFF00",
+  "#FFFF00",
+  "#FFBB00",
+  "#FF3333",
+  "#D28EFF",
+  "#CCEEFF",
+  "#FFC8B4",
+  "#CCDDFF",
+  "#007799",
+  "#550088",
+  "#AAFFEE",
+  "#FFB3FF",
+  "#FFFF33",
+];
+const getRightData = () => {
+  proxy
+    .post("/produceOrder/schedulingList", {
+      beginDate: monthOne.value,
+      companyId: sourceList.value.pagination.companyId,
+    })
+    .then(
+      (res) => {
+        rightDataObj.value = {};
+        rightData.value = res.map((x, index) => ({
+          ...x,
+          produceTimeOne: x.produceTime,
+          produceTime: x.produceTime.substr(0, 10),
+          deliveryPeriod: x.deliveryPeriod.substr(0, 10),
+        }));
+
+        for (let i = 0; i < res.length; i++) {
+          const ele = res[i];
+          rightDataObj.value[ele.id] = ele;
+          if (i <= 12) {
+            colorData.value[ele.id] = colorList[i];
+          } else {
+            let index = Math.floor(i % 12);
+            colorData.value[ele.id] = colorList[index];
+          }
+        }
+      },
+      (err) => {
+        loading.value = false;
+      }
+    );
+};
+getRightData();
+
+const clickToday = () => {
+  today.value = moment().format("yyyy-MM-DD");
+  month.value = moment().format("yyyy年MM月");
+  monthOne.value = moment().format("yyyy-MM");
+  getRightData();
+};
+
+const isShow = (day) => {
+  let nowDay = new Date(day + " 23:59:59").getTime();
+  let flag = false;
+  for (let i = 0; i < rightData.value.length; i++) {
+    const e = rightData.value[i];
+    let startDay = new Date(e.produceTime).getTime();
+    let endDay = new Date(e.deliveryPeriod + " 23:59:59").getTime();
+    if (nowDay >= startDay && nowDay <= endDay) {
+      flag = true;
+      break;
+    }
+  }
+  return flag;
+};
+
+const judgeDay = (day) => {
+  // return dateList.value[day] && dateList.value[day].length > 0;
+  let nowDay = new Date(day + " 23:59:59").getTime();
+  let rows = [];
+  for (let i = 0; i < rightData.value.length; i++) {
+    const e = rightData.value[i];
+    let startDay = new Date(e.produceTime).getTime();
+    let endDay = new Date(e.deliveryPeriod + " 23:59:59").getTime();
+    if (nowDay >= startDay && nowDay <= endDay) {
+      rows.push(e.id);
+    }
+  }
+  return rows;
+};
+
+const showData = ref([]);
+const onShow = (day) => {
+  let rows = judgeDay(day);
+  showData.value = rows;
+};
+
+const getData = (id, att) => {
+  const current = rightData.value.find((x) => x.id == id);
+  if (current && current[att]) {
+    return current[att];
+  }
+};
+
+const selectDate = (val) => {
+  calendar.value.selectDate(val);
+};
+
+const prevMonth = () => {
+  month.value = moment(
+    moment(month.value, "yyyy年MM月").add(-1, "month").calendar()
+  ).format("yyyy年MM月");
+  monthOne.value = moment(moment(month.value, "yyyy年MM月")).format("yyyy-MM");
+  selectDate("prev-month");
+  getRightData();
+};
+const nextMonth = () => {
+  month.value = moment(
+    moment(month.value, "yyyy年MM月").add(+1, "month").calendar()
+  ).format("yyyy年MM月");
+  monthOne.value = moment(moment(month.value, "yyyy年MM月")).format("yyyy-MM");
+  selectDate("next-month");
+  getRightData();
+};
+
+watch(
+  () => today.value,
+  (newValue) => {
+    if (month.value !== moment(newValue).format("yyyy年MM月")) {
+      month.value = moment(newValue).format("yyyy年MM月");
+      monthOne.value = moment(moment(month.value, "yyyy年MM月")).format(
+        "yyyy-MM"
+      );
+      getRightData();
+    }
+  }
+);
+</script>
+
+<style lang="scss" scoped>
+::v-deep(.el-progress__text) {
+  font-size: 14px !important;
+}
+.content {
+  padding: 20px;
+}
+.pic {
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+  width: 100%;
+  td {
+    text-align: left;
+    padding: 10px;
+    font-size: 13px;
+    // padding: 5px 10px;
+    .top-title {
+      font-weight: 700;
+      margin-bottom: 5px;
+    }
+    .bigImg {
+      object-fit: contain;
+      width: 160px;
+      height: 320px;
+      cursor: pointer;
+      margin-top: 10px;
+      vertical-align: middle;
+    }
+  }
+}
+.son {
+  td {
+    text-align: left;
+    padding: 5px !important;
+  }
+}
+.no-bk {
+  // background: #f3f3f3;
+  // height: 50px;
+}
+.red {
+  background: red;
+  border-radius: 2px;
+  padding: 4px;
+  color: #fff;
+}
+
+.schedule-right {
+  // width: 400px;
+  .schedule-top {
+    width: 100%;
+    background: #fff;
+    padding: 20px;
+  }
+  .schedule-bottom {
+    width: 100%;
+    background: #fff;
+    height: calc(100vh - 100px - 20px - 83px);
+    padding: 10px;
+    margin-top: 10px;
+    overflow-y: auto;
+    &::-webkit-scrollbar {
+      width: 0px;
+    }
+
+    .line-class {
+      height: 18px;
+      line-height: 18px;
+      overflow: hidden;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+      -o-text-overflow: ellipsis;
+      margin: 1px 0;
+    }
+  }
+}
+
+::v-deep(.el-calendar__header) {
+  display: none;
+}
+::v-deep(.el-calendar__body) {
+  padding: 0;
+}
+::v-deep(.el-calendar-table .el-calendar-day) {
+  // padding: 0;
+  // min-height: 50px;
+  font-size: 12px;
+  // min-height: calc((100vh - 100px - 20px - 83px - 80px) / 5);
+  height: auto;
+  overflow-y: hidden;
+}
+</style>

+ 33 - 23
src/views/MES/productionOrder/index.vue

@@ -138,13 +138,13 @@
     </el-dialog>
 
     <el-dialog :title="'确认交期'" v-model="confirmDialog" width="500px" destroy-on-close>
-      <byForm :formConfig="confirmFormConfig" :formOption="confirmFormOption" v-model="formData.dataOne" :rules="confirmRules" ref="confirmDom"
+      <byForm :formConfig="confirmFormConfig" :formOption="confirmFormOption" v-model="formData.dataOne" :rules="confirmRules" ref="confirmFormDom"
               v-loading="formLoading">
       </byForm>
       <template #footer>
         <el-button @click="confirmDialog =false" size="default" v-debounce>取 消</el-button>
-        <el-button @click="submitConfirm(true)" type="danger" size="default" v-debounce>驳 回</el-button>
-        <el-button @click="submitConfirm(false)" type="primary" size="default" v-debounce>提 交</el-button>
+        <el-button @click="submitConfirm('2')" type="danger" size="default" v-debounce>驳 回</el-button>
+        <el-button @click="submitConfirm('1')" type="primary" size="default" v-debounce>提 交</el-button>
       </template>
     </el-dialog>
 
@@ -298,6 +298,10 @@ const statusData = ref([
     label: "已完成",
     value: "2",
   },
+  {
+    label: "已出库",
+    value: "10",
+  },
 ]);
 
 const isOverdueData = ref([
@@ -433,9 +437,8 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          row.produceTime || !proxy.isCurrentCompanyData(row.companyId)
-            ? {}
-            : {
+          row.confirmStatus == "1" && proxy.isCurrentCompanyData(row.companyId)
+            ? {
                 attrs: {
                   label: "投产",
                   type: "primary",
@@ -445,10 +448,10 @@ const config = computed(() => {
                 click() {
                   clickDistributeProduction(row);
                 },
-              },
-          row.produceTime || !proxy.isCurrentCompanyData(row.companyId)
-            ? {}
-            : {
+              }
+            : {},
+          row.confirmStatus == "0" && proxy.isCurrentCompanyData(row.companyId)
+            ? {
                 attrs: {
                   label: "确认交期",
                   type: "primary",
@@ -458,7 +461,8 @@ const config = computed(() => {
                 click() {
                   confirmDeliveryTime(row);
                 },
-              },
+              }
+            : {},
         ];
       },
     },
@@ -929,7 +933,7 @@ const confirmFormConfig = computed(() => [
     type: "input",
     itemType: "textarea",
     label: "退回原因",
-    prop: "aa",
+    prop: "rejectRemark",
     // placeholder: "合同开始时间",
     itemWidth: 100,
     // clearable: true,
@@ -942,25 +946,31 @@ const confirmRules = ref({});
 const confirmDeliveryTime = (row) => {
   formData.dataOne = {
     id: row.id,
-    aa: "",
+    rejectRemark: "",
+    confirmStatus: "",
   };
 
   confirmDialog.value = true;
 };
 
-const submitConfirm = () => {
+const submitConfirm = (type) => {
   confirmFormDom.value.handleSubmit(() => {
-    if (!formData.dataOne.aa) {
-      return proxy.msgTip("请填写退回原因", 2);
+    formData.dataOne.confirmStatus = type;
+    if (type == "2") {
+      if (!formData.dataOne.rejectRemark) {
+        return proxy.msgTip("请填写退回原因", 2);
+      }
     }
     formLoading.value = true;
-    proxy.post("/produceOrder/putProduction", formData.data).then((res) => {
-      proxy.msgTip("操作成功");
-      formLoading.value = false;
-      confirmDialog.value = false;
-      getList();
-      getRightData();
-    });
+    proxy
+      .post("/produceOrder/deliveryConfirm", formData.dataOne)
+      .then((res) => {
+        proxy.msgTip("操作成功");
+        formLoading.value = false;
+        confirmDialog.value = false;
+        getList();
+        getRightData();
+      });
   });
 };
 </script>

+ 8 - 0
src/views/MES/productionTask/index.vue

@@ -420,6 +420,14 @@ const config = ref([
   },
   {
     attrs: {
+      label: "业务员",
+      prop: "saleUserName",
+      width: 100,
+      // align: "center",
+    },
+  },
+  {
+    attrs: {
       label: "订单号",
       slot: "orderCode",
       width: 130,

+ 1 - 0
src/views/index.vue

@@ -134,6 +134,7 @@
             <el-table-column prop="productCode" label="产品编码" />
             <el-table-column prop="productName" label="产品名称" />
             <el-table-column prop="stockThreshold" label="安全库存" width="100" />
+            <el-table-column prop="quantity" label="当前库存" width="100" />
           </el-table>
         </el-card>
       </div>

+ 1 - 0
src/views/process/processConfig/vueFlow.vue

@@ -948,6 +948,7 @@ const getFlowInfo = () => {
       proxy.$emit("changeTitle", res.titleTemplate);
       if (res.lineObject) {
         flowDefinitionNodeObj.value = JSON.parse(res.lineObject);
+        dataRollback();
         for (const key in flowDefinitionNodeObj.value) {
           if (flowDefinitionNodeObj.value[key].nodeButtonSet) {
             flowDefinitionNodeObj.value[key].nodeButtonSet =

+ 3 - 3
src/views/production/project/technology/index.vue

@@ -307,11 +307,11 @@ const formConfig = computed(() => {
       label: "批量模式",
       data: [
         {
-          dictKey: 0,
+          dictKey: "0",
           dictValue: "关闭批量模式",
         },
         {
-          dictKey: 1,
+          dictKey: "1",
           dictValue: "开启批量模式",
         },
       ],
@@ -328,7 +328,7 @@ const formConfig = computed(() => {
       data: taskData.value,
       itemWidth: 100,
       multiple: false,
-      isShow: formData.data.isBatchMode == 1,
+      isShow: formData.data.isBatchMode == "1",
     },
     // {
     //   type: "slot",

+ 16 - 1
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -297,6 +297,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "创建时间",
+        prop: "createTime",
+        // width: 160,
+      },
+    },
+    {
+      attrs: {
         label: "操作",
         width: "80",
         align: "center",
@@ -426,8 +433,9 @@ const formConfig = computed(() => {
       listType: "text",
       accept: "",
       prop: "fileList",
-      label: "上传附件",
+      label: "上传凭证",
       itemWidth: 100,
+      required: true,
     },
     {
       type: "title1",
@@ -443,6 +451,9 @@ const formConfig = computed(() => {
 const rules = ref({
   warehouseId: [{ required: true, message: "请选择仓库", trigger: "change" }],
   quantity: [{ required: true, message: "请输入入库数量", trigger: "blur" }],
+  fileList: [
+    { required: true, message: "请上传凭证", trigger: ["blur", "change"] },
+  ],
 });
 const submitForm = () => {
   submit.value.handleSubmit(() => {
@@ -493,4 +504,8 @@ const clickOperation = (row) => {
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }
+
+:deep(.bom-table .el-table__body-wrapper .el-table__body .el-table__row) {
+  background: #f4f4f5 !important;
+}
 </style>

+ 12 - 1
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -273,6 +273,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "创建时间",
+        prop: "createTime",
+        // width: 160,
+      },
+    },
+    {
+      attrs: {
         label: "操作",
         width: "80",
         align: "center",
@@ -402,8 +409,9 @@ const formConfig = computed(() => {
       listType: "text",
       accept: "",
       prop: "fileList",
-      label: "上传附件",
+      label: "上传凭证",
       itemWidth: 100,
+      required: true,
     },
     {
       type: "title1",
@@ -419,6 +427,9 @@ const formConfig = computed(() => {
 const rules = ref({
   warehouseId: [{ required: true, message: "请选择仓库", trigger: "change" }],
   quantity: [{ required: true, message: "请输入入库数量", trigger: "blur" }],
+  fileList: [
+    { required: true, message: "请上传凭证", trigger: ["blur", "change"] },
+  ],
 });
 const submitForm = () => {
   submit.value.handleSubmit(() => {

+ 19 - 60
src/views/salesMange/saleContract/claim/index.vue

@@ -17,7 +17,7 @@
     <el-dialog title="认领" v-if="dialogVisible" v-model="dialogVisible" width="50%" v-loading="loading">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #detail>
-          <div style="width: 100%">
+          <div style="width: 100%;padding:0 15px">
             <el-button type="primary" style="margin-bottom: 10px" @click="dialogVisibleOne = true">选择合同</el-button>
             <el-table :data="formData.data.claimContractList">
               <el-table-column prop="contractCode" label="合同编码" width="140" />
@@ -58,22 +58,7 @@
             </el-table>
           </div>
         </template>
-        <template #fileSlot>
-          <div>
-            <el-upload v-model:fileList="fileList" :show-file-list="false" class="upload-demo" :action="uploadUrl" :data="uploadData"
-                       :on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="handleBeforeUpload">
-              <el-button type="primary">选择</el-button>
-            </el-upload>
-            <div>
-              <div style="margin-top: 15px">
-                <el-tag style="margin-right: 10px" class="ml-2" type="info" v-for="(item, index) in fileListCopy" :key="index" closable
-                        @close="handleClose(index)">
-                  {{ item.fileName }}
-                </el-tag>
-              </div>
-            </div>
-          </div>
-        </template>
+
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="default">取 消</el-button>
@@ -87,7 +72,7 @@
       <ContractSelect @handleSelectContrct="handleSelectContrct"></ContractSelect>
     </el-dialog>
 
-    <el-dialog title="认领记录" v-if="openRecord" v-model="openRecord" width="500">
+    <el-dialog title="认领记录" v-if="openRecord" v-model="openRecord" width="600">
       <byForm :formConfig="formRecordConfig" :formOption="formOption" v-model="rowData.data">
         <template #recordList>
           <div>
@@ -99,7 +84,7 @@
                 <div>认领人: {{ item.claimUserName }}</div>
                 <div>合同编号: {{ item.contractCode }}</div>
                 <div>认领金额: {{ item.currency }}{{ item.money }}</div>
-                <br />
+                <br>
               </div>
             </div>
             <div v-else>无</div>
@@ -123,8 +108,6 @@ import ContractSelect from "@/views/salesMange/saleContract/contractSelect/index
 
 const { proxy } = getCurrentInstance();
 const uploadData = ref({});
-let fileList = ref([]);
-let fileListCopy = ref([]);
 const loading = ref(false);
 const submitLoading = ref(false);
 const sourceList = ref({
@@ -314,7 +297,7 @@ const formOption = reactive({
 const byform = ref(null);
 const formConfig = reactive([
   {
-    type: "title",
+    type: "title1",
     title: "账户信息",
   },
   {
@@ -325,7 +308,7 @@ const formConfig = reactive([
     disabled: true,
   },
   {
-    type: "title",
+    type: "title1",
     title: "交易信息",
   },
   {
@@ -363,7 +346,7 @@ const formConfig = reactive([
   {
     type: "number",
     prop: "amountCny",
-    label: "汇算人民币金额",
+    label: "汇算人民币",
     itemWidth: 30,
     disabled: true,
     precision: 2,
@@ -387,7 +370,7 @@ const formConfig = reactive([
     },
   },
   {
-    type: "title",
+    type: "title1",
     title: "认领信息",
   },
   {
@@ -396,8 +379,10 @@ const formConfig = reactive([
     label: "",
   },
   {
-    type: "slot",
-    slotName: "fileSlot",
+    type: "upload",
+    listType: "text",
+    accept: "",
+    prop: "fileList",
     label: "上传附件",
   },
 ]);
@@ -447,11 +432,6 @@ const submitForm = () => {
       });
     }
     formData.data.amount = total;
-    formData.data.fileList =
-      fileListCopy.value.map((x) => ({
-        id: x.id,
-        fileName: x.fileName,
-      })) || [];
     submitLoading.value = true;
     proxy.post("/claim/add", formData.data).then(
       (res) => {
@@ -486,6 +466,7 @@ const getDtl = (row) => {
       amountCny: row.amountCny,
       claimContractList: [],
       rate: rowRate.value,
+      fileList: [],
     };
     dialogVisible.value = true;
   });
@@ -512,27 +493,7 @@ const getDict = () => {
     }));
   });
 };
-const handleBeforeUpload = async (file) => {
-  const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
-  uploadData.value = res.uploadBody;
-  fileListCopy.value.push({
-    id: res.id,
-    fileName: res.fileName,
-    path: res.fileUrl,
-    url: res.fileUrl,
-    uid: file.uid,
-  });
-};
-const handleClose = (index) => {
-  // if (fileListCopy.value.length === 1) {
-  //   return ElMessage({
-  //     message: "最后一个附件啦!",
-  //     type: "info",
-  //   });
-  // }
-  fileList.value.splice(index, 1);
-  fileListCopy.value.splice(index, 1);
-};
+
 const handleRemove = (index) => {
   formData.data.claimContractList.splice(index, 1);
   return ElMessage({
@@ -576,9 +537,8 @@ const rowData = reactive({
 });
 const formRecordConfig = reactive([
   {
-    type: "title",
+    type: "title1",
     title: "账户信息",
-    label: "",
   },
   {
     type: "select",
@@ -588,9 +548,8 @@ const formRecordConfig = reactive([
     disabled: true,
   },
   {
-    type: "title",
+    type: "title1",
     title: "交易信息",
-    label: "",
   },
   {
     type: "date",
@@ -603,7 +562,7 @@ const formRecordConfig = reactive([
     type: "select",
     prop: "status",
     label: "交易金额",
-    itemWidth: 30,
+    itemWidth: 50,
     disabled: true,
     data: [
       {
@@ -620,8 +579,8 @@ const formRecordConfig = reactive([
     type: "selectInput",
     prop: "waitAmount",
     selectProp: "currency",
-    label: " ",
-    itemWidth: 70,
+    label: "",
+    itemWidth: 50,
     disabled: true,
   },
   {

+ 7 - 4
src/views/systemTenant/tenant/deptTenant/index.vue

@@ -14,7 +14,8 @@
         <el-table-column prop="deptName" label="机构名称" min-width="260" />
         <el-table-column prop="type" label="机构类型" width="100">
           <template #default="{ row }">
-            <span>{{ dictValueLabel(row.type, typeList) }} </span>
+            <!-- 公司 部门 -->
+            <span :class="row.type==0?'tag-active':row.type==2?'tag-active-1':''">{{ dictValueLabel(row.type, typeList) }} </span>
           </template>
         </el-table-column>
         <el-table-column prop="orderNum" label="排序" width="100" />
@@ -209,18 +210,19 @@ const formConfig = computed(() => {
     },
     {
       type: "select",
-      prop: "sss",
+      prop: "nature",
       label: "性质",
       data: [
         {
           label: "销售",
-          value: "1",
+          value: "0",
         },
         {
           label: "生产",
-          value: "2",
+          value: "1",
         },
       ],
+      isShow: formData.data.type == 3,
     },
     {
       type: "slot",
@@ -290,6 +292,7 @@ const getDtl = (row, index) => {
   // 修改的时候,反查所有数据,如果能找到当前的父级id则不是第一级数据
   isTopData.value = !checkIsTopData(row.parentId);
   formData.data = proxy.deepClone(row);
+  formData.data.nature = row.nature + "";
   modalType.value = "edit";
   formData.data.leaderId =
     formData.data.leaderId == "-1" ? "" : formData.data.leaderId;

+ 8 - 8
src/views/systemTenant/tenant/userTenant/index.vue

@@ -114,14 +114,14 @@ const config = computed(() => {
         width: 120,
       },
     },
-    {
-      attrs: {
-        label: "英文名",
-        prop: "nickNameEn",
-        align: "left",
-        width: 150,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "英文名",
+    //     prop: "nickNameEn",
+    //     align: "left",
+    //     width: 150,
+    //   },
+    // },
     {
       attrs: {
         label: "用户名",