Переглянути джерело

bug解决以及对应功能添加

cz 1 рік тому
батько
коміт
83ab8e1178

+ 9 - 0
src/components/byForm/index.vue

@@ -440,8 +440,17 @@ const handleSubmit = async (onSubmit) => {
       emit("update:modelValue", form);
       onSubmit();
       return true;
+    } else {
     }
   } catch (err) {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView({
+        behavior: "smooth",
+        block: "center",
+        inline: "nearest",
+      });
+    }, 0);
     console.log("请检查表单!", err);
     return false;
   }

+ 4 - 4
src/components/process/SF/Contract.vue

@@ -1397,10 +1397,10 @@ const handleSubmit = async () => {
       return false;
     }
   } else {
-    setTimeout(() => {
-      const errorDiv = document.getElementsByClassName("is-error");
-      errorDiv[0].scrollIntoView();
-    }, 0);
+    // setTimeout(() => {
+    //   const errorDiv = document.getElementsByClassName("is-error");
+    //   errorDiv[0].scrollIntoView();
+    // }, 0);
   }
   return flag;
 };

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

@@ -496,7 +496,25 @@ const getList = async (req) => {
       const productIdList = message.rows.map((x) => x.id);
       // 请求文件数据并回显
       if (productIdList.length > 0) {
-        proxy.getFile(productIdList, sourceList.value.data, "id");
+        // proxy.getFile(productIdList, sourceList.value.data, "id");
+        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.id == key &&
+                  fileObj[ele.id] &&
+                  fileObj[ele.id].length > 0
+                ) {
+                  ele.fileList = fileObj[ele.id].filter(
+                    (x) => x.businessType == "0"
+                  );
+                }
+              }
+            }
+          });
       }
     },
     (err) => {

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

@@ -1343,7 +1343,7 @@ const submitProduction = () => {
       proxy.msgTip("操作成功");
       formLoading.value = false;
       productionDialog.value = false;
-      // getList();
+      getList();
     });
   });
 };

+ 17 - 17
src/views/JST/AppSecret/index.vue

@@ -52,13 +52,13 @@ const modalType = ref("add");
 const selectConfig = computed(() => []);
 const config = computed(() => {
   return [
-    {
-      attrs: {
-        label: "部门名称",
-        prop: "deptName",
-        width: 130,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "部门名称",
+    //     prop: "deptName",
+    //     width: 130,
+    //   },
+    // },
     {
       attrs: {
         label: "应用名称",
@@ -159,15 +159,15 @@ const formOption = reactive({
 const formDom = ref(null);
 const formConfig = computed(() => {
   return [
-    {
-      type: "treeSelect",
-      prop: "deptId",
-      label: "部门",
-      data: treeData.value,
-      propsTreeLabel: "deptName",
-      propsTreeValue: "deptId",
-      itemWidth: 100,
-    },
+    // {
+    //   type: "treeSelect",
+    //   prop: "deptId",
+    //   label: "部门",
+    //   data: treeData.value,
+    //   propsTreeLabel: "deptName",
+    //   propsTreeValue: "deptId",
+    //   itemWidth: 100,
+    // },
     {
       type: "input",
       prop: "companyName",
@@ -214,7 +214,7 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  deptId: [{ required: true, message: "请选择部门", trigger: "change" }],
+  // deptId: [{ required: true, message: "请选择部门", trigger: "change" }],
   companyName: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
   appKey: [{ required: true, message: "请输入AppKey", trigger: "blur" }],
   appSecret: [{ required: true, message: "请输入AppSecret", trigger: "blur" }],

+ 305 - 0
src/views/JST/order/index.vue

@@ -0,0 +1,305 @@
+<template>
+  <div class="pageIndexClass">
+    <div>
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :action-list="[
+              
+        ]" @get-list="getList">
+
+        <template #code="{ item }">
+          <div>
+            <span class="el-click" @click="handleGetDtl(item)">{{ item.name }}</span>
+          </div>
+        </template>
+
+      </byTable>
+    </div>
+    <el-dialog :title="'商品详情'" v-model="dialogVisible" width="1000px" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+        <template #details>
+          <div style="width:100%">
+            <el-table :data="formData.data.data">
+              <el-table-column prop="deptName" label="商品编码" min-width="260" />
+              <el-table-column prop="type" label="商品名称" width="100" />
+              <el-table-column prop="type" label="单价" width="100" />
+              <el-table-column prop="type" label="数量" width="100" />
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="defualt" v-debounce>关闭</el-button>
+        <!-- <el-button type="primary" @click="submitForm()" size="defualt" v-debounce :loading="submitLoading">
+          确 定
+        </el-button> -->
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const submitLoading = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const treeData = ref([]);
+const dialogVisible = ref(false);
+const modalType = ref("add");
+const statusData = ref([
+  {
+    label: "未开始",
+    value: "0",
+  },
+  {
+    label: "进行中",
+    value: "1",
+  },
+  {
+    label: "已完成",
+    value: "2",
+  },
+]);
+const selectConfig = computed(() => [
+  {
+    label: "订单状态",
+    prop: "produceStatus",
+    data: statusData.value,
+  },
+  {
+    type: "time",
+    label: "订单时间",
+    placeholder: "开始日期",
+    prop: "staDeliveryPeriod",
+    placeholderOne: "结束日期",
+    propOne: "endDeliveryPeriod",
+  },
+]);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "内部订单号",
+        prop: "code",
+        slot: "code",
+      },
+    },
+    {
+      attrs: {
+        label: "分销商",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "订单日期",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "订单状态",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "订单来源",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "店铺",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "商品",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "应付金额",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "已付金额",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "付款时间",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              getDtl(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/shopInfo/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      proxy.msgTip("删除成功", 1);
+                      getList();
+                    });
+                })
+                .catch((err) => {});
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "slot",
+      prop: "name",
+      slotName: "details",
+      label: "",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  deptId: [{ required: true, message: "请选择负责部门", trigger: "change" }],
+  name: [{ required: true, message: "请输入店铺名称", trigger: "blur" }],
+  code: [{ required: true, message: "请输入店铺编号", trigger: "blur" }],
+});
+
+const getDeptData = () => {
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDeptData();
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/shopInfo/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+  });
+};
+
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    definition: "2",
+    fileList: [],
+  };
+  if (currencyData.value && currencyData.value.length > 0) {
+    formData.data.currency = currencyData.value[0].dictKey;
+    formData.data.costCurrency = currencyData.value[0].dictKey;
+  }
+};
+
+const submitForm = () => {
+  formDom.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/shopInfo/" + modalType.value, formData.data).then(
+      (res) => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.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 handleGetDtl = (item) => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {
+    definition: "2",
+    fileList: [],
+  };
+};
+
+getList();
+</script>
+
+<style lang="scss" scoped>
+.content {
+  padding: 20px;
+}
+</style>

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

@@ -75,7 +75,7 @@
               <div>
                 {{ data.day.substr(8, 10) }}
               </div>
-              <el-popover placement="left" :width="400" trigger="hover" @show="onShow(data.day)">
+              <el-popover placement="left" :width="400" style="height" trigger="hover" @show="onShow(data.day)">
                 <template #reference>
                   <div v-if="isShow(data.day)" style="height: calc(100% - 20px);">
                     <div style="height:5px;margin-bottom:5px;border-radius:2px" v-for="(item,index) in judgeDay(data.day)" :key="index"
@@ -83,7 +83,7 @@
                     </div>
                   </div>
                 </template>
-                <div>
+                <div style="height:500px;overflow:auto">
                   <div v-for="item in showData" :key="item" style="margin-bottom:20px">
                     <div style="display:flex">
                       <div>颜色:</div>
@@ -571,10 +571,10 @@ const getRightData = () => {
         for (let i = 0; i < res.length; i++) {
           const ele = res[i];
           rightDataObj.value[ele.id] = ele;
-          if (i <= 19) {
+          if (i <= 12) {
             colorData.value[ele.id] = colorList[i];
           } else {
-            colorData.value[ele.id] = colorList[19 - i] || colorList[0];
+            colorData.value[ele.id] = colorList[0];
           }
         }
       },
@@ -641,6 +641,7 @@ const judgeDay = (day) => {
 const showData = ref([]);
 const onShow = (day) => {
   let rows = judgeDay(day);
+  console.log(rows, colorData, "sss");
   showData.value = rows;
 };
 

+ 42 - 18
src/views/MES/productionTask/index.vue

@@ -3,7 +3,7 @@
     <div>
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
                :selectConfig="selectConfig" :action-list="[ {
-                text: '打印二维码',
+                text: '打印任务单',
                 action: () => openModal('add'),
                 disabled: selectIds.length==0,
               } 
@@ -46,7 +46,7 @@
 
       </byTable>
     </div>
-    <el-dialog :title="'打印二维码'" v-model="dialogVisible" width="640px" destroy-on-close :before-close="beforeClose">
+    <el-dialog :title="'打印任务单'" v-model="dialogVisible" width="640px" destroy-on-close :before-close="beforeClose">
       <div style="height:calc(100vh - 150px);overflow:auto;padding: 0 10px">
         <div id="pdfDom" style="width:100%">
           <!-- <div style="font-size:20px;text-align:center">
@@ -118,18 +118,10 @@
                       {{item.productLength}} * {{item.productWidth}} * {{item.productHeight}}
                     </div>
                   </div>
-                  <div>
-                    <div class="top-title">
-                      产品备注
-                    </div>
-                    <div>
-                      {{item.productRemark}}
-                    </div>
-                  </div>
                 </td>
               </tr>
               <tr>
-                <td style="text-align:center" rowspan="3">
+                <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="">
@@ -139,18 +131,32 @@
                     <img v-if="item.fileListOne &&item.fileListOne.length > 0" class="bigImg" :src="item.fileListOne[0].fileUrl" alt="">
                   </div>
                 </td>
-                <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:68px;vertical-align:top">
                   <div class="top-title">
                     生产工序
                   </div>
                   <div>
-                    <span v-for="proess in item.productionTaskProgressList" :key="proess.processesId"
-                          style="margin-right:10px">{{proess.progressName}}</span>
+                    <!-- <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>
+                <td style="height:130px">
                   <div style="margin-bottom:10px">
                     <div class="top-title">
                       原材料编码
@@ -170,7 +176,7 @@
                 </td>
               </tr>
               <tr>
-                <td>
+                <td style="vertical-align:top">
                   <div class="top-title">BOM</div>
                   <div>
                     <table border class="table son">
@@ -437,7 +443,25 @@ const getList = async (req) => {
       const productIdList = res.rows.map((x) => x.productId);
       // 请求文件数据并回显
       if (productIdList.length > 0) {
-        proxy.getFile(productIdList, sourceList.value.data, "productId");
+        // 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);
@@ -568,7 +592,7 @@ const getProcesses = () => {
           return [
             {
               attrs: {
-                label: "打印二维码",
+                label: "打印任务单",
                 type: "primary",
                 text: true,
               },

+ 1 - 1
src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue

@@ -25,7 +25,7 @@
         <template #btn="{ item }">
           <div style="width: 100%; text-align: center">
             <!-- <el-button type="primary" @click="checkTheFlow(item)" v-if="!selectStatus" text>查看流水</el-button> -->
-            <el-button type="primary" @click="clickSelect(item)" text>选择</el-button>
+            <el-button type="primary" @click="clickSelect(item)" v-if="selectStatus" text>选择</el-button>
           </div>
         </template>
       </byTable>

+ 9 - 3
src/views/systemTenant/tenant/deptTenant/index.vue

@@ -23,11 +23,11 @@
             <span>{{ row.createTime }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作" align="center" width="240">
+        <el-table-column label="操作" align="center" width="200">
           <template #default="{ row }">
             <el-button link type="primary" @click="getDtl(row)">修改</el-button>
             <el-button link type="primary" @click="openModal(row.deptId)">添加子项</el-button>
-            <el-button link type="primary" @click="openRoomModal(row)">权限</el-button>
+            <!-- <el-button link type="primary" @click="openRoomModal(row)">权限</el-button> -->
             <el-button v-if="checkIsTopData(row.parentId)" link type="primary" @click="listDelete(row)">删除</el-button>
           </template>
         </el-table-column>
@@ -155,7 +155,7 @@ const loadingDialog = ref(false);
 const submit = ref(null);
 const formOption = reactive({
   inline: true,
-  labelWidth: 100,
+  labelWidth: 110,
   itemWidth: 100,
   rules: [],
 });
@@ -201,6 +201,12 @@ const formConfig = computed(() => {
     //   clearable: true,
     //   itemWidth: 50,
     // },
+
+    {
+      type: "input",
+      prop: "jstDistributor",
+      label: "聚水潭分销商",
+    },
     {
       type: "slot",
       prop: "orderNum",