cz 1 year ago
parent
commit
c2e97a648b

+ 15 - 17
src/components/PDF/contractPDFOne.vue

@@ -20,11 +20,19 @@
             </div>
 
             <div style="font-size: 14px; color: #000">
-              Address: {{ pdfData.sellDetailedAddress }}
+              Address: {{ pdfData.sellDetailedAddressEn }}
             </div>
             <div style="font-size: 14px; color: #000; margin-top: 5px">
-              {{ pdfData.sellCityName }} , {{ pdfData.sellProvinceName }} ,
-              {{ pdfData.sellCountryName }}
+              {{ pdfData.sellCityNameEn }} , {{ pdfData.sellProvinceNameEn }} ,
+              {{ pdfData.sellCountryNameEn }}
+            </div>
+
+            <div style="font-size: 14px; color: #000; margin-top: 10px">
+              地址: {{ pdfData.sellCountryName }} ,
+              {{ pdfData.sellProvinceName }} , {{ pdfData.sellCityName }}
+            </div>
+            <div style="font-size: 14px; color: #000; margin-top: 5px">
+              {{ pdfData.sellDetailedAddress }}
             </div>
             <div style="margin: 8px 0; color: black">
               Tel: <span>{{ pdfData.sellContactNumber }}</span>
@@ -65,22 +73,11 @@
           <td style="width: 35%">{{ pdfData.createTimeEn }}</td>
         </tr>
         <tr>
-          <!-- 客户PO -->
+          <!-- 客户合同号 -->
           <td style="width: 15%">PO No.</td>
           <td style="width: 35%"></td>
-          <!-- 贸易方式 -->
-          <td style="width: 15%">Price Term:</td>
-          <td style="width: 35%">
-            {{ dictValueLabel(pdfData.tradeMethods, tradeMethods) }}
-          </td>
-        </tr>
-        <tr>
-          <!-- 最终目的地 -->
-          <td style="width: 15%">Final Destination:</td>
-          <td style="width: 35%">{{ pdfData.buyCityName }}</td>
-          <!-- 装货港 -->
           <td style="width: 15%">Loading Port:</td>
-          <td style="width: 35%"></td>
+          <td style="width: 35%">{{ pdfData.transportRemark }}</td>
         </tr>
       </table>
       <div style="height: 15px; background: #7f197f"></div>
@@ -113,7 +110,7 @@
             />
           </td>
           <td style="width: 20%">{{ item.productName }}</td>
-          <td style="width: 15%">{{ item.productSpec }}</td>
+          <td style="width: 15%">{{ item.productModel  }} cm</td>
           <td style="width: 12%">{{ item.packMethod }}</td>
           <td style="width: 12%">
             {{ item.productQuantity }}
@@ -283,6 +280,7 @@ const props = defineProps({
 const getPdfData = (query) => {
   proxy.post("/contract/getContractPdfInfo", query).then((res) => {
     pdfData.value = res;
+    console.log(res, "daada");
     if (pdfData.value.advanceRatio) {
       pdfData.value.advanceRatio = parseFloat(
         pdfData.value.advanceRatio

+ 94 - 31
src/components/PDF/purchasePDFOne.vue

@@ -55,12 +55,11 @@
       <table border="1" style="width: 100%" class="table">
         <tr>
           <td style="width: 15%" class="center-class">产品图片</td>
-          <td style="width: 20%" class="center-class">LOGO图</td>
-          <td style="width: 15%" class="center-class">产品名称</td>
-          <td style="width: 13%" class="center-class">尺寸cm</td>
-          <td style="width: 12%" class="center-class">数量</td>
-          <td style="width: 13%" class="center-class">单价</td>
-          <td style="width: 12%" class="center-class">总价</td>
+          <td style="width: 20%" class="center-class">产品名称</td>
+          <td style="width: 18%" class="center-class">尺寸cm</td>
+          <td style="width: 15%" class="center-class">数量</td>
+          <td style="width: 15%" class="center-class">单价</td>
+          <td style="width: 17%" class="center-class">总价</td>
         </tr>
         <template
           v-if="
@@ -78,37 +77,63 @@
                 v-if="item.fileList && item.fileList.length > 0"
               />
             </td>
-            <td style="width: 20%" class="center-class"></td>
-            <td style="width: 15%" class="center-class">
+
+            <td style="width: 20%" class="center-class">
               {{ item.productName }}
             </td>
-            <td style="width: 13%" class="center-class">
+            <td style="width: 18%" class="center-class">
               {{ item.productModel }}
             </td>
-            <td style="width: 12%" class="center-class">
+            <td style="width: 15%" class="center-class">
               {{ item.quantity }}
             </td>
-            <td style="width: 13%" class="center-class">
+            <td style="width: 15%" class="center-class">
               {{ pdfData.currency }} {{ item.price }}
             </td>
-            <td style="width: 12%" class="center-class">
+            <td style="width: 17%" class="center-class">
               {{ pdfData.currency }} {{ moneyFormat(item.amount, 2) }}
             </td>
           </tr>
         </template>
+        <template
+          v-if="
+            pdfData.purchaseProjectList &&
+            pdfData.purchaseProjectList.length > 0
+          "
+        >
+          <tr>
+            <td colspan="5">
+              <div
+                v-for="(item, index) in pdfData.purchaseProjectList"
+                :key="item.id"
+              >
+                {{ item.payName }}:
+              </div>
+            </td>
+            <td class="center-class">
+              <div
+                v-for="(item, index) in pdfData.purchaseProjectList"
+                :key="item.id"
+              >
+                {{ pdfData.currency }}
+                {{ moneyFormat(item.amount, 2) }}
+              </div>
+            </td>
+          </tr>
+        </template>
 
         <tr>
-          <td colspan="6">合计:</td>
+          <td colspan="5">合计:</td>
           <td class="center-class">
             {{ pdfData.currency }} {{ moneyFormat(pdfData.amount, 2) }}
           </td>
         </tr>
         <tr>
-          <td colspan="7">大写: {{ NumberToChinese(pdfData.amount) }}</td>
+          <td colspan="6">大写: {{ NumberToChinese(pdfData.amount) }}</td>
         </tr>
         <tr>
           <td>乙方收款账户:</td>
-          <td colspan="6">
+          <td colspan="5">
             银行: {{ pdfData.openingBank }}<br />
             账户名: {{ pdfData.openingName }}<br />
             联系人: {{ pdfData.contactPerson }}<br />
@@ -117,17 +142,17 @@
         </tr>
         <tr>
           <td>收货地址:</td>
-          <td colspan="6">
-            {{ pdfData.buyProvinceName }} , {{ pdfData.buyCityName }} ,
-            {{ pdfData.buyAddress }} ,
-            {{ pdfData.buyPostalCode }}
-            <br />
-            {{ pdfData.buyContactName }} {{ pdfData.buyContactNumber }}
+          <td colspan="5">
+            {{ pdfData.address }}
           </td>
         </tr>
         <tr>
-          <td>交货时间:</td>
-          <td colspan="6">{{ pdfData.deliveryTime }}</td>
+          <td>交货日期:</td>
+          <td colspan="5">
+            <span v-if="pdfData.deliveryTime">{{
+              pdfData.deliveryTime.slice(0, 10)
+            }}</span>
+          </td>
         </tr>
         <tr>
           <td>付款方式:</td>
@@ -137,7 +162,33 @@
         </tr>
         <tr>
           <td colspan="7">
-            <div v-html="getHtml(pdfData.remark)"></div>
+            <div>
+              二、相关约定 <br />
+              1.所有与食品直接接触的产品,如菜板,芝士板需通过食品级测试,(LFGB测试-过甲醛和重金属测试)。请
+              各供应商在采购板材和生产过程中务必使用合格的胶水和油漆等,否则客户会取消订单或由此产生的费用由工厂承担。
+              <br />
+              2.供货方应在收到订单后的一个有效工作日内回复确认,否则视供方默认订单条款。<br />
+              3.需在7个工作日内提供1套产前确认样给我方确认。<br />
+              4.产品应无碰伤,无开裂,无缺口,无毛刺,不得有不平整不光滑现象。<br />
+              5.必须按规定日期和双方确认的品质标准交货。如由于工厂的交期延期,导致客户取消订单或者由此产生额外费用
+              ,全由工厂承担。<br />
+              6.包装前须将产品上灰尘清理干净,做好清洁工作。<br />
+              7.如有合同附件,同样具有法律效力。本合同壹式两份,双方各执壹份,合同传真件与正本具有同等法津效力。<br />
+              8.如果我司的产品的结构有不合理,请工厂告知!<br />
+              9.竹子湿度控制在12%以下,如有需要的可配合一包干燥剂,避免霉变。<br />
+              10.订单出货后,每单每款产品需提供2个不计价大货样给我司,未提供,则每单扣款500元,且货款暂缓。<br />
+              三、违约责任
+              <br />1.
+              如因质量问题导致交货期延迟,或因产品结构及包装等造成的返工损失由供方自负。因质量或交期导致需方客
+              户的索赔由供方承担(质量标准经由需方或第三方出厂前出具验货报告为准)。<br />
+              2.
+              如在约定时间内无法完成订单供客人验货,或因验货不合格而造成客人产生额外费用,将由供方承担。<br />
+              3.
+              逾期交货(含合格品数量不足,)的,按合同总额的千分之五支付日违约金至履约日(不含需方不能及时提供
+              的约定材料或相关资料导致的逾期)。逾期交货15日的,需方有权解除合同,供方应按合同总额的30%支付违约金
+              。<br />
+              四、合同发生争议时,双方应协商解决,协商不成时,任何一方均可向当地人民法院起诉。
+            </div>
           </td>
         </tr>
         <tr>
@@ -151,7 +202,7 @@
           </td>
         </tr>
       </table>
-      <div
+      <!-- <div
         v-if="
           pdfData.ehsdPurchaseProductList &&
           pdfData.ehsdPurchaseProductList.length > 0
@@ -172,24 +223,24 @@
             <div v-html="getHtml(item.remark)"></div>
           </div>
         </div>
-      </div>
+      </div> -->
       <!-- 出货 -->
       <div style="height: 20px"></div>
       <table border="1" style="width: 100%" class="table">
         <tr>
-          <td class="center-class">出货时间</td>
           <td class="center-class">产品名称</td>
+          <td class="center-class">出货时间</td>
           <td class="center-class">出货数量</td>
         </tr>
         <template
           v-if="
-            pdfData.packDetailProductList &&
-            pdfData.packDetailProductList.length > 0
+            pdfData.purchaseArrivalList &&
+            pdfData.purchaseArrivalList.length > 0
           "
         >
-          <tr v-for="item in pdfData.packDetailProductList" :key="item.id">
-            <td>{{ item.shipmentTime }}</td>
+          <tr v-for="item in pdfData.purchaseArrivalList" :key="item.id">
             <td>{{ item.productName }}</td>
+            <td>{{ item.arrivalTime }}</td>
             <td>{{ item.quantity }}</td>
           </tr>
         </template>
@@ -223,6 +274,7 @@ const getHtml = (str) => {
 const handlePrintPdf = (row) => {
   proxy.post("/ehsdPurchase/detail", { id: row.id }).then((res) => {
     pdfData.value = res;
+    console.log(res, "ada");
     // 拿去多公司配置的logo图
     if (pdfData.value.buyCorporationId) {
       proxy
@@ -236,6 +288,17 @@ const handlePrintPdf = (row) => {
         });
     }
     // 拿取产品图
+    let arr = [];
+    for (let i = 0; i < pdfData.value.ehsdPurchaseProductList.length; i++) {
+      const e = pdfData.value.ehsdPurchaseProductList[i];
+      if (
+        e.purchaseProductMountingsList &&
+        e.purchaseProductMountingsList.length > 0
+      ) {
+        arr = arr.concat(e.purchaseProductMountingsList);
+      }
+    }
+    pdfData.value.ehsdPurchaseProductList = arr;
     if (
       pdfData.value.ehsdPurchaseProductList &&
       pdfData.value.ehsdPurchaseProductList.length > 0

+ 14 - 7
src/components/PDF/samplePDF.vue

@@ -20,11 +20,18 @@
             </div>
 
             <div style="font-size: 14px; color: #000">
-              Address: {{ pdfData.sellDetailedAddress }}
+              Address: {{ pdfData.sellDetailedAddressEn }}
             </div>
             <div style="font-size: 14px; color: #000; margin-top: 5px">
-              {{ pdfData.sellCityName }} , {{ pdfData.sellProvinceName }} ,
-              {{ pdfData.sellCountryName }}
+              {{ pdfData.sellCityNameEn }} , {{ pdfData.sellProvinceNameEn }} ,
+              {{ pdfData.sellCountryNameEn }}
+            </div>
+            <div style="font-size: 14px; color: #000; margin-top: 10px">
+              地址: {{ pdfData.sellCountryName }} ,
+              {{ pdfData.sellProvinceName }} , {{ pdfData.sellCityName }}
+            </div>
+            <div style="font-size: 14px; color: #000; margin-top: 5px">
+              {{ pdfData.sellDetailedAddress }}
             </div>
             <div style="margin: 8px 0; color: black">
               Tel: <span>{{ pdfData.sellContactNumber }}</span>
@@ -66,7 +73,7 @@
         </tr>
         <tr>
           <td style="width: 15%">Contact Person:</td>
-          <td style="width: 35%">{{ pdfData.createUserName }}</td>
+          <td style="width: 35%">{{ pdfData.createUserNameEn }}</td>
           <td style="width: 15%">Email:</td>
           <td style="width: 35%">
             {{ pdfData.createUserEmail }}
@@ -74,7 +81,7 @@
         </tr>
         <tr>
           <td style="width: 15%">Payment Teams:</td>
-          <td style="width: 35%"></td>
+          <td style="width: 35%">{{ pdfData.remark }}</td>
           <td style="width: 15%">Lead Time:</td>
           <td style="width: 35%">{{ pdfData.deliveryTime }}</td>
         </tr>
@@ -104,8 +111,8 @@
               v-if="item.fileList && item.fileList.length > 0"
             />
           </td>
-          <td style="width: 20%">{{ item.productRemark }}</td>
-          <td style="width: 15%">{{ item.productSpec }}</td>
+          <td style="width: 20%">{{ item.productName }}</td>
+          <td style="width: 15%">{{ item.productModel }} cm</td>
           <td style="width: 15%">
             {{ item.productQuantity }}
           </td>

+ 2 - 1
src/components/process/EHSD/Contract.vue

@@ -855,7 +855,7 @@ const cityData = ref([]);
 const customerUserList = ref([]);
 const openProductCompany = ref(false);
 const openProductCustomer = ref(false);
-const activeName = ref("");
+const activeName = ref("1");
 const formData = reactive({
   data: {
     currency: "",
@@ -1400,6 +1400,7 @@ const selectProduct = (goods) => {
         {
           fileUrl: fileUrl,
           productId: goods.id,
+          productCnName: goods.nameEnglish,
           productName: goods.name,
           productModel:
             goods.productLong +

+ 2 - 1
src/components/process/EHSD/ContractChange.vue

@@ -855,7 +855,7 @@ const cityData = ref([]);
 const customerUserList = ref([]);
 const openProductCompany = ref(false);
 const openProductCustomer = ref(false);
-const activeName = ref("");
+const activeName = ref("1");
 const formData = reactive({
   data: {
     currency: "",
@@ -1393,6 +1393,7 @@ const selectProduct = (goods) => {
         {
           fileUrl: fileUrl,
           productId: goods.id,
+          productCnName: goods.nameEnglish,
           productName: goods.name,
           productModel:
             goods.productLong +

+ 4 - 4
src/components/process/EHSD/Purchase.vue

@@ -1433,9 +1433,8 @@ defineExpose({
 onMounted(() => {
   if (props.queryData.ids) {
     proxy.post("/delivery/page", { ids: props.queryData.ids }).then((res) => {
-      let arr = props.queryData.ids.split(",") || [];
       formData.data.dataResource = props.queryData.type;
-      formData.data.dataResourceId = arr[0];
+      formData.data.dataResourceId = route.query.dataResourceId;
       if (res.rows && res.rows.length > 0) {
         formData.data.purchaseProductList = res.rows.map((item) => {
           return {
@@ -1463,7 +1462,7 @@ onMounted(() => {
                 remark: "",
                 json: "",
                 fileUrl: "",
-                activeName: false,
+                activeName: true,
               },
             ],
             fileList: [],
@@ -1550,6 +1549,7 @@ onMounted(() => {
           .then((fileObj) => {
             for (let i = 0; i < formData.data.purchaseProductList.length; i++) {
               const e = formData.data.purchaseProductList[i];
+              e.activeName = true;
               for (const key in fileObj) {
                 if (e.productId === key) {
                   e.fileList = fileObj[key] || [];
@@ -1730,7 +1730,7 @@ const selectMaterial = (goods) => {
       remark: "",
       json: "",
       fileUrl: fileUrl,
-      activeName: false,
+      activeName: true,
     });
     ElMessage({
       message: "添加成功!",

+ 17 - 11
src/components/process/EHSD/Sample.vue

@@ -137,7 +137,7 @@
                   >
                     <el-option
                       v-for="item in countryData"
-                      :label="item.chineseName"
+                      :label="item.name"
                       :value="item.id"
                     >
                     </el-option>
@@ -463,7 +463,12 @@
                 <div v-else></div>
               </template>
             </el-table-column>
-            <el-table-column label="商品名称" min-width="180">
+            <el-table-column
+              prop="productCnName"
+              label="商品中文名"
+              min-width="130"
+            />
+            <el-table-column label="商品英文名" min-width="180">
               <template #default="{ row, $index }">
                 <div style="width: 100%">
                   <el-form-item
@@ -852,7 +857,7 @@ const cityData = ref([]);
 const customerUserList = ref([]);
 const openProductCompany = ref(false);
 const openProductCustomer = ref(false);
-const activeName = ref("");
+const activeName = ref("1");
 const formData = reactive({
   data: {
     currency: "",
@@ -956,12 +961,12 @@ const formConfig = computed(() => {
       slotName: "shipment",
       label: "出货计划",
     },
-    {
-      type: "select",
-      label: "提交类型",
-      prop: "submitType",
-      data: submitType.value,
-    },
+    // {
+    //   type: "select",
+    //   label: "提交类型",
+    //   prop: "submitType",
+    //   data: submitType.value,
+    // },
   ];
 });
 const rules = ref({
@@ -1123,8 +1128,7 @@ const changeTemplate = (val) => {
                   (item) => item.id === detailCorporation.countryId
                 );
                 if (sellCountryData && sellCountryData.length > 0) {
-                  formData.data.sellCountryName =
-                    sellCountryData[0].chineseName;
+                  formData.data.sellCountryName = sellCountryData[0].name;
                 } else {
                   formData.data.sellCountryName = "";
                 }
@@ -1303,6 +1307,7 @@ const selectProduct = (goods) => {
       formData.data.sampleProductList.push({
         fileUrl: fileUrl,
         productId: goods.id,
+        productCnName: goods.nameEnglish,
         productName: goods.name,
         productModel:
           goods.productLong + "*" + goods.productWide + "*" + goods.productHigh,
@@ -1317,6 +1322,7 @@ const selectProduct = (goods) => {
         {
           fileUrl: fileUrl,
           productId: goods.id,
+          productCnName: goods.nameEnglish,
           productName: goods.name,
           productModel:
             goods.productLong +

+ 8 - 0
src/components/process/SendPurchase.vue

@@ -839,6 +839,7 @@ onMounted(() => {
     });
     getAuxiliaryData();
   }
+
   if (route.query && route.query.processType) {
     let businessId = route.query.businessId;
     proxy.post("/ehsdPurchase/detail", { id: businessId }).then((res) => {
@@ -846,6 +847,13 @@ onMounted(() => {
       for (const key in res) {
         formData.data[key] = res[key];
       }
+      if (
+        formData.data.sellCorporationId &&
+        formData.data.purchaseProductList.length > 0
+      ) {
+        const ids = formData.data.purchaseProductList.map((x) => x.productId);
+        getAuxiliaryData(formData.data.sellCorporationId, ids);
+      }
       handleChangeAmount();
     });
   }

+ 4 - 0
src/views/EHSD/procurement/handoverSlipEHSD/index.vue

@@ -236,14 +236,17 @@ const getList = async (req) => {
 getList();
 const clickPurchase = (row) => {
   let ids = "";
+  let dataResourceId = "";
   if (row && row.id) {
     ids = row.id;
+    dataResourceId = row.contractId;
   } else {
     ids = selectData.value
       .map((item) => {
         return item.id;
       })
       .join(",");
+    dataResourceId = selectData.value[0].contractId;
   }
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
@@ -255,6 +258,7 @@ const clickPurchase = (row) => {
       ids: ids,
       type: 1,
       submitType: "10",
+      dataResourceId,
     },
   });
 };

+ 4 - 0
src/views/EHSD/procurement/handoverSlipSampleEHSD/index.vue

@@ -236,14 +236,17 @@ const getList = async (req) => {
 getList();
 const clickPurchase = (row) => {
   let ids = "";
+  let dataResourceId = "";
   if (row && row.id) {
     ids = row.id;
+    dataResourceId = row.sampleId;
   } else {
     ids = selectData.value
       .map((item) => {
         return item.id;
       })
       .join(",");
+    dataResourceId = selectData.value[0].sampleId;
   }
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
@@ -255,6 +258,7 @@ const clickPurchase = (row) => {
       ids: ids,
       type: 2,
       submitType: "10",
+      dataResourceId,
     },
   });
 };

+ 28 - 0
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -598,6 +598,34 @@ const getList = async (req) => {
 getDict();
 getList();
 const newPriceSheet = () => {
+  // let arr = [];
+  // for (let j = 0; j < 5; j++) {
+  //   let a = [];
+  //   for (let i = 0; i < 7; i++) {
+  //     if (i < 5) {
+  //       let num = Math.ceil(Math.random() * 36);
+  //       if (a.includes(num)) {
+  //         a.push(Math.ceil(Math.random() * 36));
+  //       } else {
+  //         a.push(num);
+  //       }
+  //     } else {
+  //       let num = Math.ceil(Math.random() * 12);
+  //       if (i == 6) {
+  //         if (a[i - 1] == num) {
+  //           a.push(Math.ceil(Math.random() * 12));
+  //         } else {
+  //           a.push(num);
+  //         }
+  //       } else {
+  //         a.push(num);
+  //       }
+  //     }
+  //   }
+  //   arr.push(a);
+  // }
+  // console.log(arr, "aa");
+  // return;
   proxy.$router.replace({
     path: "/platform_manage/process/processApproval",
     query: {

+ 3 - 0
src/views/index.vue

@@ -119,6 +119,7 @@ const pushProcessApproval = (row) => {
         processType: 20,
         version: row.version,
         businessId: row.businessId,
+        submitType: "10",
       },
     });
     return;
@@ -138,6 +139,7 @@ const pushProcessApproval = (row) => {
           processType: nodeType == 1 ? 30 : 10,
           version: row.version,
           businessId: row.businessId,
+          submitType: "10",
         },
       });
     }
@@ -153,6 +155,7 @@ const pushProcessApprovalOne = (row) => {
       processType: 20,
       version: row.version,
       businessId: row.businessId,
+      submitType: "10",
     },
   });
   return;

+ 2 - 0
src/views/process/dealWith/backlog.vue

@@ -158,6 +158,7 @@ const config = computed(() => {
                     processType: 20,
                     version: row.version,
                     businessId: row.businessId,
+                    submitType: "10",
                   },
                 });
                 return;
@@ -181,6 +182,7 @@ const config = computed(() => {
                         processType: nodeType == 1 ? 30 : 10,
                         businessId: row.businessId,
                         version: row.version,
+                        submitType: "10",
                       },
                     });
                   }

+ 2 - 0
src/views/process/dealWith/index.vue

@@ -170,6 +170,7 @@ const config = computed(() => {
                     processType: 20,
                     version: row.version,
                     businessId: row.businessId,
+                    submitType: "10",
                   },
                 });
                 return;
@@ -193,6 +194,7 @@ const config = computed(() => {
                         processType: nodeType == 1 ? 30 : 10,
                         businessId: row.businessId,
                         version: row.version,
+                        submitType: "10",
                       },
                     });
                   }

+ 111 - 32
src/views/systemTenant/tenant/userTenant/index.vue

@@ -12,11 +12,24 @@
           action: () => openModal(),
         },
       ]"
-      @get-list="getList">
+      @get-list="getList"
+    >
     </byTable>
 
-    <el-dialog :title="modalType == 'add' ? '添加用户' : '编辑用户'" 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="modalType == 'add' ? '添加用户' : '编辑用户'"
+      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 #deptId>
           <div style="width: 100%">
             <el-tree-select
@@ -25,26 +38,60 @@
               check-strictly
               :render-after-expand="false"
               node-key="deptId"
-              :props="defaultProps" />
+              :props="defaultProps"
+            />
           </div>
         </template>
         <template #account>
-          <el-input style="width: 150px; margin-right: 10px" v-model="formData.data.userName" @change="changeUserName" placeholder="请输入用户名"></el-input>
-          <el-input style="width: 150px; margin-right: 10px" v-model="formData.data.password" @change="changePassword" placeholder="密码"></el-input>
-          <span style="color: #409eff; cursor: pointer" @click="newPassword">随机生成</span>
+          <el-input
+            style="width: 150px; margin-right: 10px"
+            v-model="formData.data.userName"
+            @change="changeUserName"
+            placeholder="请输入用户名"
+          ></el-input>
+          <el-input
+            style="width: 150px; margin-right: 10px"
+            v-model="formData.data.password"
+            @change="changePassword"
+            placeholder="密码"
+          ></el-input>
+          <span style="color: #409eff; cursor: pointer" @click="newPassword"
+            >随机生成</span
+          >
         </template>
       </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>
 
-    <el-dialog title="修改密码" v-if="roomDialogVisible" v-model="roomDialogVisible" width="300" v-loading="loading">
+    <el-dialog
+      title="修改密码"
+      v-if="roomDialogVisible"
+      v-model="roomDialogVisible"
+      width="300"
+      v-loading="loading"
+    >
       <template #footer>
-        <el-input v-model="password" placeholder="请输入新密码" @change="changePassword2" style="margin-bottom: 20px" />
-        <el-button @click="roomDialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitPassword(password)" size="large" :loading="submitLoading">确 定</el-button>
+        <el-input
+          v-model="password"
+          placeholder="请输入新密码"
+          @change="changePassword2"
+          style="margin-bottom: 20px"
+        />
+        <el-button @click="roomDialogVisible = false" size="large"
+          >取 消</el-button
+        >
+        <el-button
+          type="primary"
+          @click="submitPassword(password)"
+          size="large"
+          :loading="submitLoading"
+          >确 定</el-button
+        >
       </template>
     </el-dialog>
   </div>
@@ -92,6 +139,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "英文名",
+        prop: "nickNameEn",
+        align: "left",
+      },
+    },
+    {
+      attrs: {
         label: "用户名",
         prop: "userName",
       },
@@ -164,11 +218,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post(
                     "/tenantUser/" + row.userId,
@@ -193,12 +251,18 @@ const config = computed(() => {
   ];
 });
 const getDict = () => {
-  proxy.get("/tenantDept/list", { pageNum: 1, pageSize: 10000, tenantId: useUserStore().user.tenantId }).then((res) => {
-    deptList.value.data = proxy.handleTree(res.data, "deptId");
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      deptList.value.data = proxy.handleTree(res.data, "deptId");
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
@@ -243,6 +307,11 @@ const formConfig = computed(() => {
       label: "姓名",
     },
     {
+      type: "input",
+      prop: "nickNameEn",
+      label: "英文名",
+    },
+    {
       type: "slot",
       prop: "userName",
       slotName: "account",
@@ -299,15 +368,19 @@ const rules = ref({
   phonenumber: [{ required: true, message: "请输入手机号", trigger: "blur" }],
 });
 const getUserList = () => {
-  proxy.get(`/tenantRole/list?pageNum=1&pageSize=10000&tenantId=${sourceList.value.pagination.tenantId}`).then((message) => {
-    formConfig.value[4].data = message.rows.map((item) => {
-      return {
-        ...item,
-        id: item.roleId,
-        label: item.roleName,
-      };
+  proxy
+    .get(
+      `/tenantRole/list?pageNum=1&pageSize=10000&tenantId=${sourceList.value.pagination.tenantId}`
+    )
+    .then((message) => {
+      formConfig.value[5].data = message.rows.map((item) => {
+        return {
+          ...item,
+          id: item.roleId,
+          label: item.roleName,
+        };
+      });
     });
-  });
 };
 getUserList();
 const openModal = () => {
@@ -327,7 +400,13 @@ const submitForm = () => {
     const method = modalType.value == "add" ? "POST" : "PUT";
     proxy.post("/tenantUser", formData.data, method).then(() => {
       if (formData.data.password && formData.data.userId) {
-        proxy.post("/tenantUser/resetPwd", { password: formData.data.password, userId: formData.data.userId }, "PUT").then();
+        proxy
+          .post(
+            "/tenantUser/resetPwd",
+            { password: formData.data.password, userId: formData.data.userId },
+            "PUT"
+          )
+          .then();
       }
       ElMessage({
         message: modalType.value == "add" ? "添加成功" : "编辑成功",

+ 1 - 1
vite.config.js

@@ -41,7 +41,7 @@ export default defineConfig(({
         '/dev-api': {
           target: 'http://139.9.102.170:9901/test-api',
           // 正式地址
-          // target:"http://139.9.102.170:9900/prod-api",
+          // target: "http://139.9.102.170:9900/prod-api",
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, '')
         }