Просмотр исходного кода

维多利亚各个页面完善,异常管理增加字段

cz 2 лет назад
Родитель
Сommit
435bebcb53

+ 14 - 3
src/components/WDLY/product/SelectProduct.vue

@@ -251,10 +251,9 @@ import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import treeList from "@/components/product/treeList";
 import SelectGoods from "@/components/product/SelectGoods";
-
 import { computed, defineComponent, ref } from "vue";
-let openProduct = ref(false);
 
+let openProduct = ref(false);
 const loading = ref(false);
 const submitLoading = ref(false);
 const sourceList = ref({
@@ -285,6 +284,12 @@ let rules = ref({
   ],
 });
 const { proxy } = getCurrentInstance();
+const props = defineProps({
+  isCombination: {
+    type: Boolean,
+    default:false,
+  },
+});
 const selectConfig = computed(() => {
   return [
     {
@@ -588,7 +593,10 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   proxy
-    .post("/productInfo/page", sourceList.value.pagination)
+    .post(
+      props.isCombination ? "/productInfo/getCombinationPage" : "/productInfo/page",
+      sourceList.value.pagination
+    )
     .then((message) => {
       console.log(message);
       sourceList.value.data = message.rows.map((x) => ({
@@ -818,6 +826,9 @@ const getDict = () => {
   });
 };
 getDict();
+// onMounted(() => {
+//   console.log(props,'ada');
+// })
 </script>
   
 <style lang="scss" scoped>

+ 257 - 123
src/views/WDLY/outInBound/abnormal/index.vue

@@ -26,6 +26,7 @@
       v-model="dialogVisible"
       width="800"
       v-loading="loading"
+      destroy-on-close
     >
       <byForm
         :formConfig="formConfig"
@@ -49,22 +50,34 @@
     </el-dialog>
 
     <el-dialog title="跟进记录" v-model="dialogVisibleOne" width="500">
-      <div>
-        <el-timeline :reverse="false">
-          <el-timeline-item
-            placement="top"
-            v-for="(activity, index) in activities"
-            :key="index"
-            :timestamp="activity.handleTime"
-          >
-            <div>
-              跟进人:{{ activity.handleUserName }}
-              <span>({{ activity.status ? "已完成" : "处理中" }})</span>
-            </div>
-            <div style="margin-top: 5px">跟进记录: {{ activity.explain }}</div>
-          </el-timeline-item>
-        </el-timeline>
-      </div>
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="byform"
+      >
+        <template #records>
+          <div style="width: 100%">
+            <el-timeline :reverse="false">
+              <el-timeline-item
+                placement="top"
+                v-for="(activity, index) in activities"
+                :key="index"
+                :timestamp="activity.handleTime"
+              >
+                <div>
+                  跟进人:{{ activity.handleUserName }}
+                  <span>({{ activity.status ? "已完成" : "处理中" }})</span>
+                </div>
+                <div style="margin-top: 5px">
+                  跟进记录: {{ activity.explain }}
+                </div>
+              </el-timeline-item>
+            </el-timeline>
+          </div>
+        </template>
+      </byForm>
     </el-dialog>
   </div>
 </template>
@@ -103,19 +116,47 @@ let rules = ref({
   processing: [
     { required: true, message: "请选择处理方式", trigger: "change" },
   ],
-  explain: [{ required: true, message: "请输入处理说明", trigger: "blur" }],
+  explain: [{ required: true, message: "请输入跟进记录", trigger: "blur" }],
 });
 const { proxy } = getCurrentInstance();
+const typeData = [
+  {
+    label: "到货质检",
+    value: "10",
+  },
+  {
+    label: "京东订单出库",
+    value: "20",
+  },
+  {
+    label: "调仓",
+    value: "30",
+  },
+];
+const statusData = [
+  {
+    label: "未处理",
+    value: "0",
+  },
+  {
+    label: "跟进中",
+    value: "1",
+  },
+  {
+    label: "已处理",
+    value: "2",
+  },
+];
 const selectConfig = reactive([
   {
     label: "异常来源",
     prop: "type",
-    data: [],
+    data: typeData,
   },
   {
     label: "处理状态",
-    prop: "type",
-    data: [],
+    prop: "status",
+    data: statusData,
   },
 ]);
 
@@ -124,37 +165,50 @@ const config = computed(() => {
     {
       attrs: {
         label: "异常来源",
-        prop: "name",
+        prop: "type",
+        width: 100,
       },
-      render(type) {
-        return proxy.dictDataEcho(type, warehouseType.value);
+      render(status) {
+        const current = typeData.find((x) => x.value == status);
+        if (current) return current.label;
+      },
+    },
+    {
+      attrs: {
+        label: "关联单号",
+        prop: "linkCode",
+        width: 180,
       },
     },
     {
       attrs: {
         label: "异常说明",
-        prop: "type",
+        prop: "title",
       },
     },
     {
       attrs: {
         label: "处理状态",
-        prop: "name",
+        prop: "status",
+        width: 100,
       },
-      render(type) {
-        return proxy.dictDataEcho(type, warehouseType.value);
+      render(status) {
+        const current = statusData.find((x) => x.value == status);
+        if (current) return current.label;
       },
     },
     {
       attrs: {
         label: "最近操作人",
-        prop: "keeperName",
+        prop: "handleUserName",
+        width: 120,
       },
     },
     {
       attrs: {
         label: "最近操作时间",
-        prop: "remark",
+        prop: "handleTime",
+        width: 160,
       },
     },
 
@@ -178,15 +232,15 @@ const config = computed(() => {
               getDtl(row);
             },
           },
-          {
-            attrs: {
-              label: "查看关联",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {},
-          },
+          // {
+          //   attrs: {
+          //     label: "查看关联",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {},
+          // },
           {
             attrs: {
               label: "跟进记录",
@@ -195,6 +249,12 @@ const config = computed(() => {
             },
             el: "button",
             click() {
+              formConfig.value = formConfigData[1];
+              formData.data = {
+                type: row.type,
+                linkCode: row.linkCode,
+                title: row.title,
+              };
               proxy
                 .post("/abnormalDetails/page", {
                   abnormalInfoId: row.id,
@@ -229,65 +289,139 @@ const formOption = reactive({
 });
 const byform = ref(null);
 const treeData = ref([]);
-const formConfig = reactive([
-  {
-    type: "radio",
-    prop: "status",
-    label: "跟进结果",
-    required: true,
-    border: true,
-    data: [
-      { label: "完成", value: "1" },
-      { label: "跟进中", value: "0" },
-    ],
-  },
+const formConfigData = [
+  [
+    {
+      type: "title",
+      title: "异常信息",
+    },
+    {
+      type: "select",
+      prop: "type",
+      label: "异常来源",
+      data: typeData,
+      itemWidth: 30,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "linkCode",
+      label: "关联单号",
+      itemWidth: 70,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "title",
+      label: "异常说明",
+      itemWidth: 100,
+      disabled: true,
+    },
+    {
+      type: "title",
+      title: "跟进信息",
+    },
+    {
+      type: "radio",
+      prop: "status",
+      label: "跟进记录",
+      required: true,
+      border: true,
+      data: [
+        { label: "完成", value: "1" },
+        { label: "跟进中", value: "0" },
+      ],
+    },
 
-  {
-    type: "select",
-    prop: "handleUser",
-    label: "跟进人",
-    isLoad: {
-      url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
-        useUserStore().user.tenantId
-      }`,
-      labelKey: "nickName",
-      labelVal: "userId",
-      method: "get",
-      resUrl: "rows",
+    {
+      type: "select",
+      prop: "handleUser",
+      label: "跟进人",
+      itemWidth: 50,
+      isLoad: {
+        url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
+          useUserStore().user.tenantId
+        }`,
+        labelKey: "nickName",
+        labelVal: "userId",
+        method: "get",
+        resUrl: "rows",
+      },
     },
-  },
-  {
-    type: "select",
-    prop: "nextHandleUser",
-    label: "下一跟进人",
-    isLoad: {
-      url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
-        useUserStore().user.tenantId
-      }`,
-      labelKey: "nickName",
-      labelVal: "userId",
-      method: "get",
-      resUrl: "rows",
+    {
+      type: "select",
+      prop: "nextHandleUser",
+      label: "下一跟进人",
+      itemWidth: 50,
+
+      isLoad: {
+        url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
+          useUserStore().user.tenantId
+        }`,
+        labelKey: "nickName",
+        labelVal: "userId",
+        method: "get",
+        resUrl: "rows",
+      },
     },
-  },
-  {
-    type: "date",
-    itemType: "datetime",
-    prop: "handleTime",
-    label: "跟进时间",
-  },
-  {
-    type: "select",
-    prop: "processing",
-    label: "处理方式",
-  },
-  {
-    type: "input",
-    itemType: "textarea",
-    prop: "explain",
-    label: "处理说明",
-  },
-]);
+    {
+      type: "date",
+      itemType: "datetime",
+      prop: "handleTime",
+      label: "跟进时间",
+    },
+    {
+      type: "select",
+      prop: "processing",
+      label: "处理方式",
+      data: [],
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "explain",
+      label: "跟进记录",
+    },
+  ],
+  [
+    {
+      type: "title",
+      title: "异常信息",
+    },
+    {
+      type: "select",
+      prop: "type",
+      label: "异常来源",
+      data: typeData,
+      itemWidth: 30,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "linkCode",
+      label: "关联单号",
+      itemWidth: 70,
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "title",
+      label: "异常说明",
+      itemWidth: 100,
+      disabled: true,
+    },
+    {
+      type: "title",
+      title: "跟进信息",
+    },
+    {
+      type: "slot",
+      slotName: "records",
+      label: "",
+    },
+  ],
+];
+const formConfig = ref([]);
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
@@ -330,44 +464,44 @@ const submitForm = () => {
 
 const getDtl = (row) => {
   modalType.value = "add";
-  formData.data.status = "0";
+  formConfig.value = formConfigData[0];
+  formData.data = {
+    status: "0",
+    abnormalInfoId: row.id,
+    type: row.type,
+    linkCode: row.linkCode,
+    title: row.title,
+  };
   dialogVisible.value = true;
-
-  // proxy.post("/warehouse/detail", { id: row.id }).then((res) => {
-  //   res.type = res.type + "";
-  //   formData.data = res;
-  //   console.log(formData);
-  //   dialogVisible.value = true;
-  // });
 };
-const warehouseType = ref([]);
+const handleMethon = ref([]);
 const getDict = () => {
-  // // 币种数据
-  proxy
-    .post("/dictTenantData/page", {
-      pageNum: 1,
-      pageSize: 999,
-      tenantId: useUserStore().user.tenantId,
-      dictCode: "warehouse_type",
-    })
-    .then((res) => {
-      warehouseType.value = res.rows;
-      selectConfig[0].data = res.rows.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      formConfig[0].data = res.rows.map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-    });
+  proxy.getDictOne(["handle_methon"]).then((res) => {
+    handleMethon.value = res["handle_methon"];
+    formConfigData[0][9].data = handleMethon.value.map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
 };
+getDict();
 getList();
-// getDict();
 </script>
   
 <style lang="scss" scoped>
 .tenant {
   padding: 20px;
 }
+:deep(.el-timeline-item) {
+  padding-bottom: 10px;
+}
+:deep(.el-timeline-item__wrapper) {
+  top: 5px;
+}
+</style>
+<style >
+ul {
+  margin: 0px;
+  padding: 0px;
+}
 </style>

+ 8 - 5
src/views/WDLY/outInBound/jdOrderReceive/index.vue

@@ -35,7 +35,7 @@
     <el-dialog
       :title="modalType == 'add' ? '京东订单接收' : '调仓接收'"
       v-model="dialogVisible"
-      width="800"
+      width="80%"
       v-loading="submitLoading"
       destroy-on-close
     >
@@ -132,6 +132,7 @@
               <el-table-column prop="productName" label="物品名称" />
               <el-table-column prop="productSpec" label="规格型号" />
               <el-table-column prop="quantity" label="调仓数量" />
+              <el-table-column prop="alQuantity" label="已接收数量" />
               <el-table-column
                 prop="inQuantity"
                 label="接收数量"
@@ -363,13 +364,14 @@ const config = computed(() => {
     {
       attrs: {
         label: "接收人",
-        prop: "status",
+        prop: "inUserName",
       },
     },
     {
       attrs: {
         label: "接收时间",
-        prop: "status",
+        prop: "inTime",
+        width:160
       },
     },
     {
@@ -531,6 +533,7 @@ const getDtl = (row) => {
             (x) => ({
               inQuantity: undefined,
               quantity: x.outQuantity,
+              alQuantity: x.inQuantity,
               productId: x.productId,
               id: x.id,
               productCode: x.productCode,
@@ -555,9 +558,9 @@ const submitForm = () => {
           type: "info",
         });
       }
-      if (e.inQuantity > e.quantity) {
+      if (e.inQuantity+e.alQuantity > e.quantity) {
         return ElMessage({
-          message: "接收数量不能大于调仓数量!",
+          message: "接收数量加已接收数量不能大于调仓数量!",
           type: "info",
         });
       }

+ 32 - 37
src/views/WDLY/outInBound/transfer/index.vue

@@ -80,6 +80,16 @@
                 label="调仓数量"
                 v-if="modalType == 'edit'"
               />
+                  <el-table-column
+                prop="alQuantity"
+                label="已接收数量"
+                v-if="modalType == 'edit'"
+              />
+              <el-table-column
+                prop="quantity"
+                label="库存数量"
+                v-if="modalType == 'add'"
+              />
               <el-table-column
                 prop="outQuantity"
                 label="调仓数量"
@@ -98,7 +108,7 @@
                       v-model="row.outQuantity"
                       :precision="2"
                       :controls="false"
-                      :min="0"
+                      :min="1"
                     />
                   </el-form-item>
                 </template>
@@ -119,7 +129,7 @@
                       v-model="row.inQuantity"
                       :precision="2"
                       :controls="false"
-                      :min="0"
+                      :min="1"
                     />
                   </el-form-item>
                 </template>
@@ -424,13 +434,23 @@ const submitForm = () => {
           message: "请添加调仓明细",
           type: "info",
         });
+      const list = formData.data.stockTransferDetailsList;
+      for (let i = 0; i < list.length; i++) {
+        const e = list[i];
+        if (Number(e.outQuantity) > Number(e.quantity)) {
+          return ElMessage({
+            message: `调仓数量不可大于库存数量!`,
+            type: "info",
+          });
+        }
+      }
     } else {
       const list = formData.data.stockTransferDetailsList;
       for (let i = 0; i < list.length; i++) {
         const e = list[i];
-        if (Number(e.inQuantity) > Number(e.outQuantity)) {
+        if (Number(e.inQuantity)+Number(e.alQuantity) > Number(e.outQuantity)) {
           return ElMessage({
-            message: `接收数量不可大于调出数量!`,
+            message: `接收数量加已接收数量不可大于调出数量!`,
             type: "info",
           });
         }
@@ -467,7 +487,10 @@ const getDtl = (row, type) => {
   proxy.post("/stockTransfer/detail", { id: row.id }).then((res) => {
     if (type == "edit") {
       res.stockTransferDetailsList.forEach(
-        (x) => (x.inQuantity = x.outQuantity)
+        (x) => {
+          x.alQuantity=x.inQuantity
+          x.inQuantity = x.outQuantity-x.alQuantity
+        }
       );
     }
     formData.data = res;
@@ -556,10 +579,9 @@ const pushGoods = (goods) => {
     productName: item.productName,
     productSpec: item.productSpec,
     productUnit: item.productUnit,
-    bussinessId: item.productId,
-    count: 0,
-    price: 0,
-    amount: 0,
+    productId: item.productId,
+    quantity: item.quantity,
+    outQuantity: null,
   }));
   formData.data.stockTransferDetailsList =
     formData.data.stockTransferDetailsList.concat(arr);
@@ -570,34 +592,7 @@ const pushGoods = (goods) => {
   });
 };
 
-const select = (x) => {
-  if (
-    formData.data.stockTransferDetailsList &&
-    formData.data.stockTransferDetailsList.length > 0
-  ) {
-    let data = formData.data.stockTransferDetailsList.filter(
-      (row) => row.bussinessId === x.productId
-    );
-    if (data && data.length > 0) {
-      return ElMessage("请勿重复添加");
-    }
-  }
-  formData.data.stockTransferDetailsList.push({
-    goodType: x.goodType,
-    productCode: x.productCode,
-    productName: x.productName,
-    productSpec: x.productSpec,
-    productUnit: x.productUnit,
-    count: 0,
-    price: 0,
-    bussinessId: x.productId,
-    amount: 0,
-  });
-  ElMessage({
-    message: "添加成功!",
-    type: "success",
-  });
-};
+
 </script>
   
 <style lang="scss" scoped>

+ 1 - 1
src/views/WDLY/purchaseManage/arrival/index.vue

@@ -406,7 +406,7 @@ const start = (type) => {
       logisticsCode: row.logisticsCode,
       qualityDetailsList: res.arrivalStockRecordsDetailsList.map((x) => ({
         ...x,
-        arrivalDetailId: x.id,
+        arrivalStockRecordsDetailsId: x.id,
         qualifiedQuantity: 0,
         disqualificationQuantity: 0,
       })),

+ 103 - 2
src/views/WDLY/salesMange/jdReGoodsInspection/index.vue

@@ -31,8 +31,9 @@
     <el-dialog
       :title="modalType == 'add' ? '京东退货质检' : '质检详情'"
       v-model="dialogVisible"
-      width="800"
+      width="70%"
       v-loading="loading"
+      destroy-on-close
     >
       <byForm
         :formConfig="formConfig"
@@ -51,6 +52,14 @@
             >
               选择产品
             </el-button>
+            <el-button
+              type="primary"
+              @click="openExcel"
+              style="margin-bottom: 10px"
+              v-if="modalType == 'add'"
+            >
+              导入Excel
+            </el-button>
             <el-table :data="formData.data.list">
               <el-table-column
                 prop="productType"
@@ -145,6 +154,9 @@
       width="70%"
       append-to-body
     >
+      <div>
+        <el-button type="primary" @click="handleExcel"> 导出Excel </el-button>
+      </div>
       <byTable
         :hideSearch="true"
         :source="sourceList.dataOne"
@@ -162,6 +174,34 @@
         </span>
       </template>
     </el-dialog>
+
+    <el-dialog
+      title="Excel导入"
+      v-model="openExcelDialog"
+      width="400"
+      v-loading="excelLoading"
+      destroy-on-close
+    >
+      <div>
+        <el-upload
+          action="/dev-api/jdBackQualityWait/importExcel"
+          :headers="headers"
+          :on-success="handleSuccess"
+          :on-progress="handleProgress"
+          :show-file-list="false"
+          :on-error="handleError"
+          accept=".xlsx,.xls"
+        >
+          <el-button type="primary">点击导入</el-button>
+        </el-upload>
+      </div>
+
+      <template #footer>
+        <el-button @click="openExcelDialog = false" size="large"
+          >取 消</el-button
+        >
+      </template>
+    </el-dialog>
   </div>
 </template>
   
@@ -174,7 +214,10 @@ import { computed, defineComponent, ref } from "vue";
 import useUserStore from "@/store/modules/user";
 import SelectProduct from "@/components/WDLY/product/SelectProduct";
 import OrderDetails from "@/components/WDLY/order/details";
-
+import { getToken } from "@/utils/auth";
+const headers = ref({ Authorization: "Bearer " + getToken() });
+let openExcelDialog = ref(false);
+let excelLoading = ref(false);
 const loading = ref(false);
 const submitLoading = ref(false);
 const sourceList = ref({
@@ -541,6 +584,64 @@ const handleOpen = () => {
       openProduct.value = true;
     });
 };
+
+const handleExcel = () => {
+  ElMessage({
+    message: "请稍后",
+    type: "success",
+  });
+  let xhr = new XMLHttpRequest();
+  //域名是华为云的
+  xhr.open("GET", `/dev-api/jdBackQualityWait/exportExcel`, true);
+  xhr.responseType = "blob";
+  xhr.setRequestHeader("Authorization", `Bearer ${getToken()}`);
+  xhr.send();
+  xhr.onreadystatechange = function () {
+    if (xhr.readyState === 4 && xhr.status === 200) {
+      let url = window.URL.createObjectURL(xhr.response);
+      const a = document.createElement("a");
+      a.href = url;
+      a.download = "待质检列表.xlsx"; // 下载后文件名
+      a.style.display = "none";
+      document.body.appendChild(a);
+      a.click(); // 点击下载
+      window.URL.revokeObjectURL(a.href);
+      document.body.removeChild(a); // 下载完成移除元素
+    }
+  };
+};
+
+const openExcel = () => {
+  openExcelDialog.value = true;
+};
+const handleProgress = () => {
+  excelLoading.value = true;
+};
+const handleError = (err) => {
+  console.log(res);
+  ElMessage({
+    message: `${err},请重试!`,
+    type: "info",
+  });
+  openExcelDialog.value = false;
+  excelLoading.value = false;
+};
+const handleSuccess = (res) => {
+  if (res.code != 200) {
+    return ElMessage({
+      message: `${res.msg},请重试!`,
+      type: "info",
+    });
+  } else {
+    ElMessage({
+      message: "导入成功!",
+      type: "success",
+    });
+    formData.data.list = res.data;
+    openExcelDialog.value = false;
+    excelLoading.value = false;
+  }
+};
 </script>
   
 <style lang="scss" scoped>

+ 1 - 1
src/views/WDLY/stockManage/productCombination/index.vue

@@ -107,7 +107,7 @@
       width="70%"
       append-to-body
     >
-      <SelectProduct @handleSelect="handleSelect"></SelectProduct>
+      <SelectProduct :isCombination="true" @handleSelect="handleSelect" key="a"></SelectProduct>
       <template #footer>
         <span class="dialog-footer">
           <el-button @click="openProduct = false">取消</el-button>

+ 0 - 6
src/views/WDLY/stockManage/query/index.vue

@@ -351,12 +351,6 @@ const configData = [
         prop: "quantity",
       },
     },
-    {
-      attrs: {
-        label: "可组合数量",
-        prop: "combinationQuantity",
-      },
-    },
   ],
 ];
 let formData = reactive({

+ 164 - 92
src/views/WDLY/stockManage/receiptData/index.vue

@@ -81,7 +81,68 @@ const sourceList = ref({
 });
 let dialogVisible = ref(false);
 let openProduct = ref(false);
+const inboundType = [
+  {
+    label: "手动入库",
+    value: "1",
+  },
+  {
+    label: "调仓入库",
+    value: "3",
+  },
+  {
+    label: "组合入库",
+    value: "6",
+  },
+  {
+    label: "组合拆分入库",
+    value: "8",
+  },
+  {
+    label: "到货入库",
+    value: "14",
+  },
+  {
+    label: "京东退货入库",
+    value: "15",
+  },
+  {
+    label: "到货质检入库",
+    value: "19",
+  },
+];
+
+const outboundType = [
+  {
+    label: "手动出库",
+    value: "2",
+  },
 
+  {
+    label: "组合出库",
+    value: "6",
+  },
+  {
+    label: "组合拆分入库",
+    value: "9",
+  },
+  {
+    label: "京东订单出库",
+    value: "10",
+  },
+  {
+    label: "调仓出库",
+    value: "11",
+  },
+  {
+    label: "销售订单出库",
+    value: "12",
+  },
+  {
+    label: "退货出库",
+    value: "13",
+  },
+];
 let roomDialogVisible = ref(false);
 let modalType = ref("add");
 let rules = ref({
@@ -110,6 +171,10 @@ const configData = [
         label: "入库类型",
         prop: "type",
       },
+      render(status) {
+        const current = inboundType.find((x) => x.value == status);
+        if (current) return current.label;
+      },
     },
     {
       attrs: {
@@ -129,29 +194,29 @@ const configData = [
         prop: "createTime",
       },
     },
-    {
-      attrs: {
-        label: "操作",
-        width: "100",
-        align: "right",
-      },
-      // 渲染 el-button,一般用在最后一列。
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "查看",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row, "add");
-            },
-          },
-        ];
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "100",
+    //     align: "right",
+    //   },
+    //   // 渲染 el-button,一般用在最后一列。
+    //   renderHTML(row) {
+    //     return [
+    //       {
+    //         attrs: {
+    //           label: "查看",
+    //           type: "primary",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           getDtl(row, "add");
+    //         },
+    //       },
+    //     ];
+    //   },
+    // },
   ],
   [
     {
@@ -165,6 +230,10 @@ const configData = [
         label: "出库类型",
         prop: "type",
       },
+      render(status) {
+        const current = outboundType.find((x) => x.value == status);
+        if (current) return current.label;
+      },
     },
     {
       attrs: {
@@ -184,29 +253,29 @@ const configData = [
         prop: "createTime",
       },
     },
-    {
-      attrs: {
-        label: "操作",
-        width: "100",
-        align: "right",
-      },
-      // 渲染 el-button,一般用在最后一列。
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "查看",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row, "add");
-            },
-          },
-        ];
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "100",
+    //     align: "right",
+    //   },
+    //   // 渲染 el-button,一般用在最后一列。
+    //   renderHTML(row) {
+    //     return [
+    //       {
+    //         attrs: {
+    //           label: "查看",
+    //           type: "primary",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           getDtl(row, "add");
+    //         },
+    //       },
+    //     ];
+    //   },
+    // },
   ],
   [
     {
@@ -220,6 +289,9 @@ const configData = [
         label: "调仓类型",
         prop: "type",
       },
+      render(type) {
+        return type == 1 ? "手动调仓" : type == 2 ? "京东订单接收" : "";
+      },
     },
     {
       attrs: {
@@ -257,29 +329,29 @@ const configData = [
         prop: "inTime",
       },
     },
-    {
-      attrs: {
-        label: "操作",
-        width: "100",
-        align: "right",
-      },
-      // 渲染 el-button,一般用在最后一列。
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "查看",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row, "add");
-            },
-          },
-        ];
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "100",
+    //     align: "right",
+    //   },
+    //   // 渲染 el-button,一般用在最后一列。
+    //   renderHTML(row) {
+    //     return [
+    //       {
+    //         attrs: {
+    //           label: "查看",
+    //           type: "primary",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           getDtl(row, "add");
+    //         },
+    //       },
+    //     ];
+    //   },
+    // },
   ],
   [
     {
@@ -333,29 +405,29 @@ const configData = [
         prop: "anomalyNum",
       },
     },
-    {
-      attrs: {
-        label: "操作",
-        width: "100",
-        align: "right",
-      },
-      // 渲染 el-button,一般用在最后一列。
-      renderHTML(row) {
-        return [
-          {
-            attrs: {
-              label: "查看",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row, "add");
-            },
-          },
-        ];
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "操作",
+    //     width: "100",
+    //     align: "right",
+    //   },
+    //   // 渲染 el-button,一般用在最后一列。
+    //   renderHTML(row) {
+    //     return [
+    //       {
+    //         attrs: {
+    //           label: "查看",
+    //           type: "primary",
+    //           text: true,
+    //         },
+    //         el: "button",
+    //         click() {
+    //           getDtl(row, "add");
+    //         },
+    //       },
+    //     ];
+    //   },
+    // },
   ],
 ];
 

+ 3 - 0
src/views/connect/E-mail/mail/com/mailWrite.vue

@@ -27,6 +27,7 @@
                 type="primary"
                 @click="handleAdd(10)"
                 style="margin-left: 10px"
+                :disabled="!formData.data.to"
                 >添加</el-button
               >
             </div>
@@ -60,6 +61,7 @@
                 type="primary"
                 @click="handleAdd(20)"
                 style="margin-left: 10px"
+                :disabled="!formData.data.cc"
                 >添加</el-button
               >
             </div>
@@ -93,6 +95,7 @@
                 type="primary"
                 @click="handleAdd(30)"
                 style="margin-left: 10px"
+                :disabled="!formData.data.bcc"
                 >添加</el-button
               >
             </div>

+ 91 - 5
src/views/customer/portrait/com/LatestProgress.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-loading="loading">
+  <div v-loading="loading" class="progress">
     <el-timeline reverse>
       <el-timeline-item
         v-for="(item, index) in progressList"
@@ -9,12 +9,12 @@
         hide-timestamp
       >
         <div class="details">
-          <div class="t">{{ getTitle(item.dataType) }}</div>
+          <div class="t">{{ getTitle(item.type) }}</div>
           <div class="content11">
             <span class="gray"> 跟进摘要: </span>
             <span class="val"> {{ getContent(item) }} </span>
           </div>
-          <div class="gray">{{ item.sortTime }}</div>
+          <div class="gray">{{ item.createTime }}</div>
         </div>
       </el-timeline-item>
     </el-timeline>
@@ -22,7 +22,93 @@
 </template>
 
 <script setup>
-const getTitle = () => {};
-const getContent = () => {};
+const props = defineProps({
+  customerId: {
+    type: String,
+  },
+});
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const progressList = ref([]);
+const getData = () => {
+  loading.value = true;
+  proxy
+    .post("/saleQuotation/latestFollowUp", { id: props.customerId })
+    .then((res) => {
+      console.log(res, "adas");
+      progressList.value = res.rows;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+onMounted(() => {
+  if (props.customerId) {
+    getData();
+  }
+});
+
+const getTitle = (type) => {
+  switch (type) {
+    case 10:
+      return "报价单";
+    case 20:
+      return "合同";
+    default:
+      return "";
+  }
+};
+const getContent = (item) => {
+  if (item.type === 10) {
+    return "报价单总金额 " + proxy.moneyFormat(item.amount, 2);
+  } else if (item.type === 20) {
+    return (
+      "合同总金额 " +
+      proxy.moneyFormat(item.amount, 2) +
+      ` (${item.contractCode}) `
+    );
+  }
+};
 </script>
 
+<style lang="scss" scoped >
+:deep(.el-timeline-item) {
+  padding-bottom: 10px;
+}
+:deep(.el-timeline-item__wrapper) {
+  top: 5px;
+}
+.progress {
+  padding: 10px;
+}
+.details {
+  padding: 10px;
+  background-color: #d9edff;
+  border-radius: 5px;
+  font-size: 12px;
+  .t {
+    color: #333333;
+    font-weight: bold;
+  }
+  .content11 {
+    margin: 4px 0;
+    display: flex;
+    .val {
+      flex: 1;
+      overflow: hidden;
+      white-space: nowrap;
+      text-overflow: ellipsis;
+    }
+  }
+  .gray {
+    color: #999999;
+  }
+}
+</style>
+<style >
+ul {
+  margin: 0px;
+  padding: 0px;
+}
+</style>
+

+ 11 - 3
src/views/customer/portrait/index.vue

@@ -6,7 +6,7 @@
           <div class="title-box">
             <TitleInfo :content="titleList[0]"></TitleInfo>
           </div>
-          <div class="content-box">
+          <div>
             <CustomerInfo
               :customerId="customerId"
               :key="customerId"
@@ -20,7 +20,12 @@
           <div class="title-box">
             <TitleInfo :content="titleList[1]"></TitleInfo>
           </div>
-          <div class="content-box">1</div>
+          <div class="content-box">
+            <LatestProgress
+              :customerId="customerId"
+              :key="customerId"
+            ></LatestProgress>
+          </div>
         </div>
       </div>
     </div>
@@ -73,6 +78,7 @@ import CustomerInfo from "./com/CustomerInfo.vue";
 import SalesDetails from "./com/SalesDetails.vue";
 import LineTrend from "./com/LineTrend.vue";
 import SaleStatistics from "./com/SaleStatistics.vue";
+import LatestProgress from "./com/LatestProgress.vue";
 
 const route = useRoute();
 const titleList = ["客户信息", "最新跟进", "销售统计", "销售走势", "销售明细"];
@@ -98,10 +104,12 @@ onMounted(() => {
     height: calc(100vh - 120px);
     .top {
       margin-bottom: 10px;
-      min-height: 100px;
+      min-height: 280px;
+      box-sizing: border-box;
     }
     .bottom {
       flex: 1;
+      height: calc(100vh - 420px);
     }
   }
   .right {