فهرست منبع

车间看板以及其他部分需求

cz 1 سال پیش
والد
کامیت
b20789ca98

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

@@ -39,7 +39,7 @@
           <el-select v-model="formData[i.prop]" :multiple="i.multiple || false" v-else-if="i.type == 'select'"
                      :placeholder="i.placeholder || $t('common.pleaseSelect')" @change="(e) => commonsEmit(e, i)"
                      :disabled="i.disabled ? i.disabled : false" :clearable="i.clearable ? i.clearable : false"
-                     :filterable="i.filterable ? true : false" :style="i.style?i.style:{width:'100%'}" :readonly="i.readonly ? i.readonly : false">
+                     :filterable="i.filterable ? true : true" :style="i.style?i.style:{width:'100%'}" :readonly="i.readonly ? i.readonly : false">
             <el-option :label="j.dictValue || j.name || j.label" :value="j.dictKey||j.id || j.value" v-for="j in i.data"
                        :key="j.id || j.dictKey || j.value" :disabled="j.disabled ?j.disabled:false ">
             </el-option>

+ 15 - 10
src/components/headerBar/header-bar.vue

@@ -175,17 +175,20 @@
                 <div class="layout-box">
                   <ul class="son-box" v-for="i in item.children" :key="i.menuId">
                     <li class="menu-title">
-                      {{ i.menuName }}
+                      <div style="width:8px;height:8px;background:#1b374c;margin-right:10px;margin-left:-4px"></div>
+                      <div>{{ i.menuName }}</div>
                     </li>
-                    <div v-for="(j, index) in i.children" :key="index">
-                      <li v-if="i.isNone" class="menu-ul" style="cursor: auto"></li>
-                      <li class="menu-ul">
-                        <i style="cursor: pointer;position:relative;top:0px" @click.stop="editMenu(j)">
-                          <svg-icon :icon-class="isHaveCollect(j) ? 'shoucang1' :'shoucang'" />
-                        </i>
-                        <span style="margin-left:6px;cursor: pointer" @click="commonsBannerToRouter(j)">{{ j.menuName }}</span>
-                        <!-- :class="{'search-class':showSearchStyle(j.menuName)}" -->
-                      </li>
+                    <div style="border-left:1px dashed #1b374c;padding-left:10px">
+                      <div v-for="(j, index) in i.children" :key="index">
+                        <li v-if="i.isNone" class="menu-ul" style="cursor: auto"></li>
+                        <li class="menu-ul">
+                          <i style="cursor: pointer;position:relative;top:0px" @click.stop="editMenu(j)">
+                            <svg-icon :icon-class="isHaveCollect(j) ? 'shoucang1' :'shoucang'" />
+                          </i>
+                          <span style="margin-left:6px;cursor: pointer" @click="commonsBannerToRouter(j)">{{ j.menuName }}</span>
+                          <!-- :class="{'search-class':showSearchStyle(j.menuName)}" -->
+                        </li>
+                      </div>
                     </div>
                   </ul>
                 </div>
@@ -1022,6 +1025,8 @@ const showSearchStyle = (name) => {
           font-size: 14px;
           width: 140px;
           margin: 0 5vw 0 0;
+          display: flex;
+          align-items: center;
 
           i {
             position: relative;

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

@@ -18,13 +18,14 @@
                   <el-tree-select v-model="formData.data.ofCompanyId" :data="useUserStore().allDict['tree_company_data']" style="width: 100%"
                                   placeholder="公司" default-expand-all
                                   :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
-                                  @change="handleOfCompanyIdChange" :disabled="useUserStore().currentCompany==useUserStore().user.companyId" />
+                                  @change="handleOfCompanyIdChange" :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item prop="deptId" label="" label-width="0px" class="margin-b-0 wid100">
                   <el-tree-select v-model="formData.data.deptId" :data="deptData" style="width: 100%" placeholder="部门" default-expand-all
-                                  :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }" />
+                                  :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
+                                  :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
                 </el-form-item>
               </el-col>
 
@@ -1083,9 +1084,9 @@ const handleOfCompanyIdChange = (val) => {
         pageNum: 1,
         pageSize: 9999,
         keyword: "",
-        parentId: val,
+        ancestors: val,
         tenantId: proxy.useUserStore().user.tenantId,
-        type: 2,
+        // type: 2,
       })
       .then((res) => {
         deptData.value = proxy.handleTree(res.data, "deptId");
@@ -1896,14 +1897,12 @@ const getPriceSheetData = (id) => {
 // 是否能编辑修改产品列表
 const isEditList = ref(true);
 onMounted(() => {
+  formData.data.ofCompanyId = proxy.useUserStore().user.companyId;
+  handleOfCompanyIdChange(formData.data.ofCompanyId);
   if (
-    proxy.useUserStore().currentCompany == proxy.useUserStore().user.companyId
+    proxy.useUserStore().currentCompany == proxy.useUserStore().user.ofCompanyId
   ) {
-    formData.data.ofCompanyId = proxy.useUserStore().user.companyId;
-    handleOfCompanyIdChange(formData.data.ofCompanyId);
-    // setTimeout(() => {
-    //   formData.data.deptId = proxy.useUserStore().user.deptId;
-    // }, 1500);
+    formData.data.deptId = proxy.useUserStore().user.deptId;
   }
   if (currencyData.value && currencyData.value.length > 0) {
     formData.data.currency = currencyData.value[0].dictKey;

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

@@ -17,13 +17,14 @@
                   <el-tree-select v-model="formData.data.ofCompanyId" :data="useUserStore().allDict['tree_company_data']" style="width: 100%"
                                   placeholder="公司" default-expand-all
                                   :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
-                                  @change="handleOfCompanyIdChange" :disabled="useUserStore().currentCompany==useUserStore().user.companyId" />
+                                  @change="handleOfCompanyIdChange" :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item prop="deptId" label="" label-width="0px" class="margin-b-0 wid100">
                   <el-tree-select v-model="formData.data.deptId" :data="deptData" style="width: 100%" placeholder="部门" default-expand-all
-                                  :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }" />
+                                  :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
+                                  :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
                 </el-form-item>
               </el-col>
 
@@ -1082,9 +1083,9 @@ const handleOfCompanyIdChange = (val) => {
         pageNum: 1,
         pageSize: 9999,
         keyword: "",
-        parentId: val,
+        ancestors: val,
         tenantId: proxy.useUserStore().user.tenantId,
-        type: 2,
+        // type: 2,
       })
       .then((res) => {
         deptData.value = proxy.handleTree(res.data, "deptId");
@@ -1860,14 +1861,12 @@ const getPriceSheetData = (id) => {
 // 是否能编辑修改产品列表
 const isEditList = ref(true);
 onMounted(() => {
+  formData.data.ofCompanyId = proxy.useUserStore().user.companyId;
+  handleOfCompanyIdChange(formData.data.ofCompanyId);
   if (
-    proxy.useUserStore().currentCompany == proxy.useUserStore().user.companyId
+    proxy.useUserStore().currentCompany == proxy.useUserStore().user.ofCompanyId
   ) {
-    formData.data.ofCompanyId = proxy.useUserStore().user.companyId;
-    handleOfCompanyIdChange(formData.data.ofCompanyId);
-    // setTimeout(() => {
-    //   formData.data.deptId = proxy.useUserStore().user.deptId;
-    // }, 1500);
+    formData.data.deptId = proxy.useUserStore().user.deptId;
   }
   formOption.disabled = judgeStatus();
   // 报价转销售订单

+ 3 - 0
src/main.js

@@ -161,4 +161,7 @@ app.use(ElementPlus, {
 app._context.components.ElDialog.props.closeOnClickModal.default = false;
 // 当关闭 Dialog 时,销毁其中的元素
 app._context.components.ElDialog.props.destroyOnClose.default = true;
+// 下拉框默认可过滤
+// app._context.components.ElSelect.props.filterable = true;
+
 app.mount('#app')

+ 86 - 54
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -160,24 +160,24 @@
                 <el-col :span="12">
                   <el-form-item label="LOGO尺寸" class="wid100">
                     <el-row>
-                      <el-col :span="8">
+                      <el-col :span="12">
                         <el-form-item prop="logoLength" label-width="0px" class="margin-b-0 wid100">
                           <el-input-number v-model="formData.data.logoLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
                                            :controls="false" :min="0" onmousewheel="return false;" />
                         </el-form-item>
                       </el-col>
-                      <el-col :span="8">
+                      <el-col :span="12">
                         <el-form-item prop="logoWidth" label-width="0px" class="margin-b-0 wid100">
                           <el-input-number v-model="formData.data.logoWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2" :controls="false"
                                            :min="0" onmousewheel="return false;" />
                         </el-form-item>
                       </el-col>
-                      <el-col :span="8">
+                      <!-- <el-col :span="8">
                         <el-form-item prop="logoHeight" label-width="0px" class="margin-b-0 wid100">
                           <el-input-number v-model="formData.data.logoHeight" placeholder="高 (cm)" style="width: 100%" :precision="2"
                                            :controls="false" :min="0" onmousewheel="return false;" />
                         </el-form-item>
-                      </el-col>
+                      </el-col> -->
                     </el-row>
                   </el-form-item>
                 </el-col>
@@ -227,7 +227,7 @@
               <el-row style="width:100%">
                 <el-col :span="12">
                   <el-form-item prop="isCustomized" label="是否定制" class="wid100">
-                    <el-select v-model="formData.data.isCustomized" placeholder="请选择" style="width:100%">
+                    <el-select v-model="formData.data.isCustomized" placeholder="请选择" style="width:100%" @change="handleChangeIsCustomized">
                       <el-option :label="'否'" :value="0" />
                       <el-option :label="'是'" :value="1" />
                     </el-select>
@@ -326,8 +326,8 @@
                 <tr>
                   <td style="width:90px">原材料</td>
                   <td style="padding:10px">
-                    <el-select v-model="formData.bomData.rawMaterialId" placeholder="请选择原材料" style="width:100%">
-                      <el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" filterable />
+                    <el-select v-model="formData.bomData.rawMaterialId" filterable placeholder="请选择原材料" style="width:100%">
+                      <el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" />
                     </el-select>
                   </td>
                 </tr>
@@ -991,30 +991,31 @@ const treeChange = (e) => {
     getList({ productClassifyId: e.id });
   }
 };
-const productCustomInfoListData = ref([
-  {
-    type: 1,
-    isCheck: 0,
-    isCheckBox: false,
-    fileList: [],
-    remark: "",
-  },
-  {
-    type: 2,
-    isCheck: 0,
-    isCheckBox: false,
-    fileList: [],
-    remark: "",
-  },
-  {
-    type: 3,
-    isCheck: 0,
-    isCheckBox: false,
-    fileList: [],
-    remark: "",
-  },
-]);
+
 const openModal = () => {
+  const productCustomInfoListData = [
+    {
+      type: 1,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+    {
+      type: 2,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+    {
+      type: 3,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+  ];
   dialogVisible.value = true;
   modalType.value = "add";
   formData.data = {
@@ -1026,7 +1027,7 @@ const openModal = () => {
     isCustomized: 0,
     packAsk: [],
     productBomDetailList: [],
-    productCustomInfoList: productCustomInfoListData.value,
+    productCustomInfoList: productCustomInfoListData,
   };
   // if (currencyData.value && currencyData.value.length > 0) {
   //   formData.data.currency = currencyData.value[0].dictKey;
@@ -1055,7 +1056,7 @@ const submitForm = () => {
         }
       }
     }
-    if (checkNum == 0) {
+    if (checkNum == 0 && formData.data.isCustomized == 1) {
       return proxy.msgTip(`请至少勾选一个定制内容`, 2);
     }
 
@@ -1126,29 +1127,31 @@ const getDtl = (row) => {
           }));
         }
       });
+    } else {
+      formData.data.productCustomInfoList = [
+        {
+          type: 1,
+          isCheck: 0,
+          isCheckBox: false,
+          fileList: [],
+          remark: "",
+        },
+        {
+          type: 2,
+          isCheck: 0,
+          isCheckBox: false,
+          fileList: [],
+          remark: "",
+        },
+        {
+          type: 3,
+          isCheck: 0,
+          isCheckBox: false,
+          fileList: [],
+          remark: "",
+        },
+      ];
     }
-    // let list = [];
-    // for (let i = 0; i < productCustomInfoListData.value.length; i++) {
-    //   const iele = productCustomInfoListData.value[i];
-    //   let current = formData.data.productCustomInfoList.find(
-    //     (x) => x.type == iele.type
-    //   );
-    //   if (current) {
-    //     list.push({
-    //       ...iele,
-    //       ...current,
-    //       isCheckBox: current.isCheck == 1,
-    //       fileList: current.fileList.map((x) => ({
-    //         ...x,
-    //         url: x.fileUrl,
-    //         name: x.fileName,
-    //       })),
-    //     });
-    //   } else {
-    //     list.push(iele);
-    //   }
-    // }
-    // formData.data.productCustomInfoList = list;
     if (formData.data.packAsk) {
       formData.data.packAsk = formData.data.packAsk.split(",");
     }
@@ -1449,6 +1452,35 @@ let obj = {
 const getLabel = (type) => {
   return obj[type];
 };
+
+const handleChangeIsCustomized = (val) => {
+  return;
+  if (val == 1) {
+    formData.data.productCustomInfoList = [
+      {
+        type: 1,
+        isCheck: 0,
+        isCheckBox: false,
+        fileList: [],
+        remark: "",
+      },
+      {
+        type: 2,
+        isCheck: 0,
+        isCheckBox: false,
+        fileList: [],
+        remark: "",
+      },
+      {
+        type: 3,
+        isCheck: 0,
+        isCheckBox: false,
+        fileList: [],
+        remark: "",
+      },
+    ];
+  }
+};
 </script>
 
 <style lang="scss" scoped>

+ 38 - 119
src/views/EHSD/productLibrary/waitCreateProduct/index.vue

@@ -139,24 +139,18 @@
                 <el-col :span="12">
                   <el-form-item label="LOGO尺寸" class="wid100">
                     <el-row>
-                      <el-col :span="8">
+                      <el-col :span="12">
                         <el-form-item prop="logoLength" label-width="0px" class="margin-b-0 wid100">
                           <el-input-number v-model="formData.data.logoLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
                                            :controls="false" :min="0" onmousewheel="return false;" />
                         </el-form-item>
                       </el-col>
-                      <el-col :span="8">
+                      <el-col :span="12">
                         <el-form-item prop="logoWidth" label-width="0px" class="margin-b-0 wid100">
                           <el-input-number v-model="formData.data.logoWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2" :controls="false"
                                            :min="0" onmousewheel="return false;" />
                         </el-form-item>
                       </el-col>
-                      <el-col :span="8">
-                        <el-form-item prop="logoHeight" label-width="0px" class="margin-b-0 wid100">
-                          <el-input-number v-model="formData.data.logoHeight" placeholder="高 (cm)" style="width: 100%" :precision="2"
-                                           :controls="false" :min="0" onmousewheel="return false;" />
-                        </el-form-item>
-                      </el-col>
                     </el-row>
                   </el-form-item>
                 </el-col>
@@ -353,13 +347,13 @@ const config = computed(() => {
     //     width: 80,
     //   },
     // },
-    // {
-    //   attrs: {
-    //     label: "业务公司",
-    //     prop: "companyName",
-    //     width: 150,
-    //   },
-    // },
+    {
+      attrs: {
+        label: "报价单号",
+        prop: "extQuotationCode",
+        // width: 150,
+      },
+    },
     // {
     //   attrs: {
     //     label: "产品分类",
@@ -447,9 +441,9 @@ const config = computed(() => {
     // },
     // {
     //   attrs: {
-    //     label: "海关编码",
-    //     prop: "hsCode",
-    //     width: 100,
+    //     label: "创建时间",
+    //     prop: "createTime",
+    //     // width: 100,
     //   },
     // },
     // {
@@ -851,30 +845,31 @@ const treeChange = (e) => {
     getList({ productClassifyId: e.id });
   }
 };
-const productCustomInfoListData = ref([
-  {
-    type: 1,
-    isCheck: 0,
-    isCheckBox: false,
-    fileList: [],
-    remark: "",
-  },
-  {
-    type: 2,
-    isCheck: 0,
-    isCheckBox: false,
-    fileList: [],
-    remark: "",
-  },
-  {
-    type: 3,
-    isCheck: 0,
-    isCheckBox: false,
-    fileList: [],
-    remark: "",
-  },
-]);
+
 const openModal = () => {
+  const productCustomInfoListData = [
+    {
+      type: 1,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+    {
+      type: 2,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+    {
+      type: 3,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+  ];
   dialogVisible.value = true;
   modalType.value = "add";
   formData.data = {
@@ -886,7 +881,7 @@ const openModal = () => {
     isCustomized: 0,
     packAsk: [],
     productBomDetailList: [],
-    productCustomInfoList: productCustomInfoListData.value,
+    productCustomInfoList: productCustomInfoListData,
   };
   // if (currencyData.value && currencyData.value.length > 0) {
   //   formData.data.currency = currencyData.value[0].dictKey;
@@ -915,7 +910,7 @@ const submitForm = () => {
         }
       }
     }
-    if (checkNum == 0) {
+    if (checkNum == 0 && formData.data.isCustomized == 1) {
       return proxy.msgTip(`请至少勾选一个定制内容`, 2);
     }
 
@@ -997,82 +992,6 @@ const getDtl = (row) => {
     formData.data.packAsk = [];
   }
   delete formData.data.id;
-  // proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
-  //   formData.data = res;
-  //   formData.data.productBomDetailList =
-  //     formData.data.productBomDetailList.filter((x) => x.type == 2);
-
-  //   if (
-  //     formData.data.productCustomInfoList &&
-  //     formData.data.productCustomInfoList.length > 0
-  //   ) {
-  //     formData.data.productCustomInfoList.forEach((x) => {
-  //       x.isCheckBox = x.isCheck == 1;
-  //       if (!x.fileList) {
-  //         x.fileList = [];
-  //       } else {
-  //         x.fileList = x.fileList.map((x) => ({
-  //           ...x,
-  //           url: x.fileUrl,
-  //           name: x.fileName,
-  //         }));
-  //       }
-  //     });
-  //   }
-  //   // let list = [];
-  //   // for (let i = 0; i < productCustomInfoListData.value.length; i++) {
-  //   //   const iele = productCustomInfoListData.value[i];
-  //   //   let current = formData.data.productCustomInfoList.find(
-  //   //     (x) => x.type == iele.type
-  //   //   );
-  //   //   if (current) {
-  //   //     list.push({
-  //   //       ...iele,
-  //   //       ...current,
-  //   //       isCheckBox: current.isCheck == 1,
-  //   //       fileList: current.fileList.map((x) => ({
-  //   //         ...x,
-  //   //         url: x.fileUrl,
-  //   //         name: x.fileName,
-  //   //       })),
-  //   //     });
-  //   //   } else {
-  //   //     list.push(iele);
-  //   //   }
-  //   // }
-  //   // formData.data.productCustomInfoList = list;
-  //   if (formData.data.packAsk) {
-  //     formData.data.packAsk = formData.data.packAsk.split(",");
-  //   }
-  //   formData.data.fileList = row.fileList.map((x) => ({
-  //     ...x,
-  //     url: x.fileUrl,
-  //     name: x.fileName,
-  //   }));
-  //   if (formData.data.fileList.length > 0) {
-  //     formData.data.imageUrl = formData.data.fileList[0].fileUrl;
-  //   }
-
-  //   proxy
-  //     .post("/fileInfo/getList", { businessIdList: [row.id] })
-  //     .then((fileObj) => {
-  //       if (fileObj[row.id] && fileObj[row.id].length > 0) {
-  //         formData.data.prodFileList = fileObj[row.id]
-  //           .filter((x) => x.businessType == "2")
-  //           .map((item) => {
-  //             return {
-  //               ...item,
-  //               name: item.fileName,
-  //               url: item.fileUrl,
-  //             };
-  //           });
-  //       } else {
-  //         formData.data.prodFileList = [];
-  //       }
-  //     });
-
-  //   dialogVisible.value = true;
-  // });
   dialogVisible.value = true;
 };
 const rawMaterialData = ref([]);

+ 436 - 85
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -6,6 +6,29 @@
           <div ref="chartDom" style="height:300px"></div>
         </div>
       </template>
+      <template #ofCompanyId>
+        <div style="width: 100%">
+          <el-form-item label="业务公司" class="margin-b-0 wid100" required>
+            <el-row style="width: 100%">
+              <el-col :span="12">
+                <el-form-item prop="ofCompanyId" label="" label-width="0px" class="margin-b-0 wid100">
+                  <el-tree-select v-model="formData.data.ofCompanyId" :data="useUserStore().allDict['tree_company_data']" style="width: 100%"
+                                  placeholder="公司" default-expand-all
+                                  :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
+                                  @change="handleOfCompanyIdChange" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="12">
+                <el-form-item prop="deptId" label="" label-width="0px" class="margin-b-0 wid100">
+                  <el-tree-select v-model="formData.data.ofDeptId" :data="deptData" style="width: 100%" placeholder="部门" default-expand-all
+                                  :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }" />
+                </el-form-item>
+              </el-col>
+
+            </el-row>
+          </el-form-item>
+        </div>
+      </template>
       <template #buyer>
         <div style="width: 100%">
           <el-form-item label="客户信息" prop="buyCorporationId" class="wid100">
@@ -14,7 +37,7 @@
               <el-option v-for="item in customerList" :key="item.value" :label="item.label" :value="item.value" />
             </el-select>
           </el-form-item>
-          <el-row style="width: 100%">
+          <!-- <el-row style="width: 100%">
             <el-col :span="12">
               <el-form-item label="地址" class="wid100 margin-b-0">
                 <el-row style="padding-right:5px;width:100%">
@@ -54,13 +77,13 @@
                 </el-input>
               </el-form-item>
             </el-col>
-          </el-row>
+          </el-row> -->
         </div>
       </template>
 
       <template #commodity>
         <div style="width: 100%;padding-left:25px">
-          <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all>
+          <!-- <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all>
             <el-table-column type="expand" width="50" align="center">
               <template #default="scope">
                 <div style="padding-left:50px">
@@ -85,41 +108,7 @@
                         </div>
                       </template>
                     </el-table-column>
-                    <!-- <el-table-column prop="quantity" label="数量" width="110" /> -->
-                    <!-- <template #default="{ row, $index }">
-                        <div style="width: 100%">
-                          <el-form-item :prop="'quotationProductList.' + scope.$index + '.quotationProductBomList.' + $index + '.quantity'"
-                                        :rules="rules.quantity" :inline-message="true" class="margin-b-0 wid100">
-                            <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
-                                             :controls="false" :min="1" :disabled="row.type==1" @change="changeQuantity()" />
-                          </el-form-item>
-                        </div>
-                      </template> -->
-                    <!-- <el-table-column prop="allQuantity" label="总量" width="80" />
-                    <el-table-column prop="price" label="单价" width="110">
-                      <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%">
-                          ¥ {{row.amount}}
-                        </div>
-                      </template>
-                    </el-table-column> -->
                     <el-table-column prop="remark" label="备注" width="180" />
-                    <!-- <template #default="{ row, $index }">
-                        <div style="width: 100%">
-                          <el-form-item :prop="'quotationProductList.' + scope.$index + '.quotationProductBomList.' + $index + '.remark'"
-                                        :rules="rules.remark" :inline-message="true" class="margin-b-0 wid100">
-                            <el-input v-model="row.remark" placeholder="请输入" style="width: 100%" :min="0" />
-                          </el-form-item>
-                        </div>
-                      </template> -->
-
                   </el-table>
                 </div>
               </template>
@@ -143,16 +132,6 @@
             </el-table-column>
             <el-table-column prop="productColor" label="颜色" width="100" />
             <el-table-column prop="quantity" label="数量" width="110" />
-            <!-- <template #default="{ row, $index }">
-                <div style="width: 100%">
-                  <el-form-item :prop="'quotationProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
-                                class="margin-b-0 wid100">
-                    <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
-                                     :controls="false" :min="1" @change="changeQuantity()" />
-
-                  </el-form-item>
-                </div>
-              </template> -->
             <el-table-column prop="price" label="单价" width="110">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
@@ -167,7 +146,248 @@
                 </div>
               </template>
             </el-table-column>
-          </el-table>
+          </el-table> -->
+
+          <el-collapse v-model="activeNames">
+            <el-collapse-item :name="index" v-for="(product,index) in formData.data.quotationProductList" :key="index">
+              <template #title>
+                <!-- <TitleInfo :content="'主材'"></TitleInfo> -->
+                <div style="font-size:14px;font-weight:700;padding-left:25px;width:300px">
+                  产品编码:{{product.productCode || '定制产品'}}
+                </div>
+                <el-form-item label="数量" class="margin-b-0" style="width:300px !important;" :prop="'quotationProductList.' +index + '.quantity'"
+                              :rules="rules.quantity" :inline-message="true" @click.stop>
+                  <el-input-number v-model="product.quantity" placeholder="请输入" style="width: 100%" :precision="0" :controls="false" :min="1"
+                                   onmousewheel="return false;" />
+                </el-form-item>
+
+              </template>
+              <div style="width:100%">
+                <div style="margin:10px 0">
+                  <TitleInfo :content="'主材'"></TitleInfo>
+                </div>
+                <div style="width: 100%;padding-left:15px">
+                  <el-row>
+                    <el-col :span="12">
+                      <el-form-item :prop="'quotationProductList.' +index + '.rawMaterialId'" :rules="rules.rawMaterialId" :inline-message="true"
+                                    label="原材料" class="wid100">
+                        <el-select v-model="product.rawMaterialId" placeholder="请选择" style="width:100%">
+                          <el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                      <el-form-item label="颜色" class="margin-b-0 wid100">
+                        <el-row style="width: 100%">
+                          <el-col :span="12">
+                            <el-form-item prop="productColor" label-width="0px" class="margin-b-0 wid100">
+                              <el-input v-model="product.productColor" placeholder="颜色" />
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="12">
+                            <el-form-item prop="colorCardCode" label-width="0px" class="margin-b-0 wid100">
+                              <el-input v-model="product.colorCardCode" placeholder="色卡号" />
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row>
+                    <el-col :span="12">
+                      <el-form-item label="尺寸" class="margin-b-0 wid100" required>
+                        <el-row style="width:100%">
+                          <el-col :span="8">
+                            <el-form-item :prop="'quotationProductList.' +index + '.productLength'" :rules="rules.productLength"
+                                          :inline-message="true" label-width="0px" class="margin-b-0 wid100">
+                              <el-input-number v-model="product.productLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
+                                               :controls="false" :min="0" onmousewheel="return false;" />
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="8">
+                            <el-form-item :prop="'quotationProductList.' +index + '.productWidth'" :rules="rules.productWidth" :inline-message="true"
+                                          label-width="0px" class="margin-b-0 wid100">
+                              <el-input-number v-model="product.productWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2"
+                                               :controls="false" :min="0" onmousewheel="return false;" />
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="8">
+                            <el-form-item :prop="'quotationProductList.' +index + '.productHeight'" :rules="rules.productHeight"
+                                          :inline-message="true" label-width="0px" class="margin-b-0 wid100">
+                              <el-input-number v-model="product.productHeight" placeholder="高 (cm)" style="width: 100%" :precision="2"
+                                               :controls="false" :min="0" onmousewheel="return false;" />
+                            </el-form-item>
+                          </el-col>
+                        </el-row>
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                      <el-form-item label="净重(kg)" prop="netWeight" class="margin-b-0 wid100">
+                        <el-input-number v-model="product.netWeight" placeholder="请输入" style="width: 100%" :precision="2" :controls="false" :min="0"
+                                         onmousewheel="return false;" />
+                      </el-form-item>
+                    </el-col>
+
+                  </el-row>
+                </div>
+
+                <div style="margin:10px 0">
+                  <TitleInfo :content="'辅材'"></TitleInfo>
+                </div>
+                <div style="width: 100%;padding-left:15px">
+                  <el-table :data="product.quotationProductBomList" style="width: 100%; margin-top: 16px">
+                    <el-table-column prop="productName" label="物料名称" min-width="130" />
+                    <el-table-column prop="productCode" label="物料编码" width="200" />
+                    <el-table-column label="数量" width="150">
+                      <template #default="{ row, $index }">
+                        <div style="width: 100%">
+                          <el-form-item :prop="'quotationProductList.' + index + '.quotationProductBomList.' + $index + '.quantity'"
+                                        :rules="rules.quantity" :inline-message="true" class="margin-b-0 wid100">
+                            <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder=" " style="width: 100%" :precision="0"
+                                             :controls="false" :min="1" />
+                          </el-form-item>
+                        </div>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                </div>
+
+                <div style="margin:10px 0">
+                  <TitleInfo :content="'附加工艺要求'"></TitleInfo>
+                </div>
+
+                <div style="width:100%;padding-left:15px">
+                  <div class="small-title">
+                    ① 工艺线路
+                  </div>
+                  <el-row style="width:100%">
+                    <el-col :span="12">
+                      <el-form-item label="工艺产线" class="wid100" :prop="'quotationProductList.' + index + '.technologyId'" :rules="rules.technologyId"
+                                    :inline-message="true">
+                        <el-select v-model="product.technologyId" placeholder="请选择" style="width:100%">
+                          <el-option v-for="item in technologyData" :key="item.id" :label="item.name" :value="item.id" />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <div class="small-title">
+                    ② LOGO
+                  </div>
+                  <el-row style="width:100%">
+                    <el-col :span="12">
+                      <el-form-item label="LOGO尺寸" class="wid100">
+                        <el-row>
+                          <el-col :span="12">
+                            <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoLength'"
+                                          :rules="rules.logoLength" :inline-message="true">
+                              <el-input-number v-model="product.logoLength" placeholder="长 (cm)" style="width: 100%" :precision="2" :controls="false"
+                                               :min="0" onmousewheel="return false;" />
+                            </el-form-item>
+                          </el-col>
+                          <el-col :span="12">
+                            <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoWidth'"
+                                          :rules="rules.logoWidth" :inline-message="true">
+                              <el-input-number v-model="product.logoWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2" :controls="false"
+                                               :min="0" onmousewheel="return false;" />
+                            </el-form-item>
+                          </el-col>
+                          <!-- <el-col :span="8">
+                            <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoHeight'"
+                                          :rules="rules.logoHeight" :inline-message="true">
+                              <el-input-number v-model="product.logoHeight" placeholder="高 (cm)" style="width: 100%" :precision="2" :controls="false"
+                                               :min="0" onmousewheel="return false;" />
+                            </el-form-item>
+                          </el-col> -->
+                        </el-row>
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                      <el-form-item label="几色印刷" class="wid100">
+                        <el-input-number v-model="product.colorCount" style="width: 100%" :precision="0" :controls="false" :min="1"
+                                         onmousewheel="return false;" />
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <div class="small-title">
+                    ③ 折叠
+                  </div>
+                  <el-row style="width:100%">
+                    <el-col :span="12">
+                      <el-form-item label="是否折叠" class="wid100">
+                        <el-select v-model="product.isFold" style="width:100%">
+                          <el-option :label="'否'" :value="0" />
+                          <el-option :label="'是'" :value="1" />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                      <el-form-item label="折叠数" class="wid100" :prop="'quotationProductList.' +index + '.foldWay'" v-if="product.isFold==1"
+                                    :rules="product.isFold==1?rules.foldWay:''">
+                        <el-select v-model="product.foldWay" style="width:100%">
+                          <el-option v-for="item in foldWayData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <div class="small-title">
+                    ④ 包装要求
+                  </div>
+                  <el-row style="width:100%">
+                    <el-col :span="12">
+                      <el-form-item label="包装要求" class="wid100">
+                        <el-select v-model="product.packAsk" style="width:100%" multiple placeholder=" ">
+                          <el-option v-for="item in packAskData" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <div class="small-title">
+                    ⑤ 是否定制
+                  </div>
+                  <el-row style="width:100%">
+                    <el-col :span="12">
+                      <el-form-item prop="isCustomized" label="是否定制" class="wid100">
+                        <el-select v-model="product.isCustomized" style="width:100%">
+                          <el-option :label="'否'" :value="0" />
+                          <el-option :label="'是'" :value="1" />
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row style="width:100%">
+                    <el-form-item label="定制内容" class="wid100" v-if="product.isCustomized==1">
+                      <table style="width:100%" border class="table">
+                        <tr>
+                          <td style="width:20%">
+                          </td>
+                          <td style="width:40%">附件</td>
+                          <td style="width:40%">备注</td>
+                        </tr>
+                        <tr v-for="(row,sonIndex) in product.quotationProductCustomInfoList" :key="sonIndex">
+                          <td>
+                            <el-checkbox v-model="row.isCheckBox" label="" /> <span style="position:relative;top:-2px">
+                              {{getLabelOne(row.type)}}</span>
+                          </td>
+                          <td>
+                            <div v-for="file in row.fileList" :key="file.id" class="el-click" @click="openImg(file.fileUrl)">
+                              {{file.fileName}}
+                            </div>
+                          </td>
+                          <td>
+                            <el-form-item :prop="'quotationProductList.' + index + '.quotationProductCustomInfoList.' + sonIndex + '.remark'"
+                                          :rules="row.isCheckBox?rules.remark:''" :inline-message="true" class="margin-b-0 wid100">
+                              <el-input v-model="row.remark" />
+                            </el-form-item>
+                          </td>
+                        </tr>
+                      </table>
+                    </el-form-item>
+                  </el-row>
+                </div>
+              </div>
+            </el-collapse-item>
+
+          </el-collapse>
         </div>
       </template>
     </byForm>
@@ -179,6 +399,8 @@ import byForm from "@/components/byForm/index";
 import selectCity from "@/components/selectCity/index.vue";
 import * as echarts from "echarts";
 const { proxy } = getCurrentInstance();
+const packAskData = computed(() => proxy.useUserStore().allDict["pack_ask"]);
+const foldWayData = computed(() => proxy.useUserStore().allDict["fold_way"]);
 const props = defineProps({
   rowData: Object,
   dataType: {
@@ -186,6 +408,7 @@ const props = defineProps({
     default: "1",
   },
 });
+const activeNames = ref([]);
 const typeData = ref([
   {
     label: "内销订单",
@@ -214,6 +437,12 @@ const formOption = reactive({
   itemWidth: 100,
   disabled: true,
 });
+const rules = ref({
+  price: [{ required: true, message: "单价", trigger: "blur" }],
+  moldId: [{ required: true, message: "请选择模具", trigger: "change" }],
+  quantity: [{ required: true, message: "数量", trigger: "blur" }],
+  totalQuantity: [{ required: true, message: "总量", trigger: "blur" }],
+});
 let myChart = null;
 const chartDom = ref(null);
 const isShowChart = ref(false);
@@ -247,13 +476,19 @@ const formConfig = computed(() => {
     //   data: typeData.value,
     //   itemWidth: 50,
     // },
+    // {
+    //   type: "treeSelect",
+    //   prop: "ofCompanyId",
+    //   label: "业务公司",
+    //   data: proxy.useUserStore().allDict["tree_company_data"],
+    //   propsTreeLabel: "deptName",
+    //   propsTreeValue: "deptId",
+    //   itemWidth: 50,
+    // },
     {
-      type: "treeSelect",
-      prop: "ofCompanyId",
-      label: "业务公司",
-      data: proxy.useUserStore().allDict["tree_company_data"],
-      propsTreeLabel: "deptName",
-      propsTreeValue: "deptId",
+      type: "slot",
+      slotName: "ofCompanyId",
+      label: "",
       itemWidth: 50,
     },
     {
@@ -278,20 +513,20 @@ const formConfig = computed(() => {
       label: "",
       itemWidth: 100,
     },
-    {
-      type: "input",
-      itemType: "text",
-      label: "联系人",
-      prop: "buyContactName",
-      itemWidth: 50,
-    },
-    {
-      type: "input",
-      itemType: "text",
-      label: "联系人电话",
-      prop: "buyContactNumber",
-      itemWidth: 50,
-    },
+    // {
+    //   type: "input",
+    //   itemType: "text",
+    //   label: "联系人",
+    //   prop: "buyContactName",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   itemType: "text",
+    //   label: "联系人电话",
+    //   prop: "buyContactNumber",
+    //   itemWidth: 50,
+    // },
     {
       type: "title1",
       title: "商品信息",
@@ -351,6 +586,28 @@ const getDict = () => {
       treeData.value = proxy.handleTree(res.data, "deptId");
     });
 };
+const rawMaterialData = ref([]);
+const technologyData = ref([]);
+const getRawMaterialData = () => {
+  proxy.post("/productInfo/page", { productClassifyId: 100 }).then((res) => {
+    rawMaterialData.value = res.rows.map((x) => ({
+      ...x,
+      label:
+        x.name +
+        "," +
+        x.customCode +
+        "," +
+        `${x["length"]}*${x.width}*${x.height}(cm)` +
+        "," +
+        x.color,
+      value: x.id,
+    }));
+  });
+  proxy.post("/technology/page", { pageNum: 1, pageSize: 999 }).then((res) => {
+    technologyData.value = res.rows;
+  });
+};
+getRawMaterialData();
 getDict();
 
 const getFileData = () => {
@@ -481,12 +738,71 @@ const chartOption = reactive({
   },
 });
 const customerList = ref([]);
+const deptData = ref([]);
+const handleOfCompanyIdChange = (val) => {
+  if (val) {
+    proxy
+      .get("/tenantDept/list", {
+        pageNum: 1,
+        pageSize: 9999,
+        keyword: "",
+        ancestors: val,
+        tenantId: proxy.useUserStore().user.tenantId,
+        // type: 2,
+      })
+      .then((res) => {
+        deptData.value = proxy.handleTree(res.data, "deptId");
+      });
+  }
+};
 const getData = (query) => {
   let url =
     props.dataType == "1" ? "/saleQuotation/detail" : "/extQuotation/detail";
   loading.value = true;
   proxy.post(url, query).then((res) => {
     formData.data = res;
+    if (res && res.ofCompanyId) {
+      handleOfCompanyIdChange(res.ofCompanyId);
+    }
+    if (
+      formData.data.quotationProductList &&
+      formData.data.quotationProductList.length > 0
+    ) {
+      for (let i = 0; i < formData.data.quotationProductList.length; i++) {
+        const iele = formData.data.quotationProductList[i];
+        if (iele.packAsk) {
+          iele.packAsk = iele.packAsk.split(",");
+        } else {
+          iele.packAsk = [];
+        }
+        if (
+          iele.quotationProductBomList &&
+          iele.quotationProductBomList.length > 0
+        ) {
+          iele.quotationProductBomList = iele.quotationProductBomList.filter(
+            (x) => x.type == 2
+          );
+        }
+        if (
+          iele.quotationProductCustomInfoList &&
+          iele.quotationProductCustomInfoList.length > 0
+        ) {
+          for (let j = 0; j < iele.quotationProductCustomInfoList.length; j++) {
+            const jele = iele.quotationProductCustomInfoList[j];
+            if (jele.fileList) {
+              jele.fileList = jele.fileList.map((x) => ({
+                ...x,
+                url: x.fileUrl,
+                name: x.fileName,
+              }));
+            } else {
+              jele.fileList = [];
+            }
+            jele.isCheckBox = jele.isCheck == 1;
+          }
+        }
+      }
+    }
     proxy
       .post("/customer/selPage", { keyword: formData.data.buyCorporationName })
       .then((res) => {
@@ -497,23 +813,23 @@ const getData = (query) => {
         }));
       });
     // 城市数据回显
-    if (formData.data.buyCountryId) {
-      getCityData(formData.data.buyCountryId, "20");
-    }
-    if (formData.data.buyProvinceId) {
-      getCityData(formData.data.buyProvinceId, "30");
-    }
-    getFileData();
-    let productIds = formData.data.quotationProductList.map((x) => x.productId);
-    proxy.getFileData({
-      businessIdList: productIds,
-      data: formData.data.quotationProductList,
-      att: "productId",
-      businessType: "0",
-      fileAtt: "productFile",
-      filePathAtt: "fileUrl",
-    });
-    changeQuantity();
+    // if (formData.data.buyCountryId) {
+    //   getCityData(formData.data.buyCountryId, "20");
+    // }
+    // if (formData.data.buyProvinceId) {
+    //   getCityData(formData.data.buyProvinceId, "30");
+    // }
+    // getFileData();
+    // let productIds = formData.data.quotationProductList.map((x) => x.productId);
+    // proxy.getFileData({
+    //   businessIdList: productIds,
+    //   data: formData.data.quotationProductList,
+    //   att: "productId",
+    //   businessType: "0",
+    //   fileAtt: "productFile",
+    //   filePathAtt: "fileUrl",
+    // });
+    // changeQuantity();
     loading.value = false;
     // if (res.quotationTrendList && res.quotationTrendList.length >= 2) {
     //   isShowChart.value = true;
@@ -545,6 +861,15 @@ const getData = (query) => {
   });
 };
 
+let obj = {
+  1: "定制刀模",
+  2: "定制纹路",
+  3: "定制模具",
+};
+const getLabelOne = (type) => {
+  return obj[type];
+};
+
 watch(
   () => props.rowData,
   (val) => {
@@ -571,4 +896,30 @@ watch(
 :deep(.bom-table .el-table__body-wrapper .el-table__body .el-table__row) {
   background: #f4f4f5 !important;
 }
+
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+
+  td {
+    text-align: center;
+    padding: 2px 4px;
+    // padding: 5px 10px;
+  }
+}
+.small-title {
+  padding-left: 15px;
+  margin-bottom: 10px;
+  color: #3366ff;
+  font-size: 14px;
+}
+:deep(.el-checkbox) {
+  margin-right: 0px;
+}
+:deep(.el-collapse-item) {
+  margin-bottom: 10px;
+}
+:deep(.el-collapse-item__header) {
+  background-color: #eee;
+}
 </style>

+ 22 - 22
src/views/EHSD/saleContract/PriceSheetDetailList.vue

@@ -1,7 +1,7 @@
 <template>
   <div style="background: #fff;height:calc(100vh - 150px)">
     <div class="content-box">
-      <div class="left">
+      <!-- <div class="left">
         <div style="text-align:center;margin-bottom:20px">
           <TitleInfo :content="'历史版本'" size="18"></TitleInfo>
         </div>
@@ -10,7 +10,7 @@
           {{ i.code }}
         </div>
       </div>
-      <div class="center"></div>
+      <div class="center"></div> -->
       <div class="right">
         <el-tabs v-model="activeName" class="demo-tabs" type="card" @tab-change="handleTabChange">
           <el-tab-pane label="报价详情" name="first"></el-tab-pane>
@@ -178,26 +178,26 @@ watch(
 .content-box {
   display: flex;
   height: 100%;
-  .left {
-    width: 150px;
-    // background: #ccc;
-    .left-item {
-      height: 36px;
-      line-height: 36px;
-      text-align: left;
-      cursor: pointer;
-    }
-  }
-  .center {
-    height: calc(100% + 60px);
-    margin-top: -30px;
-    width: 20px;
-    background-color: #f0f2f5;
-  }
-  .right {
-    width: calc(100% - 150px - 20px);
-    padding-left: 10px;
-  }
+  // .left {
+  //   width: 150px;
+  //   // background: #ccc;
+  //   .left-item {
+  //     height: 36px;
+  //     line-height: 36px;
+  //     text-align: left;
+  //     cursor: pointer;
+  //   }
+  // }
+  // .center {
+  //   height: calc(100% + 60px);
+  //   margin-top: -30px;
+  //   width: 20px;
+  //   background-color: #f0f2f5;
+  // }
+  // .right {
+  //   width: calc(100% - 150px - 20px);
+  //   padding-left: 10px;
+  // }
 }
 .baseRow {
   min-height: 24px;

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

@@ -574,13 +574,13 @@ const config = computed(() => {
       //   return proxy.dictValueLabel(val, produceStatusData.value);
       // },
     },
-    {
-      attrs: {
-        label: "销售部门",
-        prop: "deptName",
-        width: 120,
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "销售部门",
+    //     prop: "deptName",
+    //     width: 120,
+    //   },
+    // },
     {
       attrs: {
         label: "业务员",

+ 127 - 276
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -12,9 +12,7 @@
 
         <template #code="{ item }">
           <div style="width: 100%">
-            <!-- <span style="color: #409eff; cursor: pointer; word-break: break-all" @click="getDtl(item,true)">{{ item.code }}</span> -->
             <span style="color: #409eff; cursor: pointer; word-break: break-all" @click="handleOpenDetail(item)">{{ item.code }}</span>
-
           </div>
         </template>
 
@@ -150,115 +148,40 @@
           </div>
         </template>
 
+        <template #ofCompanyId>
+          <div style="width: 100%">
+            <el-form-item label="业务公司" class="margin-b-0 wid100" required>
+              <el-row style="width: 100%">
+                <el-col :span="12">
+                  <el-form-item prop="ofCompanyId" label="" label-width="0px" class="margin-b-0 wid100">
+                    <el-tree-select v-model="formData.data.ofCompanyId" :data="useUserStore().allDict['tree_company_data']" style="width: 100%"
+                                    placeholder="公司" default-expand-all
+                                    :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
+                                    @change="handleOfCompanyIdChange" :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                  <el-form-item prop="ofDeptId" label="" label-width="0px" class="margin-b-0 wid100">
+                    <el-tree-select v-model="formData.data.ofDeptId" :data="deptData" style="width: 100%" placeholder="部门" default-expand-all
+                                    :props="{ value:  'deptId', label:  'deptName', children: 'children', disabled: 'disabled' }"
+                                    :disabled="useUserStore().currentCompany==useUserStore().user.ofCompanyId" />
+                  </el-form-item>
+                </el-col>
+
+              </el-row>
+            </el-form-item>
+          </div>
+        </template>
+
         <template #commodity>
           <div style="width: 100%;padding-left:25px">
             <el-button type="warning" @click="clickPushProduct" plain style="margin-bottom: 16px" v-if="!isDetail"
                        :disabled="!formData.data.companyId">定制</el-button>
             <el-button type="primary" @click="openProductCompany = true" plain style="margin-bottom: 16px" v-if="!isDetail"
                        :disabled="!formData.data.companyId">选择产品库</el-button>
-            <!-- <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all>
-              <el-table-column type="expand" width="50" align="center">
-                <template #default="scope">
-                  <div style="padding-left:50px">
-                    <div style="margin-bottom:10px; ">
-                      <TitleInfo content='BOM单:'></TitleInfo>
-                    </div>
-                    <el-table :data="scope.row.quotationProductBomList" style="width: 100%;" border class="bom-table">
-                      <el-table-column label="图片" width="80">
-                        <template #default="{ row }">
-                          <div v-if="row.fileUrl">
-                            <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
-                          </div>
-                          <div v-else></div>
-                        </template>
-                      </el-table-column>
-                      <el-table-column prop="productCode" label="物料编码" width="190" />
-                      <el-table-column prop="productName" label="物料名称" min-width="200" />
-                      <el-table-column label="尺寸 (cm)" width="150">
-                        <template #default="{ row, $index }">
-                          <div style="width: 100%">
-                            {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
-                          </div>
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="备注" width="180">
-                        <template #default="{ row, $index }">
-                          <div style="width: 100%">
-                            <el-form-item :prop="'quotationProductList.' + scope.$index + '.quotationProductBomList.' + $index + '.remark'"
-                                          :rules="rules.remark" :inline-message="true" class="margin-b-0 wid100">
-                              <el-input v-model="row.remark" placeholder="请输入" style="width: 100%" :min="0" />
-                            </el-form-item>
-                          </div>
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="操作" width="60" align="center" fixed="right" v-if="!isDetail">
-                        <template #default="{ row,$index }">
-                          <el-button type="primary" link @click="handleDeleteMaterial(scope.$index,$index)" v-if="row.type==2">删除</el-button>
-                        </template>
-                      </el-table-column>
-                    </el-table>
-                  </div>
-
-                </template>
-              </el-table-column>
-              <el-table-column label="图片" width="80">
-                <template #default="{ row }">
-                  <div v-if="row.fileUrl">
-                    <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
-                  </div>
-                  <div v-else></div>
-                </template>
-              </el-table-column>
-              <el-table-column prop="productCode" label="商品编码" width="190" />
-              <el-table-column prop="productName" label="商品名称" min-width="200" />
-              <el-table-column label="尺寸 (cm)" width="150">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column prop="productColor" label="颜色" width="100" />
-              <el-table-column label="数量" width="110">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    <el-form-item :prop="'quotationProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true"
-                                  class="margin-b-0 wid100">
-                      <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="0"
-                                       :controls="false" :min="1" @change="changeQuantity()" />
-
-                    </el-form-item>
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column label="单价" width="110">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    <span v-if="row.price">¥ {{row.price}}</span>
-                    <span v-else>待报价</span>
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column prop="amount" label="小计" width="110">
-                <template #default="{ row, $index }">
-                  <div style="width: 100%">
-                    <span v-if="row.amount">¥ {{row.amount}}</span>
-                    <span v-else>一</span>
-                  </div>
-                </template>
-              </el-table-column>
-              <el-table-column label="操作" width="140" align="center" fixed="right" v-if="!isDetail">
-                <template #default="{ $index }">
-                  <el-button type="primary" link @click="handleClickSelectMaterial($index)">包材/配件/辅材</el-button>
-                  <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
-                </template>
-              </el-table-column>
-            </el-table> -->
-
             <el-collapse v-model="activeNames">
               <el-collapse-item :name="index" v-for="(product,index) in formData.data.quotationProductList" :key="index">
                 <template #title>
-                  <!-- <TitleInfo :content="'主材'"></TitleInfo> -->
                   <div style="font-size:14px;font-weight:700;padding-left:25px;width:300px">
                     产品编码:{{product.productCode || '定制产品'}}
                   </div>
@@ -278,7 +201,7 @@
                       <el-col :span="12">
                         <el-form-item :prop="'quotationProductList.' +index + '.rawMaterialId'" :rules="rules.rawMaterialId" :inline-message="true"
                                       label="原材料" class="wid100">
-                          <el-select v-model="product.rawMaterialId" placeholder="请选择" style="width:100%">
+                          <el-select v-model="product.rawMaterialId" placeholder="请选择" style="width:100%" filterable>
                             <el-option v-for="item in rawMaterialData" :key="item.value" :label="item.label" :value="item.value" />
                           </el-select>
                         </el-form-item>
@@ -390,27 +313,27 @@
                       <el-col :span="12">
                         <el-form-item label="LOGO尺寸" class="wid100">
                           <el-row>
-                            <el-col :span="8">
+                            <el-col :span="12">
                               <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoLength'"
                                             :rules="rules.logoLength" :inline-message="true">
                                 <el-input-number v-model="product.logoLength" placeholder="长 (cm)" style="width: 100%" :precision="2"
                                                  :controls="false" :min="0" onmousewheel="return false;" />
                               </el-form-item>
                             </el-col>
-                            <el-col :span="8">
+                            <el-col :span="12">
                               <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoWidth'"
                                             :rules="rules.logoWidth" :inline-message="true">
                                 <el-input-number v-model="product.logoWidth" placeholder="宽 (cm)" style="width: 100%" :precision="2" :controls="false"
                                                  :min="0" onmousewheel="return false;" />
                               </el-form-item>
                             </el-col>
-                            <el-col :span="8">
+                            <!-- <el-col :span="8">
                               <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoHeight'"
                                             :rules="rules.logoHeight" :inline-message="true">
                                 <el-input-number v-model="product.logoHeight" placeholder="高 (cm)" style="width: 100%" :precision="2"
                                                  :controls="false" :min="0" onmousewheel="return false;" />
                               </el-form-item>
-                            </el-col>
+                            </el-col> -->
                           </el-row>
                         </el-form-item>
                       </el-col>
@@ -544,42 +467,6 @@
                           </div>
                         </template>
                       </el-table-column>
-                      <!-- <el-table-column label="数量" width="80" prop="quantity">
-                      </el-table-column>
-                      <el-table-column label="总数量" width="80" prop="allQuantity">
-                      </el-table-column>
-                      <el-table-column label="原本单价" width="110" prop="priceCopy">
-                        <template #default="{ row, $index }">
-                          <div style="width: 100%">
-                            ¥ {{row.priceCopy}}
-                          </div>
-                        </template>
-                      </el-table-column>
-                      <el-table-column label="利润点数" width="110">
-                        <template #default="{ row, $index }">
-                          <div style="width: 100%">
-                            <el-form-item :prop="'quotationProductList.' + scope.$index + '.quotationProductBomList.' + $index + '.coefficient'"
-                                          :rules="rules.coefficient" :inline-message="true" class="margin-b-0 wid100">
-                              <el-input-number onmousewheel="return false;" v-model="row.coefficient" placeholder="请输入" style="width: 100%"
-                                               :precision="2" :controls="false" :min="0" @change="totalAmount()" />
-                            </el-form-item>
-                          </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%">
-                            ¥ {{row.amount}}
-                          </div>
-                        </template>
-                      </el-table-column> -->
                       <el-table-column label="备注" width="180" prop="remark">
                       </el-table-column>
                     </el-table>
@@ -830,6 +717,7 @@ const corporationList = ref([]);
 const tradeMethods = ref([]);
 const accountCurrency = ref([]);
 const companyData = ref([]);
+const deptData = ref([]);
 const statusData = ref([
   {
     label: "草稿",
@@ -1113,6 +1001,13 @@ const newPriceSheet = () => {
     type: 1,
     quotationProductList: [],
   };
+  formData.data.ofCompanyId = proxy.useUserStore().user.companyId;
+  handleOfCompanyIdChange(formData.data.ofCompanyId);
+  if (
+    proxy.useUserStore().currentCompany == proxy.useUserStore().user.ofCompanyId
+  ) {
+    formData.data.ofDeptId = proxy.useUserStore().user.deptId;
+  }
 };
 
 const isDetail = ref(false);
@@ -1322,13 +1217,19 @@ const formConfig = computed(() => {
     //   data: typeData.value,
     //   itemWidth: 50,
     // },
+    // {
+    //   type: "treeSelect",
+    //   prop: "ofCompanyId",
+    //   label: "业务公司",
+    //   data: proxy.useUserStore().allDict["tree_company_data"],
+    //   propsTreeLabel: "deptName",
+    //   propsTreeValue: "deptId",
+    //   itemWidth: 50,
+    // },
     {
-      type: "treeSelect",
-      prop: "ofCompanyId",
-      label: "业务公司",
-      data: proxy.useUserStore().allDict["tree_company_data"],
-      propsTreeLabel: "deptName",
-      propsTreeValue: "deptId",
+      type: "slot",
+      slotName: "ofCompanyId",
+      label: "",
       itemWidth: 50,
     },
     {
@@ -1395,6 +1296,7 @@ const rules = ref({
   ofCompanyId: [
     { required: true, message: "请选择业务公司", trigger: "change" },
   ],
+  ofDeptId: [{ required: true, message: "请选择业务部门", trigger: "change" }],
   companyId: [{ required: true, message: "请选择报价公司", trigger: "change" }],
   buyCorporationId: [
     { required: true, message: "请选择客户公司", trigger: "change" },
@@ -1505,30 +1407,31 @@ const handlePerson = (item) => {
   }
 };
 const quotationProductBomList = ref([]);
-const productCustomInfoListData = ref([
-  {
-    type: 1,
-    isCheck: 0,
-    isCheckBox: false,
-    fileList: [],
-    remark: "",
-  },
-  {
-    type: 2,
-    isCheck: 0,
-    isCheckBox: false,
-    fileList: [],
-    remark: "",
-  },
-  {
-    type: 3,
-    isCheck: 0,
-    isCheckBox: false,
-    fileList: [],
-    remark: "",
-  },
-]);
+
 const selectProduct = (row) => {
+  const productCustomInfoListData = [
+    {
+      type: 1,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+    {
+      type: 2,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+    {
+      type: 3,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+  ];
   if (row && row.id) {
     proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
       let goods = res;
@@ -1550,7 +1453,7 @@ const selectProduct = (row) => {
           }
         );
         if (goods.isCustomized == 0) {
-          quotationProductCustomInfoList = productCustomInfoListData.value;
+          quotationProductCustomInfoList = productCustomInfoListData;
         }
         let packAsk = goods.packAsk;
         if (packAsk) {
@@ -1580,7 +1483,9 @@ const selectProduct = (row) => {
           foldWay: goods.foldWay,
           packAsk: packAsk,
           isCustomized: goods.isCustomized || 0,
-          quotationProductBomList: goods.productBomDetailList,
+          quotationProductBomList: goods.productBomDetailList.filter(
+            (x) => x.type == 2
+          ),
           quotationProductCustomInfoList: quotationProductCustomInfoList,
         });
         activeNames.value.push(formData.data.quotationProductList.length - 1);
@@ -1594,7 +1499,30 @@ const selectProduct = (row) => {
   }
 };
 const clickPushProduct = () => {
-  let quotationProductCustomInfoList = productCustomInfoListData.value;
+  const productCustomInfoListData = [
+    {
+      type: 1,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+    {
+      type: 2,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+    {
+      type: 3,
+      isCheck: 0,
+      isCheckBox: false,
+      fileList: [],
+      remark: "",
+    },
+  ];
+  let quotationProductCustomInfoList = productCustomInfoListData;
   formData.data.quotationProductList.push({
     productId: "",
     productName: "",
@@ -1875,7 +1803,7 @@ const handleSubmit = (type) => {
               }
             }
           }
-          if (checkNum == 0) {
+          if (checkNum == 0 && iele.isCustomized == 1) {
             return proxy.msgTip(`请至少勾选一个第${i + 1}条数据的定制内容`, 2);
           }
         }
@@ -1991,22 +1919,6 @@ const formDomOne = ref(null);
 const foreignDialog = ref(false);
 const formConfigOne = computed(() => {
   return [
-    // {
-    //   type: "title1",
-    //   title: "利润点数",
-    // },
-    // {
-    //   type: "number",
-    //   prop: "coefficient",
-    //   label: "利润点数",
-    //   precision: 2,
-    //   min: 0.01,
-    //   controls: false,
-    //   itemWidth: 25,
-    //   fn: (val) => {
-    //     publicTotalAmount(val);
-    //   },
-    // },
     {
       type: "title1",
       title: "商品信息",
@@ -2090,90 +2002,6 @@ const handleForeign = (row) => {
   });
 };
 
-const totalAmount = () => {
-  let money = 0;
-  if (
-    formData.data.quotationProductList &&
-    formData.data.quotationProductList.length > 0
-  ) {
-    for (let i = 0; i < formData.data.quotationProductList.length; i++) {
-      let iele = formData.data.quotationProductList[i];
-      let productPrice = 0;
-      for (let j = 0; j < iele.quotationProductBomList.length; j++) {
-        const jele = iele.quotationProductBomList[j];
-        // 计算新单价
-        jele.price = parseFloat(
-          Number(jele.priceCopy) * Number(jele.coefficient)
-        ).toFixed(2);
-        // 计算物料总计
-        jele.amount = parseFloat(
-          Number(jele.allQuantity) *
-            Number(jele.priceCopy) *
-            Number(jele.coefficient)
-        ).toFixed(2);
-        // 单个产品的一个物料的钱
-        productPrice += Number(
-          parseFloat(
-            Number(jele.quantity) *
-              Number(jele.priceCopy) *
-              Number(jele.coefficient)
-          ).toFixed(2)
-        );
-      }
-      iele.price = parseFloat(productPrice).toFixed(2);
-      iele.amount = parseFloat(
-        Number(iele.quantity) * Number(iele.price)
-      ).toFixed(2);
-      money += Number(iele.amount);
-    }
-  }
-  formData.data.amount = parseFloat(money).toFixed(2);
-};
-
-const publicTotalAmount = (val) => {
-  if (val) {
-    let money = 0;
-    if (
-      formData.data.quotationProductList &&
-      formData.data.quotationProductList.length > 0
-    ) {
-      for (let i = 0; i < formData.data.quotationProductList.length; i++) {
-        let iele = formData.data.quotationProductList[i];
-        let productPrice = 0;
-        for (let j = 0; j < iele.quotationProductBomList.length; j++) {
-          const jele = iele.quotationProductBomList[j];
-          // 系数赋值
-          jele.coefficient = val;
-          // 计算新单价
-          jele.price = parseFloat(
-            Number(jele.priceCopy) * Number(jele.coefficient)
-          ).toFixed(2);
-          // 计算物料总计
-          jele.amount = parseFloat(
-            Number(jele.allQuantity) *
-              Number(jele.priceCopy) *
-              Number(jele.coefficient)
-          ).toFixed(2);
-          // 单个产品的一个物料的钱
-          productPrice += Number(
-            parseFloat(
-              Number(jele.quantity) *
-                Number(jele.priceCopy) *
-                Number(jele.coefficient)
-            ).toFixed(2)
-          );
-        }
-        iele.price = parseFloat(productPrice).toFixed(2);
-        iele.amount = parseFloat(
-          Number(iele.quantity) * Number(iele.price)
-        ).toFixed(2);
-        money += Number(iele.amount);
-      }
-    }
-    formData.data.amount = parseFloat(money).toFixed(2);
-  }
-};
-
 const handleSubmitOne = () => {
   formDomOne.value.handleSubmit(() => {
     proxy
@@ -2529,6 +2357,23 @@ const onPreviewFile = (file) => {
     window.open(file.raw.fileUrl, "_blank");
   }
 };
+
+const handleOfCompanyIdChange = (val) => {
+  if (val) {
+    proxy
+      .get("/tenantDept/list", {
+        pageNum: 1,
+        pageSize: 9999,
+        keyword: "",
+        ancestors: val,
+        tenantId: proxy.useUserStore().user.tenantId,
+        // type: 2,
+      })
+      .then((res) => {
+        deptData.value = proxy.handleTree(res.data, "deptId");
+      });
+  }
+};
 </script>
 
 <style lang="scss" scoped>
@@ -2579,5 +2424,11 @@ const onPreviewFile = (file) => {
 :deep(.el-checkbox) {
   margin-right: 0px;
 }
+:deep(.el-collapse-item) {
+  margin-bottom: 10px;
+}
+:deep(.el-collapse-item__header) {
+  background-color: #eee;
+}
 </style>
 

+ 4 - 4
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -546,27 +546,27 @@
                 <el-col :span="12">
                   <el-form-item label="LOGO尺寸" class="wid100">
                     <el-row style="width:100%">
-                      <el-col :span="8">
+                      <el-col :span="12">
                         <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoLength'"
                                       :rules="rules.logoLength" :inline-message="true">
                           <el-input-number v-model="formData.detailsData.logoLength" placeholder="" style="width: 100%" :precision="2"
                                            :controls="false" :min="0" onmousewheel="return false;" />
                         </el-form-item>
                       </el-col>
-                      <el-col :span="8">
+                      <el-col :span="12">
                         <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoWidth'"
                                       :rules="rules.logoWidth" :inline-message="true">
                           <el-input-number v-model="formData.detailsData.logoWidth" placeholder="" style="width: 100%" :precision="2"
                                            :controls="false" :min="0" onmousewheel="return false;" />
                         </el-form-item>
                       </el-col>
-                      <el-col :span="8">
+                      <!-- <el-col :span="8">
                         <el-form-item label-width="0px" class="margin-b-0 wid100" :prop="'quotationProductList.' +index + '.logoHeight'"
                                       :rules="rules.logoHeight" :inline-message="true">
                           <el-input-number v-model="formData.detailsData.logoHeight" placeholder="" style="width: 100%" :precision="2"
                                            :controls="false" :min="0" onmousewheel="return false;" />
                         </el-form-item>
-                      </el-col>
+                      </el-col> -->
                     </el-row>
                   </el-form-item>
                 </el-col>

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

@@ -239,13 +239,13 @@
       <PriceSheetDetailList :rowData="detailRowData" dataType="2" @changeLeftData="changeLeftData"></PriceSheetDetailList>
       <template #footer>
         <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"
+        <!-- <el-button type="primary" v-debounce v-if="leftRowData.status !=88 &&leftRowData.status !=70"
                    @click="handleGenerate(leftRowData,false)">生成订单</el-button>
         <el-button type="primary" v-debounce v-if="leftRowData.status !=88 &&leftRowData.status !=70"
                    @click="handleGenerate(leftRowData,true)">生成样品单</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>
+                   @click="handleRepeal(leftRowData)">作废</el-button> -->
       </template>
     </el-dialog>
 

+ 371 - 0
src/views/MES/productionBoard/workshop/index.vue

@@ -0,0 +1,371 @@
+<template>
+  <div class="pageIndexClass" style="background:#091731;color:#fff;font-size:14px;height:calc(100vh - 100px)">
+    <div class="top">
+      <div style="display: flex;overflow: auto;">
+        <template v-for="(item,index) in processesData" :key="item.id">
+          <div style="display:flex;align-items:center;width:calc(100% / 7);padding:3px 0" v-if="index<=6">
+            <el-progress type="circle" :percentage="(Number(item.finishQuantity) / Number(item.quantity))*100" width="60"
+                         :status="(Number(item.finishQuantity) / Number(item.quantity))*100 == 100 ? 'success' : ''" />
+            <div style="margin-left:20px">
+              <div>
+                工序:{{item.progressName}}
+              </div>
+              <div>
+                计划数:{{item.quantity}}
+              </div>
+              <div>
+                完成数:{{item.finishQuantity}}
+              </div>
+            </div>
+          </div>
+        </template>
+
+      </div>
+      <div style="display: flex;overflow: auto;margin-top:15px" v-if="processesData.length>6">
+        <template v-for="(item,index) in processesData" :key="item.id">
+          <div style="display:flex;align-items:center;width:calc(100% / 7);padding:3px 0" v-if="index>6">
+            <el-progress type="circle" :percentage="(Number(item.finishQuantity) / Number(item.quantity))*100" width="60"
+                         :status="(Number(item.finishQuantity) / Number(item.quantity))*100 == 100 ? 'success' : ''" />
+            <div style="margin-left:20px">
+              <div>
+                工序:{{item.progressName}}
+              </div>
+              <div>
+                计划数:{{item.quantity}}
+              </div>
+              <div>
+                完成数:{{item.finishQuantity}}
+              </div>
+            </div>
+          </div>
+        </template>
+      </div>
+
+    </div>
+    <div style="margin-top:10px;background:#1e3159;padding:10px">
+      <div>
+        <div class="public-title">
+          总条数 {{sourceList.pagination.total}},当前第 {{sourceList.pagination.pageNum}} 页
+        </div>
+        <div style="overflow:auto;" :style="{height:`calc(100vh - ${processesData.length>6?'362':'280'}px)`}">
+          <table class="table" style="width:100%;margin-top:15px">
+            <thead>
+              <tr style="background:#243B6D">
+                <th style="width:60px">NO.</th>
+                <th style="width:60px">工序</th>
+                <th style="width:120px">订单号</th>
+                <th>产品编码</th>
+                <th>产品名称</th>
+                <th style="width:100px">尺寸(cm)</th>
+                <th>颜色</th>
+                <th style="width:80px">工单数量</th>
+                <th style="width:100px">已完成数量</th>
+                <th style="width:80px">欠量</th>
+                <th style="width:100px">昨日计划数</th>
+                <th style="width:100px">昨日完成数</th>
+                <th style="width:100px">今日计划数</th>
+                <th style="width:100px">今日完成数</th>
+                <th style="width:100px">明日计划数</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr v-for="(row,index) in sourceList.data" :key="row.id">
+                <td>{{index+1}}</td>
+                <td>{{row.progressName}}</td>
+                <td>{{row.orderCode}}</td>
+                <td>{{row.productCode}}</td>
+                <td>{{row.productName}}</td>
+                <td>{{row.productLength}}*{{row.productWidth}}*{{row.productHeight}}</td>
+                <td>{{row.productColor}}</td>
+                <td>{{row.quantity}}</td>
+                <td>{{row.finishQuantity}}</td>
+                <td>{{row.residueQuantity}}</td>
+                <td>{{row.yesterdaySchedulingQuantity}}</td>
+                <td>{{row.yesterdayFinishQuantity}}</td>
+                <td>{{row.todaySchedulingQuantity}}</td>
+                <td>{{row.todayFinishQuantity}}</td>
+                <td>{{row.tomorrowSchedulingQuantity}}</td>
+              </tr>
+            </tbody>
+          </table>
+        </div>
+
+      </div>
+
+      <!-- <el-row style="padding: 20px" justify="end" type="flex">
+        <el-pagination background layout="total, sizes, prev, pager, next, jumper" :current-page="sourceList.pagination.pageNum"
+                       :page-size="sourceList.pagination.pageSize" :total="sourceList.pagination.total" @size-change="handleSizeChange"
+                       @current-change="handlePageChange" />
+      </el-row> -->
+    </div>
+
+  </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: "orderCode",
+        // width: 150,
+      },
+    },
+    {
+      attrs: {
+        label: "报工数量",
+        prop: "quantity",
+        // width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "报工人",
+        prop: "userName",
+        // 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" }],
+});
+let timer = null;
+const setTimer = () => {
+  if (sourceList.value.pagination.total > 10) {
+    timer = setInterval(() => {
+      if (
+        sourceList.value.pagination.pageNum *
+          sourceList.value.pagination.pageSize >=
+        sourceList.value.pagination.total
+      ) {
+        sourceList.value.pagination.pageNum = 1;
+      } else {
+        sourceList.value.pagination.pageNum += 1;
+      }
+      getList();
+    }, 1000 * 10);
+  }
+};
+
+onBeforeUnmount(() => {
+  clearInterval(timer);
+});
+
+let first = true;
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/productionTaskProgress/workshopReport", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+      if (first) {
+        setTimer();
+        first = false;
+      }
+    });
+};
+
+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();
+
+const handleSizeChange = (val) => {
+  sourceList.value.pagination.pageNum = 1;
+  sourceList.value.pagination.pageSize = val;
+  getList();
+};
+const handlePageChange = (val) => {
+  sourceList.value.pagination.pageNum = val;
+  getList();
+};
+
+const processesData = ref([]);
+const getProcesses = () => {
+  proxy.post("/productionTaskProgress/workshopReportStatistics").then((res) => {
+    processesData.value = res;
+  });
+};
+getProcesses();
+</script>
+
+<style lang="scss" scoped>
+::v-deep(.el-progress__text) {
+  font-size: 14px !important;
+}
+.content {
+  padding: 20px;
+}
+.top {
+  background: #1e3159;
+  padding: 10px;
+}
+
+.table {
+  color: #fff;
+  border-collapse: collapse;
+  border-spacing: 0;
+  th,
+  td {
+    text-align: left;
+    padding: 5px 10px;
+    // padding: 5px 10px;
+  }
+  th {
+    color: #5d94c6;
+  }
+}
+
+.public-title {
+  font-size: 18px;
+  font-weight: 700;
+  padding: 10px;
+  text-align: center;
+  color: #fff;
+  background: #1f427a;
+  // background: linear-gradient(240deg, #1c2a47 0%, #1f427a 20%);
+}
+:deep(.el-progress__text) {
+  color: #5d94c6;
+}
+</style>

+ 62 - 11
src/views/MES/productionTask/index.vue

@@ -72,15 +72,37 @@
         </div>
       </template>
 
+      <template #other="{item}">
+        <div style="width: 100%">
+          <div>
+            完成:
+          </div>
+          <div style="border-top:1px solid #ebeef5;margin-top:3px">
+            结存:
+          </div>
+        </div>
+      </template>
+
       <template v-for="(slotItem, index) in processesData" v-slot:[slotItem.id]="{ item }" :key="slotItem.id">
         <div style="width:100%">
-          <span v-if="isShowCotent(slotItem,item)" style="font-weight:700;min-width:50px;line-height:18px;display:inline-block"
-                :class="showCotentQuantity(slotItem,item)">
-            {{showCotent(slotItem,item)}}
-          </span>
-          <div v-else class="no-bk">
-            -
+          <div>
+            <span v-if="isShowCotent(slotItem,item)" style="font-weight:700;min-width:50px;line-height:18px;display:inline-block"
+                  :class="showCotentQuantity(slotItem,item)">
+              {{showCotent(slotItem,item,'finishQuantity')}}
+            </span>
+            <div v-else class="no-bk">
+              -
+            </div>
+          </div>
+          <div style="border-top:1px solid #ebeef5;margin-top:3px">
+            <div v-if="isShowCotent(slotItem,item)">
+              {{showCotent(slotItem,item,'balanceQuantity') || 0}}
+            </div>
+            <div v-else class="no-bk">
+              -
+            </div>
           </div>
+
         </div>
       </template>
     </byTable>
@@ -264,8 +286,14 @@
     </el-dialog>
 
     <el-dialog title="记录查看" v-model="recordDialog" width="70%" destroy-on-close v-if="recordDialog">
+      <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-change="handleTabChange">
+        <el-tab-pane label="采购记录" name="1">
+        </el-tab-pane>
+        <el-tab-pane label="出入库流水记录" name="2">
+        </el-tab-pane>
+      </el-tabs>
       <byForm :formConfig="recordFormConfig" :formOption="recordFormOption" v-model="formData.recordData">
-        <template #detail1>
+        <template #detail1 v-if="activeName=='1'">
           <div style="width:100%">
             <el-table :data="formData.recordData.purchaseProductList">
               <el-table-column label="商品图片" width="80">
@@ -289,7 +317,7 @@
             </el-table>
           </div>
         </template>
-        <template #detail2>
+        <template #detail2 v-if="activeName=='2'">
           <div style="width:100%">
             <el-table :data="formData.recordData.stockJournalDetailsList">
               <el-table-column label="类型" width="100" :formatter="(row) => row.opType=='1'?'入库':'出库'" />
@@ -674,6 +702,15 @@ const config = ref([
       "min-width": 200,
     },
   },
+  {
+    attrs: {
+      label: "",
+      slot: "other",
+      align: "center",
+      width: 70,
+      fixed: "right",
+    },
+  },
 ]);
 const formData = reactive({
   data: {},
@@ -935,13 +972,13 @@ const isShowCotent = (slot, item) => {
     return false;
   }
 };
-const showCotent = (slot, item) => {
+const showCotent = (slot, item, att) => {
   if (item && item.productionTaskProgressList) {
     const current = item.productionTaskProgressList.find(
       (x) => x.processesId == slot.id
     );
     if (current) {
-      return current.finishQuantity;
+      return current[att];
     }
   } else {
     return false;
@@ -1001,31 +1038,36 @@ const recordFormConfig = computed(() => {
     {
       type: "title1",
       title: "采购记录",
+      isShow: activeName.value == "1",
     },
     {
       type: "slot",
       slotName: "detail1",
       label: " ",
+      isShow: activeName.value == "1",
     },
     {
       type: "title1",
       title: "出入库流水记录",
+      isShow: activeName.value == "2",
     },
     {
       type: "slot",
       slotName: "detail2",
       label: " ",
+      isShow: activeName.value == "2",
     },
   ];
 });
+const activeName = ref("1");
 const lookDetails = (item) => {
+  activeName.value = "1";
   recordDialog.value = true;
   proxy
     .post("/produceOrder/detail", {
       id: item.produceOrderId,
     })
     .then((res) => {
-      console.log(res, "aaa");
       formData.recordData = res;
       if (
         formData.recordData.purchaseProductList &&
@@ -1116,4 +1158,13 @@ const lookDetails = (item) => {
   padding: 4px;
   color: #fff;
 }
+
+::v-deep(.el-table-fixed-column--right) {
+  // vertical-align: top !important;
+  padding: 0px !important;
+  // border: 1px solid #ebeef5 !important;
+  .cell {
+    padding: 0px !important;
+  }
+}
 </style>

+ 6 - 0
src/views/systemTenant/tenant/userTenant/index.vue

@@ -82,6 +82,7 @@ const { proxy } = getCurrentInstance();
 const defaultProps = {
   children: "children",
   label: "deptName",
+  disabled: "disabled",
 };
 const deptList = ref([]);
 const sourceList = ref({
@@ -569,6 +570,11 @@ const getTreeData = () => {
       //     children: proxy.handleTree(res.data, "deptId"),
       //   },
       // ];
+      for (let i = 0; i < res.data.length; i++) {
+        if (res.data[i] && res.data[i].type == 0) {
+          res.data[i].disabled = true;
+        }
+      }
       treeData.value = proxy.handleTree(res.data, "deptId");
       deptList.value = proxy.handleTree(res.data, "deptId");
     });