Ver Fonte

部分需求更改

cz há 1 ano atrás
pai
commit
2f3be7fbca

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

@@ -113,11 +113,14 @@
           </div>
           <div class="upload" v-else-if="i.type == 'uploadImg'">
             <el-upload action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false"
-                       :data="uploadData" :before-upload="(file)=>handleBeforeUploadOne(file,i.prop,i.imgProp)" :on-success="handleSuccess">
-              <img v-if="formData[i.imgProp]" :src="formData[i.imgProp]" class="pic" />
-              <el-icon v-else class="avatar-uploader-icon">
-                <Plus />
-              </el-icon>
+                       :data="uploadData" :before-upload="(file)=>handleBeforeUploadOne(file,i.prop,i.imgProp)"
+                       :on-success="()=>handleSuccessOne(i.imgProp)">
+              <div v-loading="imgLoading">
+                <img v-if="formData[i.imgProp]" :src="formData[i.imgProp]" class="pic" />
+                <el-icon v-else class="avatar-uploader-icon">
+                  <Plus />
+                </el-icon>
+              </div>
             </el-upload>
           </div>
           <div v-else-if="i.type == 'table'" class="by-form-table" style="width: 100%">
@@ -213,8 +216,11 @@ const handleBeforeUpload = async (file, prop) => {
 const onPreviewFile = (file) => {
   if (file && file.fileUrl) window.open(file.fileUrl, "_blank");
 };
-
+const fileData = ref({});
+const imgLoading = ref(false);
 const handleBeforeUploadOne = async (file, prop, imgProp) => {
+  imgLoading.value = true;
+  fileData.value = {};
   const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
   uploadData.value = res.uploadBody;
   formData.value[prop] = [
@@ -224,9 +230,18 @@ const handleBeforeUploadOne = async (file, prop, imgProp) => {
       fileUrl: res.fileUrl,
     },
   ];
-  formData.value[imgProp] = res.fileUrl;
+  fileData.value = res;
   return true;
 };
+const handleSuccessOne = (imgProp) => {
+  if (fileData.value && fileData.value.fileUrl) {
+    formData.value[imgProp] = fileData.value.fileUrl;
+    emit("update:modelValue", formData.value);
+  }
+  setTimeout(() => {
+    imgLoading.value = false;
+  }, 400);
+};
 
 const isInit = ref(false);
 const { proxy } = getCurrentInstance();

+ 1 - 1
src/components/byTable/index.vue

@@ -629,7 +629,7 @@ export default defineComponent({
   border-color: #b2b4b9;
 }
 .el-table .cell {
-  line-height: 22px;
+  line-height: 34px;
 }
 </style>
 <style lang="scss" scoped>

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

@@ -130,7 +130,8 @@
         <div style="width: 100%">
           <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px"
                      v-if="!judgeStatus() && isEditList">产品库</el-button>
-          <el-table :data="formData.data.contractProductList" style="width: 100%; " default-expand-all>
+          <!-- default-expand-all -->
+          <el-table :data="formData.data.contractProductList" style="width: 100%; ">
             <el-table-column type="expand" width="50" align="center">
               <template #default="scope">
                 <div style="padding-left:50px">
@@ -210,6 +211,7 @@
               <template #default="{ row, $index }">
                 <!-- <span class="el-click" v-if="!row.prodFilePath" @click="handleClickUpload('prodFilePath',false)">点击</span> -->
                 <span class="el-click" v-if="row.prodFilePath" @click="handleClickUpload('prodFilePath',false,$index)">点击上传 (查看)</span>
+                <el-button type="primary" link @click="handleClickUpload('prodFilePath',true,$index)" v-else>定制图稿</el-button>
               </template>
             </el-table-column>
             <el-table-column label="数量" width="150">
@@ -282,25 +284,24 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="备注" min-width="200">
+            <el-table-column prop="amount" label="小计" width="110">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  <el-form-item :prop="'contractProductList.' + $index + '.remark'" :inline-message="true" class="margin-b-0 wid100">
-                    <el-input v-model="row.remark" placeholder="请输入" style="width: 100%" />
-                  </el-form-item>
+                  ¥ {{row.amount}}
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="amount" label="小计" width="110">
+            <el-table-column label="备注" min-width="200">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
-                  ¥ {{row.amount}}
+                  <el-form-item :prop="'contractProductList.' + $index + '.remark'" :inline-message="true" class="margin-b-0 wid100">
+                    <el-input v-model="row.remark" placeholder="请输入" style="width: 100%" />
+                  </el-form-item>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column label="操作" width="140" align="center" fixed="right" v-if="!judgeStatus()">
+            <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!judgeStatus()">
               <template #default="{ $index }">
-                <el-button type="primary" link @click="handleClickUpload('prodFilePath',true,$index)">定制图稿</el-button>
                 <el-button type="primary" link @click="handleRemove($index)" v-if="isEditList">删除</el-button>
               </template>
             </el-table-column>

+ 390 - 0
src/components/product/SelectAllGood.vue

@@ -0,0 +1,390 @@
+<template>
+  <div class="user">
+    <div class="tree">
+      <AllTreeList title="分类" submitType="2" :hiddenBtn="true" :data="treeListData" v-model="sourceList.pagination.productClassifyId"
+                   @change="treeChange">
+      </AllTreeList>
+    </div>
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row :action-list="[
+        ]" @get-list="getList">
+
+        <template #pic="{ item }">
+          <div v-if="item.fileList.length > 0">
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
+          </div>
+          <div v-else></div>
+        </template>
+        <template #name="{ item }">
+          <div>
+            <span class="el-click">{{ item.name }}</span>
+          </div>
+        </template>
+        <template #size="{ item }">
+          <div v-if="item['length'] && item.width && item.height">
+            <span>{{ item['length'] }}cm</span>*
+            <span>{{ item.width }}cm</span>*
+            <span>{{ item.height }}cm</span>
+          </div>
+          <div v-else></div>
+        </template>
+        <template #price="{ item }">
+          <div v-if="item.price">
+            <span>{{ item.currency }} {{ moneyFormat(item.price ,2)}}</span>
+          </div>
+          <div v-else></div>
+        </template>
+        <template #costPrice="{ item }">
+          <div v-if="item.costPrice">
+            <span>{{ item.currency }} {{ moneyFormat(item.costPrice ,2)}}</span>
+          </div>
+          <div v-else></div>
+        </template>
+      </byTable>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import useUserStore from "@/store/modules/user";
+import AllTreeList from "@/components/product/allTreeList.vue";
+import { ElMessage, ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const props = defineProps({
+  selectStatus: Boolean,
+  warehouseId: String,
+  rowId: {
+    type: String,
+    default: "",
+  },
+});
+const warehouseList = ref([]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+    companyId: "",
+    definition: "",
+    productClassifyId: "",
+  },
+});
+const productUnit = ref([]);
+const definition = ref([
+  {
+    label: "产品",
+    value: "1",
+  },
+  {
+    label: "物料",
+    value: "2",
+  },
+]);
+const loading = ref(false);
+const companyData = ref([]);
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "归属公司",
+      prop: "companyId",
+      data: companyData.value,
+      isShowAll: false,
+    },
+    {
+      label: "物品类型",
+      prop: "definition",
+      data: definition.value,
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "图片",
+        slot: "pic",
+        align: "center",
+        width: 80,
+      },
+    },
+    {
+      attrs: {
+        label: "物料分类",
+        prop: "classifyName",
+        "min-width": 150,
+      },
+    },
+    {
+      attrs: {
+        label: "物料编码",
+        prop: "customCode",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: " 物料名称",
+        slot: "name",
+        "min-width": 150,
+      },
+    },
+    {
+      attrs: {
+        label: "物料材质",
+        prop: "material",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "物料型号",
+        prop: "spec",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
+        label: "单位",
+        prop: "unit",
+        width: 80,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, materialUnitData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "尺寸",
+        slot: "size",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
+        label: "净重",
+        prop: "netWeight",
+        width: 100,
+      },
+      render(val) {
+        if (val) {
+          return val + " kg";
+        }
+      },
+    },
+    {
+      attrs: {
+        label: "成本价",
+        slot: "costPrice",
+        width: 100,
+      },
+    },
+
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     slot: "btn",
+    //     width: 120,
+    //     fixed: "right",
+    //     align: "center",
+    //   },
+    // },
+  ];
+});
+
+const treeListData = ref([]);
+
+const arrayRecursion = (arr, definition) => {
+  arr.forEach((item) => {
+    item.definition = definition;
+    if (item.children && item.children.length > 0) {
+      arrayRecursion(item.children, definition);
+    }
+  });
+  return arr;
+};
+const getDict = () => {
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
+    .then((res) => {
+      companyData.value = res.data.map((x) => ({
+        ...x,
+        label: x.deptName,
+        value: x.deptId,
+      }));
+      if (res.data && res.data.length > 0) {
+        sourceList.value.pagination.companyId = companyData.value[0].value;
+      }
+      getList();
+    });
+
+  Promise.all([
+    proxy.post("/productClassify/tree", {
+      parentId: "",
+      name: "",
+      definition: "1",
+    }),
+    proxy.post("/productClassify/tree", {
+      parentId: "",
+      name: "",
+      definition: "2",
+    }),
+  ]).then((res) => {
+    if (res && res.length > 1) {
+      res[1].forEach((x) => {
+        x.id = x.id + "";
+      });
+      treeListData.value = [
+        {
+          id: "-1",
+          label: "全部",
+          parentId: "",
+          children: [
+            {
+              id: "1",
+              definition: "1",
+              label: "产品",
+              parentId: "-1",
+              children: arrayRecursion(res[0], "1"),
+            },
+            {
+              id: "2",
+              definition: "2",
+              label: "物料",
+              parentId: "-1",
+              children: arrayRecursion(res[1], "2"),
+            },
+          ],
+        },
+      ];
+    }
+  });
+};
+
+const getList = (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy.post("/productInfo/page", sourceList.value.pagination).then((res) => {
+    sourceList.value.data = res.rows;
+    sourceList.value.pagination.total = res.total;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
+    const productIdList = res.rows.map((x) => x.id);
+    // 请求文件数据并回显
+    if (productIdList.length > 0) {
+      proxy.getFile(productIdList, sourceList.value.data, "id");
+    }
+  });
+};
+
+const treeChange = (e) => {
+  if (e.id != undefined && e.id != "-1") {
+    let productClassifyId = "";
+    if (["1", "2"].includes(e.id)) {
+      sourceList.value.pagination.productClassifyId = "";
+      sourceList.value.pagination.definition = e.id;
+    } else {
+      if (e.id != e.definition) {
+        productClassifyId = e.id;
+      }
+      sourceList.value.pagination.productClassifyId = productClassifyId;
+      sourceList.value.pagination.definition = e.definition;
+    }
+    getList();
+  } else {
+    sourceList.value.pagination.productClassifyId = "";
+    sourceList.value.pagination.definition = "";
+    getList();
+  }
+};
+getDict();
+
+const checkTheFlow = (item) => {
+  proxy.$router.replace({
+    path: "/purchaseSales/stockManage/record",
+    query: {
+      productId: item.productId,
+      warehouseId: item.warehouseId,
+    },
+  });
+};
+const deriveExcel = () => {
+  console.log("deriveExcel");
+};
+// const clickSelect = (item) => {
+//   proxy.$emit("select", item);
+// };
+const goodList = ref([]);
+const clickSelect = (row) => {
+  const flag = goodList.value.some((x) => x.id === row.id);
+  if (flag)
+    return ElMessage({
+      message: "该物品已选择",
+      type: "info",
+    });
+  goodList.value.push({
+    ...row,
+    goodType: sourceList.value.pagination.definition,
+  });
+  return ElMessage({
+    message: "选择成功",
+    type: "success",
+  });
+  proxy.$emit("select", item);
+};
+const handleRemove = (index) => {
+  goodList.value.splice(index, 1);
+  return ElMessage({
+    message: "删除成功",
+    type: "success",
+  });
+};
+
+const handleCancel = () => {
+  goodList.value = [];
+  proxy.$emit("cancel");
+};
+
+const handleSubmit = () => {
+  if (!goodList.value.length > 0)
+    return ElMessage({
+      message: "请添加货品",
+      type: "info",
+    });
+  proxy.$emit("select", goodList.value);
+  goodList.value = [];
+};
+</script>
+
+<style lang="scss" scoped>
+.user {
+  padding: 10px;
+  display: flex;
+  justify-content: space-between;
+  .tree {
+    width: 300px;
+  }
+  .content {
+    width: calc(100% - 310px);
+  }
+}
+.pic {
+  object-fit: contain;
+  width: 50px;
+  height: 50px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+</style>

+ 0 - 0
src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/treeList.vue → src/components/product/allTreeList.vue


+ 10 - 9
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -328,13 +328,6 @@
                           </div>
                         </template>
                       </el-table-column>
-                      <el-table-column label="单价" width="110" prop="price">
-                        <template #default="{ row, $index }">
-                          <div style="width: 100%">
-                            ¥ {{row.price}}
-                          </div>
-                        </template>
-                      </el-table-column>
                       <el-table-column label="利润点数" width="110">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
@@ -346,6 +339,13 @@
                           </div>
                         </template>
                       </el-table-column>
+                      <el-table-column label="单价" width="110" prop="price">
+                        <template #default="{ row, $index }">
+                          <div style="width: 100%">
+                            ¥ {{row.price}}
+                          </div>
+                        </template>
+                      </el-table-column>
                       <el-table-column prop="amount" label="小计" width="110">
                         <template #default="{ row, $index }">
                           <div style="width: 100%">
@@ -1416,8 +1416,9 @@ const handleForeign = (row) => {
         jele.quotationProductBomId = jele.id;
         delete jele.id;
         jele.priceCopy = jele.price;
+        jele.price = Number(parseFloat(jele.price * 1.1)).toFixed(2);
         // 默认系数
-        jele.coefficient = 1;
+        jele.coefficient = 1.1;
       }
     }
     changeQuantity();
@@ -1631,7 +1632,7 @@ const handleSubmitBack = () => {
 }
 
 :deep(.bom-table .el-table__body-wrapper .el-table__body .el-table__row) {
-  background: #fbfbfb !important;
+  background: #f4f4f5 !important;
 }
 :deep(.bom-table .el-table-fixed-column--right) {
   // background: #fbfbfb !important;

+ 31 - 3
src/views/EHSD/saleContract/priceSheetForeign/index.vue

@@ -27,7 +27,7 @@
       <template #follow="{ item }">
         <div style="width: 100%">
           <div style="width: 100%; display: flex;align-items:center">
-            <el-icon :size="20" style="cursor:pointer;margin-right: 8px;" @click="handleFollow(item)">
+            <el-icon :size="20" style="cursor:pointer;margin-right: 8px;" color="#409EFF" @click="handleFollow(item)">
               <Edit />
             </el-icon>
             <template v-if="
@@ -95,7 +95,7 @@
         <div style="width: 100%">
           <!-- <el-button type="primary" text v-debounce @click="handleFollow(item)">跟进</el-button> -->
           <el-button type="primary" text v-debounce v-if="item.status !=88" @click="handleGenerate(item)">生成订单</el-button>
-          <el-button type="primary" text v-debounce v-if="item.status !=88" @click="getDtl(item)">变更</el-button>
+          <el-button type="primary" text v-debounce v-if="item.status !=88" @click="getDtl(item)">调价</el-button>
           <el-button type="danger" text v-debounce v-if="item.status !=0 && item.status !=88" @click="handleRepeal(item)">作废</el-button>
         </div>
       </template>
@@ -233,7 +233,7 @@
         <el-button @click="detailDialog = false" size="defualt" v-debounce>关 闭</el-button>
         <el-button type="primary" v-debounce v-if="leftRowData.status !=88 &&leftRowData.status !=70"
                    @click="handleGenerate(leftRowData)">生成订单</el-button>
-        <el-button type="primary" v-debounce v-if="leftRowData.status !=88 &&leftRowData.status !=70" @click="getDtl(leftRowData)">变更</el-button>
+        <el-button type="primary" v-debounce v-if="leftRowData.status !=88 &&leftRowData.status !=70" @click="getDtl(leftRowData)">调价</el-button>
         <el-button type="danger" v-debounce v-if="leftRowData.status !=0 && leftRowData.status !=88 &&leftRowData.status !=70"
                    @click="handleRepeal(leftRowData)">作废</el-button>
       </template>
@@ -292,6 +292,21 @@ const typeData = ref([
     value: 2,
   },
 ]);
+const dateFollow = ref([
+  {
+    label: "近7天",
+    value: 7,
+  },
+  {
+    label: "近30天",
+    value: 30,
+  },
+  {
+    label: "近60天",
+    value: 60,
+  },
+]);
+
 const sourceList = ref({
   data: [],
   pagination: {
@@ -307,6 +322,7 @@ const sourceList = ref({
     quotationTimeEnd: "",
     beginTime: "",
     endTime: "",
+    followDay: "",
   },
 });
 const loading = ref(false);
@@ -330,6 +346,11 @@ const selectConfig = computed(() => {
       placeholderOne: "结束日期",
       propOne: "quotationTimeEnd",
     },
+    {
+      label: "近期跟进",
+      prop: "followDay",
+      data: dateFollow.value,
+    },
   ];
 });
 
@@ -337,6 +358,13 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "对内报价单号",
+        prop: "internalCode",
+        width: 180,
+      },
+    },
+    {
+      attrs: {
         label: "报价单号",
         slot: "code",
         width: 180,

+ 232 - 0
src/views/JST/AppSecret/index.vue

@@ -0,0 +1,232 @@
+<template>
+  <div class="pageIndexClass">
+    <div>
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :action-list="[
+              {
+                text: '添加店铺',
+                action: () => openModal('add'),
+                disabled: false,
+              },
+        ]" @get-list="getList">
+
+        <template #name="{ item }">
+          <div>
+            <span class="el-click">{{ item.name }}</span>
+          </div>
+        </template>
+
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '添加店铺' : '编辑店铺'" v-model="dialogVisible" width="500px" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+      </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 selectConfig = computed(() => []);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "公司名称",
+        prop: "companyName",
+      },
+    },
+    {
+      attrs: {
+        label: "AppKey",
+        prop: "appKey",
+      },
+    },
+    {
+      attrs: {
+        label: "AppSecret",
+        prop: "appSecret",
+      },
+    },
+    {
+      attrs: {
+        label: "备注",
+        prop: "remark",
+      },
+    },
+    {
+      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("/jushuitanConfig/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: "input",
+      prop: "companyName",
+      label: "公司名称",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "appKey",
+      label: "AppKey",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "appSecret",
+      label: "AppSecret",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "remark",
+      label: "备注",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  companyName: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
+  appKey: [{ required: true, message: "请输入AppKey", trigger: "blur" }],
+  appSecret: [{ required: true, message: "请输入AppSecret", trigger: "blur" }],
+});
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/jushuitanConfig/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 = {
+    companyName: "",
+    appKey: "",
+    appSecret: "",
+    remark: "",
+  };
+};
+
+const submitForm = () => {
+  formDom.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/jushuitanConfig/" + 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("/jushuitanConfig/detail", { id: row.id }).then((res) => {
+    formData.data = res;
+    dialogVisible.value = true;
+  });
+};
+
+getList();
+</script>
+
+<style lang="scss" scoped>
+.content {
+  padding: 20px;
+}
+</style>

+ 1 - 1
src/views/MES/productionMaterial/index.vue

@@ -258,7 +258,7 @@ const handleTabChange = (val) => {
 const selectData = ref([]);
 const selectRow = (data) => {
   console.log(data, "ss");
-  selectData.value = JSON.parse(JSON.stringify(toRaw(data)));
+  selectData.value = proxy.deepClone(data);
 };
 const printTime = ref("");
 const printList = ref([]);

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

@@ -38,6 +38,7 @@
         </el-button>
       </template>
     </el-dialog>
+
   </div>
 </template>
 
@@ -141,29 +142,43 @@ const config = computed(() => {
         // prop: "name",
       },
     },
-    // {
-    //   attrs: {
-    //     label: "操作",
-    //     width: "100",
-    //     align: "center",
-    //     fixed: "right",
-    //   },
-    //   renderHTML(row) {
-    //     return [
-    //       {
-    //         attrs: {
-    //           label: "完成订单",
-    //           type: "primary",
-    //           text: true,
-    //         },
-    //         el: "button",
-    //         click() {
-    //           getDtl(row);
-    //         },
-    //       },
-    //     ];
-    //   },
-    // },
+    {
+      attrs: {
+        label: "操作",
+        width: "100",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          row.produceTime
+            ? {}
+            : {
+                attrs: {
+                  label: "投产",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  proxy
+                    .msgConfirm()
+                    .then((res) => {
+                      proxy
+                        .post("/produceOrder/putProduction", {
+                          id: row.id,
+                        })
+                        .then((res) => {
+                          proxy.msgTip("操作成功", 1);
+                          getList();
+                        });
+                    })
+                    .catch((err) => {});
+                },
+              },
+        ];
+      },
+    },
   ];
 });
 const formData = reactive({

+ 9 - 6
src/views/MES/productionScheduling/index.vue

@@ -23,14 +23,14 @@
 
         <template #date="{ item }">
           <div style="width:100%; ">
-            <div>{{item.createTime}} ~ {{item.deliveryPeriod}}</div>
+            <div>{{item.produceTime}} ~ {{item.deliveryPeriod}}</div>
           </div>
         </template>
 
         <template v-for="(row) in allDay" v-slot:[row.key]="{ index }" :key="row.key">
           <div style="width:100%">
             <div style="height:12px" class="is-bk"
-                 :class="{'left-class':index>=0? isAddLeftClass(row,index):false,'right-class':index>=0? isAddRightClass(row,index):false}"
+                 :class="{'left-class':index>=0? isAddLeftClass(row,index):false,'right-class':index>=0? isAddRightClass(row,index):false,'all-class':index>=0? (isAddLeftClass(row,index)&&isAddRightClass(row,index)):false}"
                  v-if="index>=0 &&sourceList.data && sourceList.data.length>0 &&  isAddClass(row.day,index)"></div>
           </div>
         </template>
@@ -48,7 +48,7 @@
               {{printData.scanValue}}
             </div>
             <div style="font-size:20px;text-align:center;font-weight:700;margin-top:10px">
-              {{printData.createTime}}
+              {{printData.produceTime}}
             </div>
             <!-- 换页 -->
             <!-- <div style="page-break-after: always"></div> -->
@@ -196,7 +196,7 @@ const getList = (req) => {
       sourceList.value.data = res.map((x, index) => ({
         ...x,
         // id: "id" + index,
-        createTime: x.createTime.substr(0, 10),
+        produceTime: x.produceTime.substr(0, 10),
         deliveryPeriod: x.deliveryPeriod.substr(0, 10),
       }));
       // sourceList.value.pagination.total = res.total;
@@ -214,7 +214,7 @@ changDay(str);
 const isAddClass = (day, index) => {
   if (index >= 0 && sourceList.value.data[index]) {
     let row = sourceList.value.data[index];
-    let start = new Date(row.createTime).getTime();
+    let start = new Date(row.produceTime).getTime();
     let end = new Date(row.deliveryPeriod + " 23:59:59").getTime();
     let now = new Date(day + " 23:59:59").getTime();
     if (now >= start && now <= end) {
@@ -228,7 +228,7 @@ const isAddClass = (day, index) => {
 const isAddLeftClass = (day, index) => {
   if (index >= 0 && sourceList.value.data[index]) {
     let row = sourceList.value.data[index];
-    let start = row.createTime;
+    let start = row.produceTime;
     if (day.day == start) {
       return true;
     } else {
@@ -262,6 +262,9 @@ const isAddRightClass = (day, index) => {
 .right-class {
   border-radius: 0px 6px 6px 0px;
 }
+.all-class {
+  border-radius: 6px !important ;
+}
 :deep(.el-table .cell) {
   padding: 0px !important;
 }

+ 19 - 4
src/views/MES/productionTask/index.vue

@@ -23,9 +23,10 @@
         <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
           <div style="width:100%">
             <div v-if="isShowCotent(slotItem,item)">
-              <el-icon :size="20" color="green">
+              <!-- <el-icon :size="20" color="green">
                 <CircleCheckFilled />
-              </el-icon>
+              </el-icon> -->
+              {{showCotent(slotItem,item)}}
             </div>
             <div v-else>
               <el-icon :size="20" color="red">
@@ -411,8 +412,22 @@ const handleClickFile = (file) => {
 };
 
 const isShowCotent = (slot, item) => {
-  if (item && item.productionProcessesList) {
-    return item.productionProcessesList.some((x) => x.id == slot.id);
+  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;
   }

+ 275 - 0
src/views/MES/reportDetail/index.vue

@@ -0,0 +1,275 @@
+<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 #list="{ item }">
+          <div style="width:100%">
+            <span v-for="(product ,index) in item.produceOrderDetailList" style="margin-right:15px">
+              <el-popover placement="top-start" :width="300" trigger="hover">
+                <div>
+                  <div>产品编码:{{product.productCode}}</div>
+                  <div>产品名称:{{product.productName}}</div>
+                  <div>产品尺寸:{{product.productLength}}cm*{{product.productWidth}}cm*{{product.productHeight}}cm</div>
+                </div>
+                <template #reference>
+                  <el-progress type="circle" :percentage="(Number(product.finishQuantity) / Number(product.quantity))*100" width="60"
+                               :status="(Number(product.finishQuantity) / Number(product.quantity))*100 == 100 ? 'success' : ''" />
+                </template>
+              </el-popover>
+
+            </span>
+
+          </div>
+        </template>
+
+      </byTable>
+    </div>
+    <el-dialog :title="modalType == 'add' ? '添加店铺' : '编辑店铺'" v-model="dialogVisible" width="500px" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom" v-loading="submitLoading">
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="defualt">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="defualt" :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: "",
+    produceStatus: "",
+    staDeliveryPeriod: "",
+    endDeliveryPeriod: "",
+    beginTime: "",
+    endTime: "",
+  },
+});
+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",
+  // },
+  // {
+  //   type: "time",
+  //   label: "下单日期",
+  //   placeholder: "开始日期",
+  //   prop: "beginTime",
+  //   placeholderOne: "结束日期",
+  //   propOne: "endTime",
+  // },
+]);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "任务编号",
+        prop: "orderCode",
+        // width: 150,
+      },
+    },
+    {
+      attrs: {
+        label: "报工数量",
+        prop: "quantity",
+        // width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "报工人",
+        prop: "createUserName",
+        // width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "报工时间",
+        prop: "createTime",
+        // width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "工序名称",
+        prop: "processesName",
+        // width: 120,
+      },
+      // render(val) {
+      //   return proxy.dictValueLabel(val, statusData.value);
+      // },
+    },
+
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "100",
+    //     align: "center",
+    //     fixed: "right",
+    //   },
+    //   renderHTML(row) {
+    //     return [
+    //       {
+    //         attrs: {
+    //           label: "完成订单",
+    //           type: "primary",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           getDtl(row);
+    //         },
+    //       },
+    //     ];
+    //   },
+    // },
+  ];
+});
+const formData = reactive({
+  data: {},
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+});
+const formDom = ref(null);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "code",
+      label: "店铺编号",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "店铺名称",
+      itemWidth: 100,
+      disabled: false,
+    },
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "负责部门",
+      data: treeData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 100,
+      disabled: false,
+    },
+  ];
+});
+const rules = ref({
+  deptId: [{ required: true, message: "请选择负责部门", trigger: "change" }],
+  name: [{ required: true, message: "请输入店铺名称", trigger: "blur" }],
+  code: [{ required: true, message: "请输入店铺编号", trigger: "blur" }],
+});
+
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/productionReportingDetail/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;
+  });
+};
+
+getList();
+</script>
+
+<style lang="scss" scoped>
+::v-deep(.el-progress__text) {
+  font-size: 14px !important;
+}
+.content {
+  padding: 20px;
+}
+</style>

+ 1 - 1
src/views/customer/file/index.vue

@@ -217,7 +217,7 @@
       </template>
     </el-dialog>
 
-    <el-dialog title="分配" v-if="openAllocation" v-model="openAllocation" width="300">
+    <el-dialog title="分配" v-if="openAllocation" v-model="openAllocation" width="500">
       <byForm :formConfig="formConfigAllocation" :formOption="formOption" v-model="formAllocation.data" :rules="rulesAllocation" ref="allocation">
       </byForm>
       <template #footer>

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

@@ -1,9 +1,9 @@
 <template>
   <div class="user">
     <div class="tree">
-      <TreeList title="分类" submitType="2" :hiddenBtn="true" :data="treeListData" v-model="sourceList.pagination.productClassifyId"
-                @change="treeChange">
-      </TreeList>
+      <AllTreeList title="分类" submitType="2" :hiddenBtn="true" :data="treeListData" v-model="sourceList.pagination.productClassifyId"
+                   @change="treeChange">
+      </AllTreeList>
     </div>
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
@@ -46,7 +46,7 @@
 import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import useUserStore from "@/store/modules/user";
-import TreeList from "./treeList.vue";
+import AllTreeList from "@/components/product/allTreeList.vue";
 import { ElMessage, ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();

+ 3 - 3
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -49,8 +49,8 @@
     </el-dialog>
 
     <el-dialog v-if="openProduct" v-model="openProduct" title="物料选择" width="90%" append-to-body>
-      <!-- <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods> -->
-      <SelectMaterial @selectMaterial="selectMaterial"></SelectMaterial>
+      <SelectAllGood></SelectAllGood>
+      <!-- <SelectMaterial @selectMaterial="selectMaterial"></SelectMaterial> -->
     </el-dialog>
   </div>
 </template>
@@ -60,7 +60,7 @@ import { computed, ref } from "vue";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { ElMessage } from "element-plus";
-import SelectGoods from "@/components/product/SelectGoods";
+import SelectAllGood from "@/components/product/SelectAllGood";
 import SelectMaterial from "@/components/product/SelectMaterial.vue";
 const { proxy } = getCurrentInstance();
 const warehouseList = ref([]);