cz 1 year ago
parent
commit
33fa085800

+ 1 - 1
src/components/PDF/contractPDFOne.vue

@@ -110,7 +110,7 @@
             />
           </td>
           <td style="width: 20%">{{ item.productName }}</td>
-          <td style="width: 15%">{{ item.productModel  }} cm</td>
+          <td style="width: 15%">{{ item.productModel }} cm</td>
           <td style="width: 12%">{{ item.packMethod }}</td>
           <td style="width: 12%">
             {{ item.productQuantity }}

+ 25 - 15
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -90,17 +90,14 @@
         >
           <template #nameEnglish>
             <div style="width: 100%">
-              <!-- <el-input
-                v-model="formData.data.nameEnglish"
-                placeholder="请输入"
-                onkeyup="value = value.replace(/[^\w\.\/]/gi, '')"
-              /> -->
-              <el-input
-                v-model="formData.data.nameEnglish"
-                placeholder="请输入"
-                :formatter="(val) => val.replace(/[\u4E00-\u9FA5]/g, '')"
-                :parser="(val) => val.replace(/[\u4E00-\u9FA5]/g, '')"
-              ></el-input>
+              <el-form-item label="英文名" prop="nameEnglish">
+                <el-input
+                  v-model="formData.data.nameEnglish"
+                  placeholder="请输入"
+                  onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"
+                ></el-input>
+                <!-- @input="(val) => handleKeyup(val)" -->
+              </el-form-item>
             </div>
           </template>
           <template #productPic>
@@ -380,11 +377,9 @@ const formConfig = computed(() => {
       disabled: false,
     },
     {
-      type: "input",
-      prop: "nameEnglish",
+      type: "slot",
       slotName: "nameEnglish",
-      label: "英文名",
-      disabled: false,
+      label: "",
     },
     {
       type: "slot",
@@ -786,6 +781,21 @@ getList();
 const clickSelect = (item) => {
   proxy.$emit("selectProduct", item);
 };
+
+const handleKeypress = (event) => {
+  // 判断输入字符是否为中文字符
+  if (event.key.match(/[\u4e00-\u9fa5]/)) {
+    // 阻止输入
+    event.preventDefault();
+  }
+};
+const handleKeyup = (val) => {
+  // 过滤掉中文字符
+  formData.data.nameEnglish = formData.data.nameEnglish.replace(
+    /[\u4e00-\u9fa5]/g,
+    ""
+  );
+};
 </script>
 
 <style lang="scss" scoped>

+ 18 - 6
src/views/EHSD/productLibrary/customerProduct/index.vue

@@ -112,6 +112,18 @@
               </el-select>
             </div>
           </template>
+          <template #nameEnglish>
+            <div style="width: 100%">
+              <el-form-item label="英文名" prop="nameEnglish">
+                <el-input
+                  v-model="formData.data.nameEnglish"
+                  placeholder="请输入"
+                  onkeyup="value=value.replace(/[^\x00-\xff]/g, '')"
+                ></el-input>
+                <!-- @input="(val) => handleKeyup(val)" -->
+              </el-form-item>
+            </div>
+          </template>
           <template #productPic>
             <div>
               <el-upload
@@ -206,6 +218,9 @@ let rules = ref({
     { required: true, message: "请选择产品分类", trigger: "change" },
   ],
   name: [{ required: true, message: "请输入产品名称", trigger: "blur" }],
+  nameEnglish: [
+    { required: true, message: "请输入产品英文名", trigger: "blur" },
+  ],
   productLong: [
     { required: true, message: "请输入长 (cm)", trigger: "blur" },
   ],
@@ -419,13 +434,10 @@ const formConfig = computed(() => {
       disabled: false,
     },
     {
-      type: "input",
-      prop: "nameEnglish",
-      label: "英文名",
-      itemWidth: 100,
-      disabled: false,
+      type: "slot",
+      slotName: "nameEnglish",
+      label: "",
     },
-
     {
       type: "slot",
       slotName: "productPic",

+ 2 - 2
src/views/process/processApproval/index.vue

@@ -193,8 +193,8 @@
           >
             <el-option
               v-for="item in nextHandleUser"
-              :label="item.name"
-              :value="item.id"
+              :label="item.nickName"
+              :value="item.userId"
             >
             </el-option>
           </el-select>

+ 4 - 0
src/views/salesMange/saleContract/claim/index.vue

@@ -490,8 +490,10 @@ const submitForm = () => {
   });
 };
 const rowCurrency = ref("");
+const rowRate = ref("");
 const getDtl = (row) => {
   rowCurrency.value = row.currency;
+  rowRate.value = row.rate;
   proxy.get(`/claim/sumClaimMoney?businessId=${row.id}`).then((res) => {
     modalType.value = "edit";
     dialogVisible.value = true;
@@ -504,6 +506,7 @@ const getDtl = (row) => {
       accountManagementName: row.accountManagementName,
       claimTime: row.transactionTime,
       claimContractList: [],
+      rate: rowRate.value,
     };
     dialogVisible.value = true;
   });
@@ -566,6 +569,7 @@ const handleSelectContrct = (row) => {
     contractCode: row.code,
     money: 0,
     currency: rowCurrency.value,
+    rate: rowRate.value,
   });
   return ElMessage({
     message: "选择成功",

+ 47 - 192
src/views/salesMange/saleContract/salesDocumentary/index.vue

@@ -1,28 +1,12 @@
 <template>
   <div class="content">
-    <el-form
-      :inline="true"
-      :model="sourceList.pagination"
-      class="demo-form-inline"
-    >
+    <el-form :inline="true" :model="sourceList.pagination" class="demo-form-inline">
       <el-form-item label="销售合同号:" prop="code">
-        <el-input
-          v-model="sourceList.pagination.code"
-          placeholder="请输入销售合同号"
-        />
+        <el-input v-model="sourceList.pagination.code" placeholder="请输入销售合同号" />
       </el-form-item>
       <el-form-item label="业务员:" prop="userId">
-        <el-select
-          v-model="sourceList.pagination.userId"
-          placeholder="请选择业务员"
-        >
-          <el-option
-            v-for="item in userList"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          >
-          </el-option>
+        <el-select v-model="sourceList.pagination.userId" placeholder="请选择业务员">
+          <el-option v-for="item in userList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
@@ -30,60 +14,23 @@
       </el-form-item>
     </el-form>
     <div style="padding: 10px 20px; width: 100%; box-sizing: border-box">
-      <div
-        style="
-          width: 100%;
-          display: flex;
-          padding-bottom: 5px;
-          overflow-x: auto;
-        "
-        class="topScrollDom"
-        @scroll="handleScroll($event, true)"
-      >
-        <div
-          v-for="(item, index) in purchaseTrackType"
-          :key="index"
-          style="display: flex; align-items: center"
-        >
-          <div
-            style="width: 200px; height: 80px; position: relative"
-            @click="selectRegion(item)"
-          >
-            <div
-              :class="
-                selectRecordDocumentaryId === item.id
-                  ? 'regionSelect'
-                  : 'regionNoSelect'
-              "
-              style="cursor: pointer"
-            >
-              <div style="color: #333333; font-size: 13px; font-weight: 700">
-                {{ item.count }}
-              </div>
-              <div style="color: #333333; font-size: 12px; font-weight: 700">
-                {{ item.name }}
-              </div>
-              <div
-                class="right-bottom"
-                style="position: absolute; right: 0; bottom: 0"
-              >
+      <div style="width: 100%; display: flex; padding-bottom: 5px; overflow-x: auto" class="topScrollDom" @scroll="handleScroll($event, true)">
+        <div v-for="(item, index) in purchaseTrackType" :key="index" style="display: flex; align-items: center">
+          <div style="width: 200px; height: 80px; position: relative" @click="selectRegion(item)">
+            <div :class="selectRecordDocumentaryId === item.id ? 'regionSelect' : 'regionNoSelect'" style="cursor: pointer">
+              <div style="color: #333333; font-size: 13px; font-weight: 700">{{ item.count }}</div>
+              <div style="color: #333333; font-size: 12px; font-weight: 700">{{ item.name }}</div>
+              <div class="right-bottom" style="position: absolute; right: 0; bottom: 0">
                 {{ index + 1 }}
               </div>
             </div>
-            <el-icon class="beacon" v-if="index < purchaseTrackType.length - 1"
-              ><CaretRight
-            /></el-icon>
+            <el-icon class="beacon" v-if="index < purchaseTrackType.length - 1"><CaretRight /></el-icon>
           </div>
         </div>
       </div>
     </div>
     <div class="main-content" v-loading="loading">
-      <el-card
-        class="box-card"
-        v-for="(item, index) in sourceList.data"
-        :key="index"
-        style="margin-bottom: 20px"
-      >
+      <el-card class="box-card" v-for="(item, index) in sourceList.data" :key="index" style="margin-bottom: 20px">
         <template #header>
           <el-row>
             <el-col :span="4">
@@ -93,7 +40,7 @@
               </span>
             </el-col>
             <el-col :span="4">
-              <span>业务员: {{ item.nickName }}</span>
+              <span>业务员: {{ item.userName }}</span>
             </el-col>
             <el-col :span="4">
               <span>客户名称: {{ item.customerName }}</span>
@@ -103,79 +50,31 @@
             </el-col>
           </el-row>
         </template>
-        <div
-          style="overflow-x: auto; width: 100%"
-          class="scrollDom"
-          @scroll="handleScroll($event, false, index)"
-        >
+        <div style="overflow-x: auto; width: 100%" class="scrollDom" @scroll="handleScroll($event, false, index)">
           <el-steps :space="200" align-center>
-            <el-step
-              v-for="(itemType, key) in purchaseTrackType"
-              :key="key"
-              :title="itemType.name"
-              :status="getStatus(itemType, item)"
-            />
+            <el-step v-for="(itemType, key) in purchaseTrackType" :key="key" :title="itemType.name" :status="getStatus(itemType, item)" />
           </el-steps>
           <div style="display: flex">
-            <div
-              v-for="(itemType, key) in purchaseTrackType"
-              :key="key"
-              style="width: 200px !important; min-width: 200px !important"
-            >
+            <div v-for="(itemType, key) in purchaseTrackType" :key="key" style="width: 200px !important; min-width: 200px !important">
               <div style="padding: 8px 0; text-align: center">
-                <el-icon
-                  style="color: #409eff; cursor: pointer"
-                  @click="clickAdd(item, itemType)"
-                  ><EditPen
-                /></el-icon>
+                <el-icon style="color: #409eff; cursor: pointer" @click="clickAdd(item, itemType)"><EditPen /></el-icon>
               </div>
-              <div
-                style="text-align: center"
-                v-if="
-                  item.documentaryRecord && item.documentaryRecord[itemType.id]
-                "
-              >
+              <div style="text-align: center" v-if="item.documentaryRecord && item.documentaryRecord[itemType.id]">
                 <el-tooltip class="box-item" effect="light" placement="bottom">
                   <template #content>
-                    <div
-                      style="
-                        max-width: 400px;
-                        max-height: 50vh;
-                        overflow-y: auto;
-                      "
-                    >
+                    <div style="max-width: 400px; max-height: 50vh; overflow-y: auto">
                       <el-timeline>
                         <el-timeline-item
-                          v-for="(activity, index) in item.documentaryRecord[
-                            itemType.id
-                          ]"
+                          v-for="(activity, index) in item.documentaryRecord[itemType.id]"
                           :key="index"
                           :timestamp="activity.createTime"
-                          :hide-timestamp="true"
-                        >
+                          :hide-timestamp="true">
                           <div style="background-color: #e2fbe8; padding: 8px">
-                            <div style="font-size: 12px">
-                              {{ activity.createTime }}
-                            </div>
-                            <div
-                              style="font-size: 12px"
-                              v-html="getStyle(activity.remark)"
-                            ></div>
-                            <div
-                              v-if="
-                                activity.fileList &&
-                                activity.fileList.length > 0
-                              "
-                            >
-                              <div
-                                v-for="(file, index) in activity.fileList"
-                                :key="index"
-                              >
-                                <a
-                                  style="color: #409eff; cursor: pointer"
-                                  @click="openFile(file.fileUrl)"
-                                  >{{ file.fileName }}</a
-                                >
+                            <div style="font-size: 12px">{{ activity.createTime }}</div>
+                            <div style="font-size: 12px" v-html="getStyle(activity.remark)"></div>
+                            <div v-if="activity.fileList && activity.fileList.length > 0">
+                              <div v-for="(file, index) in activity.fileList" :key="index">
+                                <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
                               </div>
                             </div>
                           </div>
@@ -183,15 +82,7 @@
                       </el-timeline>
                     </div>
                   </template>
-                  <span
-                    style="
-                      color: #409eff;
-                      cursor: pointer;
-                      padding: 8px 0;
-                      font-size: 12px;
-                    "
-                    >跟单详情</span
-                  >
+                  <span style="color: #409eff; cursor: pointer; padding: 8px 0; font-size: 12px">跟单详情</span>
                 </el-tooltip>
               </div>
             </div>
@@ -208,32 +99,14 @@
         :page-size="sourceList.pagination.pageSize"
         :total="sourceList.pagination.total"
         @size-change="handleSizeChange"
-        @current-change="handlePageChange"
-      />
+        @current-change="handlePageChange" />
     </el-row>
 
-    <el-dialog
-      :title="title"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="600"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog :title="title" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #completionTime>
           <div>
-            <el-date-picker
-              v-model="formData.data.completionTime"
-              type="datetime"
-              placeholder="请选择完成时间"
-              value-format="YYYY-MM-DD HH:mm:ss"
-            />
+            <el-date-picker v-model="formData.data.completionTime" type="datetime" placeholder="请选择完成时间" value-format="YYYY-MM-DD HH:mm:ss" />
           </div>
         </template>
         <template #file>
@@ -244,8 +117,7 @@
               :data="uploadData"
               multiple
               :before-upload="uploadFile"
-              :on-preview="onPreviewFile"
-            >
+              :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -253,9 +125,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
   </div>
@@ -312,22 +182,16 @@ const handleScroll = (event, flag, index) => {
   }
 };
 const getDict = () => {
-  proxy
-    .get("/tenantUser/list", {
-      pageNum: 1,
-      pageSize: 10000,
-      tenantId: useUserStore().user.tenantId,
-    })
-    .then((res) => {
-      if (res.rows && res.rows.length > 0) {
-        userList.value = res.rows.map((item) => {
-          return {
-            label: item.nickName,
-            value: item.userId,
-          };
-        });
-      }
-    });
+  proxy.get("/tenantUser/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
+    if (res.rows && res.rows.length > 0) {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    }
+  });
 };
 const selectRecordDocumentaryId = ref("");
 const getList = () => {
@@ -371,10 +235,7 @@ const handlePageChange = (val) => {
 };
 const selectRegion = (item) => {
   sourceList.value.pagination.pageNum = 1;
-  if (
-    selectRecordDocumentaryId.value &&
-    selectRecordDocumentaryId.value === item.id
-  ) {
+  if (selectRecordDocumentaryId.value && selectRecordDocumentaryId.value === item.id) {
     selectRecordDocumentaryId.value = "";
   } else {
     selectRecordDocumentaryId.value = item.id;
@@ -382,11 +243,7 @@ const selectRegion = (item) => {
   getList();
 };
 const getStatus = (typeItem, row) => {
-  if (
-    row.documentaryRecord &&
-    row.documentaryRecord[typeItem.id] &&
-    row.documentaryRecord[typeItem.id].length > 0
-  ) {
+  if (row.documentaryRecord && row.documentaryRecord[typeItem.id] && row.documentaryRecord[typeItem.id].length > 0) {
     return "success";
   }
   return "process";
@@ -431,9 +288,7 @@ const formConfig = computed(() => {
   ];
 });
 const rules = ref({
-  completionTime: [
-    { required: true, message: "请选择完成时间", trigger: "change" },
-  ],
+  completionTime: [{ required: true, message: "请选择完成时间", trigger: "change" }],
 });
 const clickAdd = (item, row) => {
   title.value = "编辑: " + row.name;