姜永辉 пре 3 година
родитељ
комит
5aad7165a8

+ 3 - 0
package.json

@@ -109,6 +109,9 @@
   "gitHooks": {
     "pre-commit": "lint-staged"
   },
+  "app-plus": {
+    "softinputMode": "adjustPan"
+  },
   "lint-staged": {
     "*.js": [
       "vue-cli-service lint",

+ 2 - 0
src/locale/lang/zh-CN.js

@@ -953,12 +953,14 @@ export const others = {
  *  app登录
  */
 export const loginAppTitle = {
+  pleaseEnterAppFtyCode: '请输入工厂编码',
   pleaseEnterAppUserName: '请输入用户名',
   pleaseEnterAppUserName_placeholder: '用户名/手机号不能为空',
   pleaseEnterAppPassWord: '请输入密码',
   pleaseEnterAppPassWord_placeholder: '密码不能为空',
   rememberAppUsercodePassWord: '记住用户名和密码',
   applogin: '登录',
+  appftyCode: '工厂编码',
   appUserCode: '用户名',
   appUserPw: '密码',
 }

+ 6 - 3
src/view-app/app/prod-management/product-loss-reporting/index.vue

@@ -11,8 +11,7 @@
       formatter-flg
       placeholderType="scan"></dk-app-field>
     <!--    -->
-    <div :style="'height: ' + (tableHeight-46-61) + 'px'" style="width: 100%;overflow-y: auto;">
-
+    <div ref="scrollTable" :style="'height: ' + (tableHeight) + 'px'" style="width: 100%;overflow-y: auto;">
       <div v-if="tableRowData.length>0" style="margin: 10px">{{ $t('appProductInformation') }}</div>
       <!--    产品信息-->
       <dk-app-table :rows="rows" :tableRowData="tableRowData" :disabled-swipe="true">
@@ -162,6 +161,11 @@ export default {
 
   },
 
+  mounted() {
+    // 设置滚动的位置
+    this.tableHeight = window.screen.height - this.$refs.scrollTable.offsetTop
+  },
+
   /**
    * 初始生命周期
    * @param e
@@ -169,7 +173,6 @@ export default {
   created(e) {
     //接收参数
     this.focusItem = "moldCode"
-    this.tableHeight = window.screen.height
   },
 
 }

+ 16 - 5
src/view-app/login/app-login.vue

@@ -6,13 +6,17 @@
       style="height: 100%;width: 100%;display: flex;flex-direction: column;align-items: center;">
       <van-image style="width: 232px;height: 50px;margin-top: 100px" :src="hgLogon"></van-image>
 
-      <div style="width: 332px;height: 240px;margin-top:40px;  display: flex;border-radius: 10px;z-index: 10;
+      <div style="width: 332px;height: 290px;margin-top:40px;  display: flex;border-radius: 10px;z-index: 10;
         flex-direction: column;align-items: center;justify-content: center;background: #8c939d">
-        <div style="width: 80%;border-radius: 3px;margin: 20px">
+        <div style="width: 80%;border-radius: 3px;margin: 20px 20px 10px 20px">
+          <!-- 输输入用户名 -->
+          <dk-app-field v-model="ftyCode" formatter-flg :label="$t('appftyCode')"/>
+        </div>
+        <div style="width: 80%;border-radius: 3px;margin: 10px 20px  ">
           <!-- 输输入用户名 -->
           <dk-app-field v-model="userCode" formatter-flg :label="$t('appUserCode')"/>
         </div>
-        <div style="width: 80%;border-radius: 3px;margin: 20px">
+        <div style="width: 80%;border-radius: 3px;margin: 10px 20px ">
           <!-- 输入密码 -->
           <dk-app-field v-model="userPwd" type-input="password" :label="$t('appUserPw')"/>
         </div>
@@ -47,6 +51,7 @@ export default {
     return {
       userCode: '',                     //用户名
       userPwd: '',                      // 密码
+      ftyCode:'',                       // 工厂编码
       showLan: false,                   // 语言标识
       actions: this.$config.languages,  //语言
       loading: false,                   // 加载
@@ -88,6 +93,7 @@ export default {
       let param = {
         userCode: this.userCode,
         userPwd: this.userPwd,
+        ftyCode: this.ftyCode,
         appCode: this.$config.appCode.PDA_PROD
       }
       this.handleSubmit(param)
@@ -98,9 +104,9 @@ export default {
      * @author : 姜永辉
      * @date   : 2023/2/17 10:14
      */
-    handleSubmit({userCode, userPwd, appCode}) {
+    handleSubmit({userCode, userPwd,ftyCode, appCode}) {
       this.loading = true
-      this.handleLogin({userCode, userPwd, appCode}).then(res => {
+      this.handleLogin({ftyCode,userCode, userPwd, appCode}).then(res => {
         this.$Message.destroy()
         if (res.code === this.$config.SUCCESS_CODE) {
           if (res.data) {
@@ -146,6 +152,11 @@ export default {
      */
     validate() {
       //用户密码校验
+      if (this.ftyCode == null || "" == this.ftyCode) {
+        this.$appToast(this.$t('pleaseEnterAppFtyCode'))
+        return false
+      }
+      //用户密码校验
       if (this.userCode == null || "" == this.userCode) {
         this.$appToast(this.$t('pleaseEnterAppUserName'))
         return false