Bladeren bron

Merge branch 'master' of http://git.dongkesoft.com:9001/DK-MES-3.0/mes-web

# Conflicts:
#	src/components/base/edit-tree-table/edit-tree-table.vue
koushanshan 2 jaren geleden
bovenliggende
commit
ac63f91124

+ 1 - 0
src/api/pages/common/common.js

@@ -157,6 +157,7 @@ export default {
   appCommonService: {
     prefix: 'mdm-server/app/mst/common/',
     getMaterialType:'get_material_type',
+    getManufactures: 'get_manufactures', // 获取当前手机厂商
     getDataKind: 'get_model_mould', // 获取模具型号
     getDataBasic: 'get_data_basic', // 获取基础数据
     selectUser: 'select_userid',//根据输入的usercode 查询 userid

+ 34 - 21
src/components-app/base/dk-app-field/dk-app-field.vue

@@ -36,6 +36,8 @@
 </template>
 
 <script>
+import {localRead} from "@/libs/base/util";
+
 export default {
   name: "DkAppField",
   props: {
@@ -59,7 +61,12 @@ export default {
     password: Boolean,//是否是密码类型
     isLink: Boolean,//是否展示右侧箭头并开启点击反馈
     leftIcon: String,//左侧图标名称或图片链接,可选值见 Icon 组件
-    rightIcon: String,//右侧图标名称或图片链接,可选值见 Icon 组件
+    // 是否显示扫一扫标识 13个品牌手机显示扫一扫 pda不显示
+    isScanFlg: {
+      type: Boolean,
+      default: false,
+    },
+
     autosize: Boolean,//是否自适应内容高度,只对 textarea 有效, 可传入对象,如 { maxHeight: 100, minHeight: 50 }, 单位为px
     autoFocus: {
       type: Boolean,
@@ -107,7 +114,7 @@ export default {
       type: String,
       default: '6.2em',
     },
-    labelWidth:{
+    labelWidth: {
       type: String,
       default: '6.2em',
     },
@@ -178,18 +185,19 @@ export default {
       type: Number,
       default: 10
     },
-    removeSpacesFlag:{
+    removeSpacesFlag: {
       type: Boolean,
       default: false
     },
-    placeholderTxtFlag:{
+    placeholderTxtFlag: {
       type: Boolean,
       default: false
     },
-    placeholderTxt:{
+    placeholderTxt: {
       type: String,
       default: ''
     },
+
   }
   ,
   data() {
@@ -200,8 +208,10 @@ export default {
         (this.label ?
           (this.placeholderType == "input" ? this.$t('pleaseEnterAppComponents') :
             (this.placeholderType == "scan" ? this.$t('pleaseScanAppComponents') : this.$t('pleaseSelectAppComponents')))
-        + this.label : '') : (this.placeholderTxtFlag ? this.placeholderTxt : ''),
+          + this.label : '') : (this.placeholderTxtFlag ? this.placeholderTxt : ''),
       model: '',
+      //右侧图标名称或图片链接,可选值见 Icon 组件
+      rightIcon: (localRead("Manufactures") && this.isScanFlg) ? 'scan' : '',
     }
   },
   watch: {
@@ -215,11 +225,11 @@ export default {
         this.model = n
       }
     },
-    placeholderTxt(n, o){
+    placeholderTxt(n, o) {
       //监听请输入 文字发生改变
-        if(n){
-          this.placeholder =  this.placeholderTxt 
-        }
+      if (n) {
+        this.placeholder = this.placeholderTxt
+      }
     }
   },
   mounted() {
@@ -250,7 +260,7 @@ export default {
         //   this.$refs.input.$refs.input.removeAttribute('readonly');
         // })
         setTimeout(() => {
-          if (this.$refs.input && this.$refs.input.$refs.input){
+          if (this.$refs.input && this.$refs.input.$refs.input) {
             this.$refs.input.$refs.input.removeAttribute('readonly');
           }
         }, 200)
@@ -281,12 +291,12 @@ export default {
         }
       }
 
-      if(this.removeSpacesFlag){ //去除空格
-        if(this.model){
-          this.model = this.model.replace(/\s/g,"")
+      if (this.removeSpacesFlag) { //去除空格
+        if (this.model) {
+          this.model = this.model.replace(/\s/g, "")
         }
       }
-      this.$emit('onInput',this.model)
+      this.$emit('onInput', this.model)
     },
     /**
      * @desc   : 扫码或输入回车事件
@@ -314,8 +324,8 @@ export default {
      */
     onClick(event) {
       // 只读属性 不可用 不是选择的 时候
-      if (!this.readonly && !this.disabled && this.placeholderType!='choose' ){
-        this.$nextTick(()=>{
+      if (!this.readonly && !this.disabled && this.placeholderType != 'choose') {
+        this.$nextTick(() => {
           this.$refs.input.$refs.input.focus()
         })
       }
@@ -335,8 +345,8 @@ export default {
      * @author : 姜永辉
      * @date   : 2023/3/19 9:09
      */
-    clickRightIcon() {
-      this.$emit("clickRightIcon")
+    clickRightIcon(event) {
+      this.$emit("clickRightIcon", event)
     },
     /**
      * @desc   : 输入内容时触发
@@ -393,9 +403,12 @@ export default {
 .van-field__body .van-field__control::placeholder {
   color: #2E406B;
 }
-.van-field__label{
+
+.van-field__label {
   width: 5.0em !important;
 }
 
-
+.van-field__right-icon .van-icon {
+  font-size: 27px!important;
+}
 </style>

+ 1 - 1
src/components/base/dk-modal/dk-modal.vue

@@ -442,7 +442,7 @@ export default {
 
 /deep/.search-data-class {
   .ivu-modal-body{
-    height: 500px !important;
+    height: 510px !important;
   }
 }
 

+ 84 - 18
src/components/base/edit-table/edit-table.vue

@@ -102,6 +102,7 @@
                          :promotionType="colItem.promotionType"
                          :clearFlag="true"
                          :search-param="typeof colItem.param === 'function'? colItem.param():colItem.param"
+                         :search-init-param="typeof colItem.initParam === 'function'? colItem.initParam():colItem.initParam"
                          @on-input-blur="handleSelectInputBlur($event,row,rowIndex,colItem,colIndex)"
                          @change="(val)=>inputChange(row,rowIndex,colItem,val)"
                          @keydown.stop="nextInputCellByKeyDown(Object.assign($event,{column:colItem,colIndex,rowIndex,row}))"
@@ -158,8 +159,10 @@
           <!--                  @click="handleFreeze(colItem.field)"/>-->
           <!--          </template>-->
           <template #default="{ row,rowIndex }">
-            <i-switch size="small" :ref="colItem.field+'_default_'+rowIndex" v-model="row[colItem.field]"
-                      :disabled="true"/>
+            <div class="switch-class">
+              <i-switch size="small" :ref="colItem.field+'_default_'+rowIndex" v-model="row[colItem.field]"
+                        :disabled="true"/>
+            </div>
           </template>
         </vxe-column>
 
@@ -368,6 +371,35 @@
           </template>
         </vxe-column>
 
+        <!--  选择框  -->
+        <vxe-column v-if="colItem.type === 'checkbox'" :field="colItem.field"
+                    :width="colItem.width?colItem.width:vm.$config.columnWidth"
+                    :min-width="colItem.minWidth?colItem.minWidth:vm.$config.columnWidthMin"
+                    :tree-node="colItem.treeNode">
+          <template #header="{ row }">
+            <div class="checkbox-class">
+              <vxe-checkbox :ref="colItem.field+'_header'" v-model="colItem.chooseAllFlag"
+                            @change="clickAllCheckbox(colItem)"/>
+            </div>
+          </template>
+          <template #default="{ row,rowIndex }">
+            <div class="checkbox-class">
+              <vxe-checkbox v-if="colItem.controlField?row[colItem.controlField]:true" size="small"
+                            :ref="colItem.field+'_default_'+rowIndex"
+                            :disabled="setCellDisabled(row,colItem)"
+                            v-model="row[colItem.field]" @change="changeValue(colItem,rowIndex,row)"/>
+            </div>
+          </template>
+          <template #edit="{ row,rowIndex }">
+            <div class="checkbox-class">
+              <vxe-checkbox v-if="colItem.controlField?row[colItem.controlField]:true" size="small"
+                            :ref="colItem.field+'_default_'+rowIndex"
+                            :disabled="setCellDisabled(row,colItem)"
+                            v-model="row[colItem.field]" @change="changeValue(colItem,rowIndex,row)"/>
+            </div>
+          </template>
+        </vxe-column>
+
         <!-- 开关 -->
         <vxe-column v-if="colItem.type === 'switch'" :params="{type:'switch'}"
                     :title="colItem.title?colItem.title:$t(colItem.field)"
@@ -397,16 +429,20 @@
           <!--          </template>-->
           <template #default="{ row,rowIndex }">
             <!--          <span>{{ row[colItem.field] ? '是' : '否' }}</span>-->
-            <vxe-switch :ref="colItem.field+'_default_'+rowIndex" v-model="row[colItem.field]"
-                        v-show="setCellCanInput( row ,colItem)"
-                        @change="changeValue(colItem,rowIndex,row)"
-                        :disabled="setCellDisabled(row,colItem)"/>
+            <div class="switch-class">
+              <vxe-switch :ref="colItem.field+'_default_'+rowIndex" v-model="row[colItem.field]"
+                          v-show="setCellCanInput( row ,colItem)"
+                          @change="changeValue(colItem,rowIndex,row)"
+                          :disabled="setCellDisabled(row,colItem)"/>
+            </div>
           </template>
           <template #edit="{ row,rowIndex }">
-            <vxe-switch :ref="colItem.field+rowIndex" v-model="row[colItem.field]"
-                        v-show="setCellCanInput( row ,colItem)"
-                        @change="changeValue(colItem,rowIndex,row)"
-                        :disabled="setCellDisabled(row,colItem)"/>
+            <div class="switch-class">
+              <vxe-switch :ref="colItem.field+rowIndex" v-model="row[colItem.field]"
+                          v-show="setCellCanInput( row ,colItem)"
+                          @change="changeValue(colItem,rowIndex,row)"
+                          :disabled="setCellDisabled(row,colItem)"/>
+            </div>
           </template>
         </vxe-column>
 
@@ -715,8 +751,8 @@ export default {
       if (row && row[field]) {
         let value = row[field];
         // 如果是下拉,需要读取_Name字段的值
-        if(colItem.type === 'select'){
-          if(row[field + '_Name'] != undefined){
+        if (colItem.type === 'select') {
+          if (row[field + '_Name'] != undefined) {
             value = row[field + '_Name']
           }
         }
@@ -1462,6 +1498,18 @@ export default {
       return false;
     },
     /**
+     * @desc   : 点击表头的checkbox全选/全不选
+     * @author : 周兴
+     * @date   : 2023/5/9 13:30
+     */
+    clickAllCheckbox(colItem) {
+      if (this.tableData && this.tableData.length > 0) {
+        this.tableData.forEach(it => {
+          it[colItem.field] = colItem.chooseAllFlag
+        })
+      }
+    },
+    /**
      * @desc   : 点击按钮
      * @author : 周兴
      * @date   : 2023/3/26 16:11
@@ -2744,15 +2792,15 @@ export default {
 }
 
 /deep/ .vxe-input :hover {
-  border: 1px solid #57a3f3 !important;
-  border-radius: 2px;
+  /*border: 1px solid #57a3f3 !important;*/
+  /*border-radius: 2px;*/
 }
 
 /deep/ .vxe-input > input:focus {
-  border-color: #57a3f3 !important;
-  border-radius: 2px;
-  -webkit-box-shadow: 0 0 0 1px rgba(45, 140, 240, .2) !important;
-  box-shadow: 0 0 0 1px rgba(45, 140, 240, .2) !important;
+  /*border-color: #57a3f3 !important;*/
+  /*border-radius: 2px;*/
+  /*-webkit-box-shadow: 0 0 0 1px rgba(45, 140, 240, .2) !important;*/
+  box-shadow: 0 0 0 2px rgba(45, 140, 240, 0.2);
 }
 
 /deep/ .col--valid-error .vxe-input > input {
@@ -2824,4 +2872,22 @@ export default {
 }
 
 
+.switch-class {
+  height: calc(100% - 3px) !important;
+  display: flex !important;
+  align-items: center !important;
+  justify-content: center !important;
+}
+
+.checkbox-class {
+  height: 100% !important;
+  display: flex !important;
+  align-items: center !important;
+  justify-content: center !important;
+}
+
+.checkbox-class label {
+  margin-bottom: 0 !important;
+}
+
 </style>

File diff suppressed because it is too large
+ 1914 - 1827
src/components/base/edit-tree-table/edit-tree-table.vue


+ 20 - 7
src/components/business/search-cond/index.vue

@@ -67,7 +67,8 @@
                   <Prepend :label="item.itemName" :required=item.required>
                     <DatePickerPop type="month" clearable size="small" :editable="false"
                                    :ref="item.valueFormat.code" transfer
-                                   placement="bottom-end" @on-change="(val) => dateChangeSingle(item.valueFormat.code, val)"
+                                   placement="bottom-end"
+                                   @on-change="(val) => dateChangeSingle(item.valueFormat.code, val)"
                                    :placeholder="vm.$t('inputWords',{'search-name':item.itemName})"
                                    style="width:100%" :short-cut-flag="true"></DatePickerPop>
                   </Prepend>
@@ -90,7 +91,8 @@
                 <!--       单选       -->
                 <FormItem v-if="item.valueKind=='S-CHOICE'" :prop="item.valueFormat.code" style="width:100% ;">
                   <Prepend :label="item.itemName" :required=item.required :prop="item.valueFormat.code">
-                    <selectPop :multiple="false" :ref="item.valueFormat.code" v-model="formData._value[item.valueFormat.code]"
+                    <selectPop :multiple="false" :ref="item.valueFormat.code"
+                               v-model="formData._value[item.valueFormat.code]"
                                :placeholder="vm.$t('selectWords',{'search-name':item.itemName})"
                                :tree-flag="item.treeFlag"
                                :tree-strict="item.treeStrict"
@@ -104,7 +106,8 @@
                 <!--       单选放大镜       -->
                 <FormItem v-if="item.valueKind=='S-SEARCH'" :prop="item.valueFormat.code" style="width:100% ;">
                   <Prepend :label="item.itemName" :required=item.required :prop="item.valueFormat.code">
-                    <SelectMagnifier v-model="formData._value[item.valueFormat.code]" :multiple="false"
+                    <SelectMagnifier v-model="formData._value[item.valueFormat.code]"
+                                     :display-text="formData._value[item.valueFormat.code + '_Name']" :multiple="false"
                                      :type="item.magnifierType" :ref="item.valueFormat.code"
                                      :other-condition="item.otherCondition"
                                      :placeholder="vm.$t('selectWords',{'search-name':item.itemName?item.itemName:item.valueFormat.code})"
@@ -114,10 +117,11 @@
                 </FormItem>
 
                 <!--       多选放大镜       -->
-
                 <FormItem v-if="item.valueKind=='M-SEARCH'" :prop="item.valueFormat.code" style="width:100% ;">
                   <Prepend :label="item.itemName" :required=item.required :prop="item.valueFormat.code">
-                    <SelectMagnifier v-model="formData._value[item.valueFormat.code]" :multiple="true"
+                    <SelectMagnifier v-model="formData._value[item.valueFormat.code]"
+                                     :display-text="formData._value[item.valueFormat.code + '_Name']"
+                                     :multiple="true"
                                      :type="item.magnifierType" :ref="item.valueFormat.code"
                                      :other-condition="item.otherCondition"
                                      :placeholder="vm.$t('selectWords',{'search-name':item.itemName?item.itemName:item.valueFormat.code})"
@@ -447,9 +451,18 @@ export default {
             this.dateChangeSingle(code, defaultValue)
           }
         })
-      } else {
+      } else if(valueKind && valueKind == 'S-SEARCH'){ // 单选放大镜
+        if(defaultValue && defaultValue.length > 0){
+          this.$set(this.formData._value, code, defaultValue[0])
+          this.$set(this.formData._value, code + '_Name', defaultValue[1])
+        }
+      } else if(valueKind && valueKind == 'M-SEARCH'){ // 多选放大镜
+        if(defaultValue && defaultValue.length > 0){
+          this.$set(this.formData._value, code, [defaultValue[0]])
+          this.$set(this.formData._value, code + '_Name', defaultValue[1])
+        }
+      }else {
         this.$set(this.formData._value, code, defaultValue)
-
       }
       // 如果该默认值未设置,需要给searchCond设置上,以便清空条件时恢复
       if (this.searchCond) {

+ 1 - 0
src/components/business/select-magnifier/select-magnifier.vue

@@ -280,6 +280,7 @@ export default {
       this.$emit('on-change', this.options)
     },
     displayText(n, o) {
+      console.log('n3444',n)
       this.selectedValue = n;
     },
     value(n, o) {

+ 15 - 1
src/components/business/table-select/table-select.vue

@@ -39,7 +39,7 @@
                     ref="searchCond" :col-count="colCount"
                     v-model="searchCond" :type="this.$config.pageCode.goods"
                     :setFlag="false" :searchContent="searchContent"></SearchCond>
-        <div style="width: 100%;height: 10px"></div>
+        <div style="width: 100%;height: 2px"></div>
         <DkTabs ref="tabs" :options="multiple?tabsOptions:tabsOptionsOnly" @on-click="tabsClick"
                 @on-clear="clearSelected"></DkTabs>
         <!--      商品种类列表-->
@@ -272,6 +272,11 @@ export default {
       type: Object,
       default: null
     },
+    // 传入参数(绑定在查询条件上),用于查询
+    searchInitParam: {
+      type: Object,
+      default: null
+    },
     // 是否显示清空按钮
     clearFlag: {
       type: Boolean,
@@ -1443,6 +1448,14 @@ export default {
     this.existsFlag = null
   },
   mounted() {
+    this.$nextTick(()=>{
+      // 设置查询条件默认值
+      if(this.searchInitParam){
+        for (let it of Object.keys(this.searchInitParam)) {
+          this.$refs.searchCond.setDefault(it,this.searchInitParam[it].default,this.searchInitParam[it].valueKind)
+        }
+      }
+    })
   },
   created() {
     //如果传递了下拉就直接用
@@ -1459,6 +1472,7 @@ export default {
         }
       }
     }
+
     this.inputModal = this.text
     //计算表格高度
     this.$nextTick(() => {

+ 33 - 1
src/mixins/appindex.js

@@ -33,7 +33,7 @@ export const appIndexMixin = {
 
       searchList: {},
       params: {},
-
+      zxingQRCode: '',//手机调用摄像头扫描条形码、二维码返回条码值
     }
   },
   methods: {
@@ -75,6 +75,38 @@ export const appIndexMixin = {
     },
 
     /**
+     * @desc   : 调用android的函数
+     * @author : 姜永辉
+     * @date   : 2023/3/29 8:58
+     */
+    openQRCodeScan(ref) {
+      try {
+        //调用android的函数-zxing扫描
+        javascript:jsTest.openQRCodeScan(ref);
+      } catch (err) {
+        this.$appToast(
+          {
+            message: this.$t('W_129'),
+            icon: require('@/assets/images/app-image/fail.png'),
+          }
+        )
+      }
+    },
+
+    /**
+     * @desc   : 手机调用摄像头扫描条形码、二维码返回条码值
+     * @author : 姜永辉
+     * @date   : 2023/5/6 17:01
+     */
+    getQRCodeScan(code, ref) {
+      this.zxingQRCode = code
+      if (this.getQRCodeScanExcute){
+        // 各个画面最后执行结果
+        this.getQRCodeScanExcute(code, ref)
+      }
+    },
+
+    /**
      * @desc   : 查询模块的共同数据
      * @author : admin
      * @date   : 2022/3/29 16:05

+ 86 - 81
src/view-app/app/grouting-management/barcode-change/choose-barcode.vue

@@ -4,77 +4,52 @@
     <!-- 顶部导航栏 -->
     <dk-app-nav-bar :title="$t('appChooseBarcodeTitle')" @click-left="onClickLeft"></dk-app-nav-bar>
     <!-- 成型线编码 -->
-    <dk-app-field
-      v-model="formData.moldLineCode"
-      :label="$t('appMoldingCode')"
-      ref="moldLineCode"
-      placeholderType="scan"
-      @changeBarCode="onSearch"
-    />
+    <dk-app-field v-if="!keyFlag" v-model="formData.moldLineCode" :label="$t('appMoldingCode')" ref="moldLineCode"
+      placeholderType="scan" @changeBarCode="onSearch" />
     <!--        成型日期-->
-    <dk-app-field
-      v-model="formData.formingDate"
-      :label="$t('appFormingDate')"
-      :readonly="true"
-      :defaultDateFlag="true"
-      @click="showFormingDateClick"
-      placeholderType="choose" is-link arrow-direction="down"
-    />
+    <dk-app-field v-if="!keyFlag" v-model="formData.formingDate" :label="$t('appFormingDate')" :readonly="true"
+      :defaultDateFlag="true" @click="showFormingDateClick" placeholderType="choose" is-link arrow-direction="down" />
     <!-- 批次 -->
-    <dk-app-field
-      v-model="formData.moldingBatch"
-      :label="$t('appGroutingBatch')"
-      ref="moldingBatch"
-      @changeBarCode="onSearch"
-    />
+    <dk-app-field v-if="!keyFlag" v-model="formData.moldingBatch" :label="$t('appGroutingBatch')" ref="moldingBatch"
+      @changeBarCode="onSearch" />
+
+    <!-- 成型工号-->
+    <dk-app-field v-if="!keyFlag" v-model="formData.moldingUser" :label="$t('appMoldingStationNo')"
+      @changeBarCode="onSearch" ref="moldingUser" />
+
+    <!-- 型号编码 -->
+    <dk-app-field v-if="keyFlag" v-model="formData.modelCode" :label="$t('appModelCodeB')" ref="modelCode"
+      placeholderType="scan" @changeBarCode="onSearch" />
+    <!-- 型号名称 -->
+    <dk-app-field v-if="keyFlag" v-model="formData.modelName" :label="$t('appmodelKindT')" ref="modelName"
+      placeholderType="scan" @changeBarCode="onSearch" />
 
-    <!--    成型工号-->
-    <dk-app-field
-      v-model="formData.moldingUser"
-      :label="$t('appMoldingStationNo')"
-      @changeBarCode="onSearch"
-      ref="moldingUser"
-    />
-    <!--    产品条码-->
-    <!--    <dk-app-field-->
-    <!--      v-model="formData.pdtBarcode"-->
-    <!--      :label="$t('appProductCode')"-->
-    <!--      ref="pdtBarcode"-->
-    <!--      :formatterFlg="true"-->
-    <!--      @changeBarCode="onSearch"-->
-    <!--    />-->
 
     <div class="main-app-table" ref="scrollTable">
       <!--  列表-->
-      <dk-app-table
-        :rows="rows"
-        :tableRowData="tableRowData"
-        :checkboxFlag="true"
-        :collapseFlag="false"
-        @onClickCheckbox="onClickCheckbox"
-      >
+      <dk-app-table :rows="rows" :tableRowData="tableRowData" :checkboxFlag="true" :collapseFlag="false"
+        @onClickCheckbox="onClickCheckbox">
       </dk-app-table>
 
     </div>
     <!--    保存-->
     <div class="app_save_bottom-class" style="padding: 15px 10px 10px 10px">
       <dk-app-button @click="save" :disabled="loading">{{
-          $t('appDefine')
-        }}
+        $t('appDefine')
+      }}
       </dk-app-button>
 
     </div>
     <!--    单选天日期组件-->
     <dk-app-dropdown-single-date-day :show="showFormingDateFlag" @onConfirmChooseDate="onConfirmProduceDate"
-                                     @onCloseChooseDate="onCloseChooseDate"></dk-app-dropdown-single-date-day>
+      @onCloseChooseDate="onCloseChooseDate"></dk-app-dropdown-single-date-day>
     <dk-app-loading :loading="loading"></dk-app-loading>
   </div>
-
 </template>
 
 
 <script>
-import {appFormMixin} from "@/mixins/appform";
+import { appFormMixin } from "@/mixins/appform";
 
 export default {
   name: "app-choose-barcode",
@@ -82,6 +57,7 @@ export default {
   data() {
     return {
       loading: false,
+      keyFlag: false,
       showFormingDateFlag: false,
       tableRowData: [],
       chooseData: {},
@@ -94,13 +70,17 @@ export default {
         moldingUser: '',
       },
       rows: [
-        {name: 'pdtBarcode', title: this.$t('appProductCode')}, //产品条码
-        // {name: 'hisPdtCodes', title: this.$t('appHisPdtCodes')}, //历史条码
-        {name: 'mouldUniqueCode', title: this.$t('appMoldNo')}, //模具编码
-        {name: 'productUniqueCode', title: this.$t('appProductUniqueCode')}, //产品编码
-        {name: 'moldLineCode', title: this.$t('appMoldingCode')}, //成型线编码
-        {name: 'moldingUser', title: this.$t('appMoldingStationNo')},
-        {name: 'manageUserName', title: this.$t('appMoldingBan')},  //成型班长
+        { name: 'pdtBarcode', title: this.$t('appProductCode') }, //产品条码
+        { name: 'mouldUniqueCode', title: this.$t('appMoldNo') }, //模具编码
+        { name: 'productUniqueCode', title: this.$t('appProductUniqueCode') }, //产品编码
+        { name: 'moldLineCode', title: this.$t('appMoldingCode') }, //成型线编码
+        { name: 'moldingUser', title: this.$t('appMoldingStationNo') },
+        { name: 'manageUserName', title: this.$t('appMoldingBan') },  //成型班长
+      ],
+      rowsProd: [
+        { name: 'modelCode', title: this.$t('appModelCodeB') }, //型号编号
+        { name: 'modelName', title: this.$t('productModelName') }, //型号名称
+        { name: 'categoryName', title: this.$t('appModelCategory') }, //型号分类
       ]
 
     }
@@ -117,16 +97,23 @@ export default {
         params = {}
       }
       params.currentPage = 1
-      params.pageSize = 10
-      params.pdaFlag = 0
+      params.pageSize = 999
       params.ftyId = this.$store.state.user.ftyId
       params.userId = this.$store.state.user.id
-      params.moldLineCode = this.formData.moldLineCode //成型线编码
-      params.productUniqueCode = this.formData.productUniqueCode //产品编码
-      params.moldingBatch = Number(this.formData.moldingBatch)
-      params.moldingUser = this.formData.moldingUser
-      params.moldingLastDate = this.formData.formingDate + ''
-      params.pdtBarcode = this.formData.pdtBarcode
+      if (this.keyFlag) {
+        //产品型号变更查询
+        params.modelCode = this.formData.modelCode
+        params.modelName = this.formData.modelName
+      } else {
+        params.moldLineCode = this.formData.moldLineCode //成型线编码
+        params.productUniqueCode = this.formData.productUniqueCode //产品编码
+        params.moldingBatch = Number(this.formData.moldingBatch)
+        params.moldingUser = this.formData.moldingUser
+        params.moldingLastDate = this.formData.formingDate + ''
+        params.pdtBarcode = this.formData.pdtBarcode
+        params.pdaFlag = 0
+      }
+
       return params
     },
     /**
@@ -137,15 +124,20 @@ export default {
     getData() {
       // 参数设置
       let params = this.setSearchParams()
-      this.excute(this.$service.commonService, this.$service.commonService.getProductForChange, params,'',true).then(res => {
+      let API = this.$service.commonService.getProductForChange
+      if (this.keyFlag) {
+        //产品型号变更查询
+        API = this.$service.commonService.getModelProduct
+      }
+      this.excute(this.$service.commonService, API, params, '', true).then(res => {
         if (res.code === this.$config.SUCCESS_CODE) {
-          if( res.data.list &&  res.data.list.length > 0){
+          if (res.data.list && res.data.list.length > 0) {
             res.data.list.forEach(it => {
               it.checked = false
             })
             this.tableRowData = res.data.list
-          }else {
-            this.$appDialog.alert({message: this.$t('W_002', {'param': this.$t('appMoldingCode')})}).then(() => {
+          } else {
+            this.$appDialog.alert({ message: this.$t('W_002', { 'param': this.$t('appMoldingCode') }) }).then(() => {
               this.tableRowData = []
               this.formData.moldLineCode = ''
               this.setFocus('moldLineCode')
@@ -165,17 +157,20 @@ export default {
      */
     onSearch(e) {
       this.tableRowData = []
-      if (!this.formData.moldLineCode) {
-        this.appToastFail(this.$t('W_001', {'param': this.$t('appMoldingCode')}))
-        return
-      } else if (!this.formData.moldingBatch) {
-        this.appToastFail(this.$t('W_001', {'param': this.$t('appGroutingBatch')}))
-        return
-      } else if (!this.formData.moldingUser) {
-        this.appToastFail(this.$t('W_001', {'param': this.$t('appMoldingStationNo')}))
-
-        return
+      if (!this.keyFlag) {
+        //不是产品型号变更相关查询
+        if (!this.formData.moldLineCode) {
+          this.appToastFail(this.$t('W_001', { 'param': this.$t('appMoldingCode') }))
+          return
+        } else if (!this.formData.moldingBatch) {
+          this.appToastFail(this.$t('W_001', { 'param': this.$t('appGroutingBatch') }))
+          return
+        } else if (!this.formData.moldingUser) {
+          this.appToastFail(this.$t('W_001', { 'param': this.$t('appMoldingStationNo') }))
+          return
+        }
       }
+
       //获取数据
       this.getData()
     },
@@ -243,7 +238,13 @@ export default {
 
   mounted() {
     // 因为是封装的组件所以是两层
-    this.$refs.moldLineCode.$refs.input.focus()
+    if (!this.keyFlag) {
+      this.$refs.moldLineCode.$refs.input.focus()
+    } else {
+      this.$refs.modelCode.$refs.input.focus()
+
+    }
+
     // 设置滚动的位置和高度
     this.setAppTableHeight()
   },
@@ -253,6 +254,13 @@ export default {
    * @date   : 2023/2/7 17:23
    */
   created(e) {
+    if (this.$route.params) {
+      this.key = this.$route.params.key //上一页选择的操作类型 
+      if (this.$route.params.key && this.$route.params.key === 'app-prod-code-change') { //产品型号变更
+        this.keyFlag = true
+        this.rows = this.rowsProd
+      }
+    }
   }
 
 
@@ -260,11 +268,8 @@ export default {
 </script>
 
 <style scoped>
-
 .van-cell--large {
   padding-top: 5px !important;
   padding-bottom: 0px !important;
 }
-
-
 </style>

+ 25 - 15
src/view-app/app/piecework-procedure/register/index.vue

@@ -2,8 +2,7 @@
   <!--  计件工序(单点 和 集中)     -->
   <div class="main-app-form">
     <!-- 顶部导航栏 -->
-    <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft" :rightIcon="true"
-                    @click-right="onClickRight"></dk-app-nav-bar>
+    <dk-app-nav-bar :title="appActiveTitle" @click-left="onClickLeft"></dk-app-nav-bar>
     <!-- 选择工位 -->
     <dk-app-field v-if="stationList.length > 0" v-model="formData.stationName" :label="$t('stationName')"
                   :readonly="true"
@@ -20,6 +19,7 @@
       )"
                   :readonly="(opnKind && (opnKind == $config.processType.exchangeKilnCar || opnKind == $config.processType.dressKilnCar) && tableRowData.length > 0)"
                   ref="carCode" v-model="formData.carCode" @changeBarCode="onCarCode('carCode')"
+
                   placeholderType="scan"></dk-app-field>
     <!-- 原载具-->
     <dk-app-field v-if="opnKind && (opnKind == $config.processType.exchangeKilnCar)" :label="$t('oldCarCode')"
@@ -28,7 +28,8 @@
     <!--    产品条码-->
     <dk-app-field
       v-if="opnKind && (opnKind == $config.processType.productCode || opnKind == $config.processType.dressKilnCar)"
-      :label="$t('appProductCode')" ref="barCode" v-model="formData.barCode" @changeBarCode="onBarCode" s :readonly="opnKind && opnKind == $config.processType.dressKilnCar ?
+      @clickRightIcon="openQRCodeScan('barCode')" :isScanFlg="true"
+      :label="$t('appProductCode')" ref="barCode" v-model="formData.barCode" @changeBarCode="onBarCode" :readonly="opnKind && opnKind == $config.processType.dressKilnCar ?
         !formData.carCode :
         !formData.prodUserId" placeholderType="scan"></dk-app-field>
 
@@ -103,14 +104,14 @@ export default {
         },
       ],
       rows: [
-        { name: 'uniqueCode', title: self.$t('appProductCodeB') },         //产品编码
-        { name: 'modelCode', title: self.$t('modelCode') },                //型号编码
-        { name: 'modelName', title: self.$t('productName') },            //产品名称
-        { name: 'logoName', title: self.$t('appLogoName') },               //商标名称
-        { name: 'moldingDate', title: self.$t('appFormingDate') },         //成型日期
-        { name: 'moldingUserCode', title: self.$t('appMoldingStationNo') },//成型工号
-        { name: 'moldlineItemCode', title: self.$t('appMoldNo') },           //模具编号
-        { name: 'colourName', title: self.$t('colourName') },              //釉色名称
+        {name: 'uniqueCode', title: self.$t('appProductCodeB')},         //产品编码
+        {name: 'modelCode', title: self.$t('modelCode')},                //型号编码
+        {name: 'modelName', title: self.$t('productName')},            //产品名称
+        {name: 'logoName', title: self.$t('appLogoName')},               //商标名称
+        {name: 'moldingDate', title: self.$t('appFormingDate')},         //成型日期
+        {name: 'moldingUserCode', title: self.$t('appMoldingStationNo')},//成型工号
+        {name: 'moldlineItemCode', title: self.$t('appMoldNo')},           //模具编号
+        {name: 'colourName', title: self.$t('colourName')},              //釉色名称
       ],//每一条的内容
       tableRowData: [],
       //标题
@@ -465,10 +466,8 @@ export default {
       //跳转新页面
       // item.form = {} //要传的参数
       // this.$router.push({name: item.routerName, params: {item: item}})
-      this.onClose()
-      //调用android的函数
-      this.openQRCodeScan('prodUser')
     },
+
     /**
      * @desc   : 关闭pupop弹窗
      * @author : 王英杰
@@ -640,10 +639,21 @@ export default {
     getQRCodeScanExcute(code, ref) {
       switch (ref) {
         case 'prodUser':
-          this.setFocus("prodUser")
           this.formData.prodUserCode = code
           this.queryUser()
           break;
+        case 'barCode':
+          this.formData.barCode = code
+          this.onBarCode()
+          break;
+        case 'productCode':
+          this.formData.perCarCode = code
+          this.onCarCode(ref)
+          break;
+        case 'carCode':
+          this.formData.carCode = code
+          this.onCarCode(ref)
+          break;
       }
     },
     // endregion

+ 186 - 124
src/view-app/app/prod-management/prod-code-change/index.vue

@@ -3,30 +3,34 @@
   <div class="main-app-form">
     <!-- 顶部导航栏 -->
     <dk-app-nav-bar :title="$t('appProdCodeChange')" @click-left="onClickLeft"></dk-app-nav-bar>
+    <!-- 成型线编码 -->
+    <dk-app-field v-model="formData.moldLineCode" :label="$t('appMoldingCode')" ref="moldLineCode" placeholderType="scan"
+      @changeBarCode="onSearch" />
+    <!--        成型日期-->
+    <dk-app-field v-model="formData.formingDate" :label="$t('appFormingDate')" :readonly="true" :defaultDateFlag="true"
+      @click="showFormingDateClick" placeholderType="choose" is-link arrow-direction="down" />
+    <!-- 批次 -->
+    <dk-app-field v-model="formData.moldingBatch" :label="$t('appGroutingBatch')" ref="moldingBatch"
+      @changeBarCode="onSearch" />
     <!-- 产品条码 -->
-    <dk-app-field ref="pdtBarcode" v-model="formData.pdtBarcode" :label="$t('appProductCode')"
-      @changeBarCode="scanBarCode(true)" placeholderType="scan" />
-
-    <!-- 原产品型号 -->
-    <dk-app-field :readonly="true" :label="$t('appOldProdCodeChange')" :placeholderFlag="false"
-      v-model="formData.modelName"></dk-app-field>
-
-
+    <dk-app-field ref="productCode" v-model="formData.productCode" :label="$t('appProductCode')" />
     <!-- 新产品型号 -->
-    <dk-app-field ref="newPdtBarCode" :readonly="newPdtBarCodeFlag" :label="$t('appNewProductBarcode')"
-      @changeBarCode="scanNewBarCode" :placeholderTxtFlag="true" :placeholderFlag="false" placeholderType="scan"
-      v-model="formData.modelCode" :placeholderTxt="'请扫描' + $t('appProductCode')"></dk-app-field>
-
-    <!-- 新型号名称 -->
-    <dk-app-field :readonly="true" :label="$t('appNewProdCodeName')" :placeholderFlag="false"
-      v-model="formData.newModelName"></dk-app-field>
-
+    <dk-app-field :readonly="true" :label="$t('newModelName')" @click="toChooseBarcode" placeholderType="choose"
+      :isLink="true" clickable v-model="formData.modelName"></dk-app-field>
+    <div class="main-app-table" ref="scrollTable">
+      <!--  列表-->
+      <dk-app-table :rows="rows" :tableRowData="tableRowData" :checkboxFlag="true" :collapseFlag="false"
+        @onClickCheckbox="onClickCheckbox">
+      </dk-app-table>
+    </div>
     <!--    保存按钮-->
     <div class="app_save_bottom-class">
-      <dk-app-button :disabled="loading" @click="save">{{ $t('appSave') }}
+      <dk-app-button :disabled="loading" @click="save">{{ $t('appSave') + '(' + tableRowDataLength.length + ')' }}
       </dk-app-button>
     </div>
-
+    <!--    单选天日期组件-->
+    <dk-app-dropdown-single-date-day :show="showFormingDateFlag" @onConfirmChooseDate="onConfirmProduceDate"
+      @onCloseChooseDate="onCloseChooseDate"></dk-app-dropdown-single-date-day>
     <!-- 加载页面   -->
     <dk-app-loading :loading="loading"></dk-app-loading>
   </div>
@@ -40,16 +44,72 @@ export default {
   mixins: [appFormMixin],
   data() {
     return {
+      showFormingDateFlag: false,
       newPdtBarCodeFlag: true,
       formData: {
         ftyId: this.$store.state.user.ftyId,//工厂
         userId: this.$store.state.user.id,
-        pdtBarcode: ''                   //模具条码
+        pdtBarcode: '',
+        moldLineCode: '',
+        formingDate: '',
+        productCode: '',
+        groupNo: null,
+        moldingBatch: null
       },
+      tableRowDataLength: [],
+      tableRowData: [],
+      rows: [
+        { name: 'moldlineCode', title: this.$t('appMoldingCode') }, //成型线编码
+        { name: 'moldlineName', title: this.$t('moldlineName') }, //成型线名称
+        { name: 'moldingBatch', title: this.$t('moldingBatch') }, //成型批次
+        { name: 'productCode', title: this.$t('appProductCode') }, //产品条码
+        { name: 'modelCode', title: this.$t('appProductUniqueCode') }, //产品编码
+        { name: 'groupNo', title: this.$t('groupNo') },
+        { name: 'groupName', title: this.$t('groupName') },
+        { name: 'moldlineItemCode', title: this.$t('appMoldNo') }, //模具编码
+        { name: 'moldlineItemKindName', title: this.$t('moldStatus') }, //模具状态
+        { name: 'itemMoldingUserName', title: this.$t('appMoldingStationNo') },
+      ]
 
     }
   },
   methods: {
+    /**
+     * @desc   : 跳转选择新条码
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:23
+     */
+    toChooseBarcode() {
+      this.$router.push({
+        name: 'app-choose-barcode', params: {
+          key: 'app-prod-code-change'
+        }
+      })
+    },
+
+    /**
+     * @desc   : 点击复选框
+     * @author : 于继渤
+     * @date   : 2023/2/7 17:23
+     */
+    onClickCheckbox(e) {
+      this.tableRowDataLength = this.tableRowData.filter(res => {
+        return res.checked
+      })
+    },
+
+
+    /**
+ * @desc   : 搜索事件
+ * @author : 于继渤
+ * @date   : 2023/2/7 17:23
+ */
+    onSearch(e) {
+      this.tableRowData = []
+      //获取数据
+      this.getModelLine()
+    },
+
 
     /**
      * @desc   : 扫码的查询-参数赋值
@@ -58,104 +118,67 @@ export default {
      */
     setSearchParams() {
       let params = {}
-      params.pdtBarcode = this.formData.pdtBarcode;
-      params.ftyId = this.$store.state.user.ftyId
-      params.userId = this.formData.userId
-      params.pageSize = 10
+      params.pageSize = 999
       params.currentPage = 1
+      params.ftyId = this.$store.state.user.ftyId
+      params.manageUser = this.formData.userId
       params.pdaFlag = '1'
+      params.moldlineCode = this.formData.moldLineCode
       return params
     },
 
     /**
-     * @desc   : 扫描原产品条码
+     * @desc   : 查询成型线
      * @author : 于继渤
-     * @date   : 2023/3/3 16:21
+     * @date   : 2023/2/17 10:34
      */
-    scanBarCode(flag) {
-      this.loading = true
-      // 设置查询条件
+    getModelLine() {
       let params = this.setSearchParams();
-      // 查询模具信息     -报损和撤销保存的验证
-      this.excute(this.$service.commonService, this.$service.commonService.getProductModel, params, '', flag)
-        .then(res => {
-          if (res.code === this.$config.SUCCESS_CODE) {
-            if (res.data.list && res.data.list.length > 0) {
-              this.formData = {
-                ftyId: this.$store.state.user.ftyId,//工厂
-                userId: this.$store.state.user.id,
-                pdtBarcode: ''                   //模具条码
-              }
-              this.formData.itemId = res.data.list[0].itemId
-              this.formData.modelId = res.data.list[0].modelId
-              this.formData.modelName = res.data.list[0].modelName
-              this.formData.pdtBarcode = res.data.list[0].pdtBarcode
-              this.formData.productId = res.data.list[0].productId
-
-              this.newPdtBarCodeFlag = false
-              this.setFocus('newPdtBarCode')
-            } else {
-              this.$appDialog.alert({ message: this.$t('W_002', { 'param': this.$t('appBarcode') }) }).then(() => {
-                this.formData = {
-                  ftyId: this.$store.state.user.ftyId,//工厂
-                  userId: this.$store.state.user.id,
-                  pdtBarcode: ''                   //模具条码
-                }
-                this.setFocus('pdtBarcode')
-              });
-            }
+      this.excute(this.$service.commonService, this.$service.commonService.getMoldLinePage, params, '', false).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          if (res.data.list && res.data.list.length > 0) {
+            let param = {}
+            param.ftyId = this.$store.state.user.ftyId
+            param.moldingDate = this.formData.formingDate
+            param.manageUser = this.formData.userId
+            param.pageSize = 999
+            param.currentPage = 1
+            param.moldingBatch = this.formData.moldingBatch
+            param.groupNo = this.formData.groupNo
+            param.productCode = this.formData.productCode
+            param.pdaFlag = '1'
+            param.moldlineId = res.data.list[0].moldlineId ? res.data.list[0].moldlineId : null
+            this.getData(param)
           }
-
-        })
+        }
+      })
     },
 
-
-    setSearchNewParams() {
-      let params = {}
-      params.modelCode = this.formData.modelCode;
-      params.ftyId = this.$store.state.user.ftyId
-      params.userId = this.formData.userId
-      params.pageSize = 10
-      params.currentPage = 1
-      params.pdaFlag = '1'
-      return params
-    },
     /**
-     * @desc   : 扫描新产品条码
+     * @desc   : 查询数据
      * @author : 于继渤
-     * @date   : 2023/3/3 16:21
+     * @date   : 2023/2/17 10:34
      */
-    scanNewBarCode() {
-      this.loading = true
-      // 设置查询条件
-      let params = this.setSearchNewParams();
-      // 查询模具信息     -报损和撤销保存的验证
-      this.excute(this.$service.commonService, this.$service.commonService.getModelProductByPage, params ,'', true)
-        .then(res => {
-          console.log(res)
-          if (res.code === this.$config.SUCCESS_CODE) {
-            if (res.data.list && res.data.list.length > 0) {
-              this.formData.categoryName = res.data.list[0].categoryName
-              this.formData.modelCode = res.data.list[0].modelCode
-              this.formData.newModelId = res.data.list[0].modelId
-              this.formData.newModelName = res.data.list[0].modelName
-              this.formData.repPdtModelName = res.data.list[0].repPdtModelName
-            } else {
-              this.$appDialog.alert({ message: this.$t('W_002', { 'param': this.$t('appBarcode') }) }).then(() => {
-                this.formData.modelCode = ''
-                this.formData.categoryName = ''
-                this.formData.newModelId = null
-                this.formData.newModelName = ''
-                this.formData.repPdtModelName = ''
-                this.setFocus('newPdtBarCode') //清除焦点内容
-              });
-            }
-          }
+    getData(param) {
+      this.excute(this.$service.moldingRecordService, this.$service.moldingRecordService.selectMoldingGiveCodeChange, param, '', true).then(res => {
+        if (res.code === this.$config.SUCCESS_CODE) {
+          if (res.data.list && res.data.list.length > 0) {
+            res.data.list.forEach(it => {
+              it.checked = false
+            })
+            this.tableRowData = res.data.list
+          } else {
+            this.$appDialog.alert({ message: this.$t('W_002', { 'param': this.$t('appMoldingCode') }) }).then(() => {
+              this.tableRowData = []
+              this.formData.moldLineCode = ''
+              this.setFocus('moldLineCode')
+            });
 
-        })
+          }
+        }
+      })
     },
 
-
     /**
      * @desc   : 保存的校验
      * @author : 于继渤
@@ -163,32 +186,45 @@ export default {
      */
     validData() {
       //产品条码输入
-      if (!this.formData.pdtBarcode) {
-        this.appToastFail(this.$t('inputWords', { 'search-name': this.$t('appProductCodeB') }));
-        return false;
-      }
-      //产品条码验证
       if (!this.formData.modelName) {
-        this.appToastFail(this.$t('appCheckBarcodeIsCheck'));
+        this.appToastFail(this.$t('selectWords', { 'search-name': this.$t('newModelName') }));
         return false;
       }
-
-      //新产品条码输入
-      if (!this.formData.modelCode) {
-        this.appToastFail(this.$t('inputWords', { 'search-name': this.$t('appNewProductBarcode') }));
-        return false;
-      }
-      //新产品条码验证
-      if (!this.formData.newModelName) {
-        this.appToastFail(this.$t('appNewCheckBarcodeIsCheck'));
+      if (this.tableRowDataLength.length === 0) {
+        this.appToastFail(this.$t('W_013'));
         return false;
       }
-
       return true
     },
 
 
+    /**
+         * @desc   : 日期打开事件
+         * @author : 于继渤
+         * @date   : 2023/2/14 9:35
+         */
+    showFormingDateClick() {
+      this.showFormingDateFlag = true;
+    },
 
+    /**
+     * @desc   : 成型日期确定事件
+     * @author : 于继渤
+     * @date   : 2023/2/13 13:39
+     */
+    onConfirmProduceDate(e) {
+      this.formData.formingDate = e.date;
+      this.showFormingDateFlag = false;
+    },
+
+    /**
+     * @desc   :  成型日期关闭事件
+     * @author : 于继渤
+     * @date   : 2023/2/13 14:28
+     */
+    onCloseChooseDate() {
+      this.showFormingDateFlag = false;
+    },
 
 
     // region 保存
@@ -199,11 +235,16 @@ export default {
      */
     setParams() {
       this.params.ftyId = this.formData.ftyId
-      this.params.itemId = this.formData.itemId
-      this.params.oldModelName = this.formData.modelName
-      this.params.pdtBarcode = this.formData.pdtBarcode
-      this.params.pdtModelId = this.formData.newModelId
-      this.params.productId = this.formData.productId
+      this.params.pdtModelId = this.formData.modelId
+      this.params.pdtUniqueId = this.formData.pdtUniqueId
+      let listTemp = []
+      this.tableRowDataLength.forEach(res => {
+        listTemp.push({
+          productId: res.pdtUniqueId,
+          itemId: res.moldingItemId
+        })
+      })
+      this.params.list = listTemp
     },
 
     /**
@@ -214,7 +255,6 @@ export default {
     saveData() {
       //保存
       return this.excute(this.$service.prodCodeChangeService, this.$service.prodCodeChangeService.updateProductModel, this.params, '', true)
-
     },
 
     /**
@@ -223,14 +263,25 @@ export default {
      * @date   : 2023/2/10 15:50
      */
     clear() {
+      this.formData = {
+        ftyId: this.$store.state.user.ftyId,//工厂
+        userId: this.$store.state.user.id,
+        pdtBarcode: '',
+        moldLineCode: '',
+        formingDate: '',
+        productCode: '',
+        groupNo: null,
+        moldingBatch: null
+      }
       //重新查询当前数据
-      this.scanBarCode(false)
+      this.getData(false)
     },
 
     // endregion
   },
   mounted() {
-    this.setFocus('pdtBarcode')
+    this.setFocus('moldLineCode')
+    this.setAppTableHeight()
   },
   /**
    * 初始生命周期
@@ -238,7 +289,18 @@ export default {
    */
   created(e) {
 
-  }
+  },
+  activated() {
+    if (localStorage.getItem("app-choose-barcode-chooseData") !== null) {
+      let chooseData = JSON.parse(localStorage.getItem("app-choose-barcode-chooseData")) || []
+      this.$set(this.formData, 'modelName', chooseData.modelName)
+      this.$set(this.formData, 'modelId', chooseData.modelId)
+      this.$set(this.formData, 'categoryName', chooseData.categoryName)
+      this.$set(this.formData, 'modelCode', chooseData.modelCode)
+      this.$set(this.formData, 'repPdtModelName', chooseData.repPdtModelName)
+      localStorage.removeItem("app-choose-barcode-chooseData")
+    }
+  },
 }
 </script>
 

+ 32 - 1
src/view-app/main/main.vue

@@ -20,11 +20,13 @@
 </template>
 
 <script>
-import {getNewTagList, localRemove} from "@/libs/base/util";
+import {getNewTagList, localSave, localRead, localRemove} from "@/libs/base/util";
 import {mapMutations} from "vuex";
+import {appIndexMixin} from '@/mixins/appindex.js'
 
 export default {
   name: "app-main",
+  mixins: [appIndexMixin],
   data() {
     return {
       activeTitle: this.$route.meta.title,// 标题
@@ -95,8 +97,37 @@ export default {
     ...mapMutations([
       'setTagNavList',
     ]),
+
+    /**
+     * @desc   : 获取当前手机厂商
+     * @author : 姜永辉
+     * @date   : 2023/5/9 9:14
+     */
+    getManufactures() {
+      // 获取当前手机厂商
+      this.excute(this.$service.appCommonService, this.$service.appCommonService.getManufactures, {})
+        .then(res => {
+          //获取当前手机厂商
+          let m = ''
+          try {
+            //获取当前手机厂商-原生android的函数
+            m = window.jsTest.getManufacture()
+          } catch (err) {
+          }
+          let values = res.data || []
+          console.log(values.indexOf(m))
+          if (values.indexOf(m) > 0) {
+            // 获取当前手机厂商是否是13个品牌的
+            localSave('Manufactures', true)
+          } else {
+            // 获取当前手机厂商是pda
+            localRemove('Manufactures')
+          }
+        })
+    },
   },
   created() {
+    this.getManufactures()
   }
 }
 </script>

+ 0 - 5
src/view-app/main/other.vue

@@ -40,7 +40,6 @@
 </template>
 
 <script>
-import {localRead, localSave,localRemove} from "@/libs/base/util";
 import {mapMutations} from "vuex";
 
 export default {
@@ -181,10 +180,6 @@ export default {
     if (this.btnId) {
       document.getElementById(this.btnId).scrollIntoView(false)
     }
-    // history.pushState(null, null, document.URL);
-    // window.addEventListener('popstate', function () {
-    //   history.pushState(null, null, document.URL);
-    // });
   }
 
 }

+ 9 - 0
src/view/core/user/form.vue

@@ -161,6 +161,15 @@ export default {
           sortBoolean: false,
           controlId: 'staffId',
           type: 'tableSelect',
+          initParam: () => {
+            return {
+              jobIds: {default: [(self.formData.workTeamList && self.formData.workTeamList[self.jobIndex])
+                ? parseInt(self.formData.workTeamList[self.jobIndex].jobId) : null,
+                (self.formData.workTeamList && self.formData.workTeamList[self.jobIndex])
+                  ? self.formData.workTeamList[self.jobIndex].jobId_Name: null],
+              valueKind:self.$config.docUserInput.mSearch},
+            }
+          },
           //z:不关联工种了
           // param: () => {
           //   return {

Some files were not shown because too many files changed in this diff