| | |
| | | "type" : "uni-app:app-ios" |
| | | }, |
| | | { |
| | | "customPlaygroundType" : "device", |
| | | "customPlaygroundType" : "local", |
| | | "localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug", |
| | | "openVueDevtools" : true, |
| | | "packageName" : "com.shebeiguanli.www", |
| | | "playground" : "standard", |
| | | "playground" : "custom", |
| | | "type" : "uni-app:app-android" |
| | | } |
| | | ] |
| | |
| | | }, |
| | | onShow: function() { |
| | | console.log('App Show') |
| | | // let content = "您有一条新的消息!"; |
| | | // let options = { |
| | | // title: "通知标题", |
| | | // cover: false, // 是否覆盖上一次的通知 |
| | | // when: new Date() // 通知显示时间 |
| | | // }; |
| | | // let payload = JSON.stringify({ id: "123", key: "value" }); |
| | | |
| | | // plus.push.createMessage(content, payload, options); |
| | | |
| | | }, |
| | | onHide: function() { |
| | | console.log('App Hide') |
| | |
| | | { |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "2.0.52", |
| | | "versionCode" : 252, |
| | | "transformPx" : false, |
| | | "name": "智云LMES", |
| | | "appid": "__UNI__B002F49", |
| | | "description": "", |
| | | "versionName": "2.0.54", |
| | | "versionCode": 254, |
| | | "transformPx": false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | | "usingComponents" : true, |
| | | "nvueStyleCompiler" : "uni-app", |
| | | "compilerVersion" : 3, |
| | | "splashscreen" : { |
| | | "alwaysShowBeforeRender" : true, |
| | | "waiting" : true, |
| | | "autoclose" : true, |
| | | "delay" : 0 |
| | | "app-plus": { |
| | | "usingComponents": true, |
| | | "nvueStyleCompiler": "uni-app", |
| | | "compilerVersion": 3, |
| | | "splashscreen": { |
| | | "alwaysShowBeforeRender": true, |
| | | "waiting": true, |
| | | "autoclose": true, |
| | | "delay": 0 |
| | | }, |
| | | "screenOrientation": [ //可选,字符串数组类型,应用支持的横竖屏 |
| | | "portrait-primary", //可选,字符串类型,支持竖屏 |
| | | "portrait-secondary" //可选,字符串类型,支持反向竖屏 |
| | | ], |
| | | /* 模块配置 */ |
| | | "modules" : { |
| | | "Camera" : {}, |
| | | "Contacts" : {}, |
| | | "Bluetooth" : {}, |
| | | "Barcode" : {}, |
| | | "Push" : {} |
| | | "modules": { |
| | | "Camera": {}, |
| | | "Contacts": {}, |
| | | "Bluetooth": {}, |
| | | "Barcode": {} |
| | | }, |
| | | /* 应用发布信息 */ |
| | | "distribute" : { |
| | | "distribute": { |
| | | /* android打包配置 */ |
| | | "android" : { |
| | | "permissions" : [ |
| | | "android": { |
| | | "permissions": [ |
| | | "<uses-feature android:name=\"android.hardware.camera\"/>", |
| | | "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
| | | "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
| | |
| | | "<uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>" |
| | | ], |
| | | "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], |
| | | "minSdkVersion" : 23 |
| | | "abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"], |
| | | "minSdkVersion": 23 |
| | | }, |
| | | /* ios打包配置 */ |
| | | "ios" : { |
| | | "dSYMs" : false |
| | | "ios": { |
| | | "dSYMs": false |
| | | }, |
| | | /* SDK配置 */ |
| | | "sdkConfigs" : { |
| | | "ad" : {}, |
| | | "push" : {} |
| | | "sdkConfigs": { |
| | | "ad": {}, |
| | | "push": {} |
| | | }, |
| | | "icons" : { |
| | | "android" : { |
| | | "hdpi" : "unpackage/res/icons/72x72.png", |
| | | "xhdpi" : "unpackage/res/icons/96x96.png", |
| | | "xxhdpi" : "unpackage/res/icons/144x144.png", |
| | | "xxxhdpi" : "unpackage/res/icons/192x192.png" |
| | | "icons": { |
| | | "android": { |
| | | "hdpi": "unpackage/res/icons/72x72.png", |
| | | "xhdpi": "unpackage/res/icons/96x96.png", |
| | | "xxhdpi": "unpackage/res/icons/144x144.png", |
| | | "xxxhdpi": "unpackage/res/icons/192x192.png" |
| | | }, |
| | | "ios" : { |
| | | "appstore" : "unpackage/res/icons/1024x1024.png", |
| | | "ipad" : { |
| | | "app" : "unpackage/res/icons/76x76.png", |
| | | "app@2x" : "unpackage/res/icons/152x152.png", |
| | | "notification" : "unpackage/res/icons/20x20.png", |
| | | "notification@2x" : "unpackage/res/icons/40x40.png", |
| | | "proapp@2x" : "unpackage/res/icons/167x167.png", |
| | | "settings" : "unpackage/res/icons/29x29.png", |
| | | "settings@2x" : "unpackage/res/icons/58x58.png", |
| | | "spotlight" : "unpackage/res/icons/40x40.png", |
| | | "spotlight@2x" : "unpackage/res/icons/80x80.png" |
| | | "ios": { |
| | | "appstore": "unpackage/res/icons/1024x1024.png", |
| | | "ipad": { |
| | | "app": "unpackage/res/icons/76x76.png", |
| | | "app@2x": "unpackage/res/icons/152x152.png", |
| | | "notification": "unpackage/res/icons/20x20.png", |
| | | "notification@2x": "unpackage/res/icons/40x40.png", |
| | | "proapp@2x": "unpackage/res/icons/167x167.png", |
| | | "settings": "unpackage/res/icons/29x29.png", |
| | | "settings@2x": "unpackage/res/icons/58x58.png", |
| | | "spotlight": "unpackage/res/icons/40x40.png", |
| | | "spotlight@2x": "unpackage/res/icons/80x80.png" |
| | | }, |
| | | "iphone" : { |
| | | "app@2x" : "unpackage/res/icons/120x120.png", |
| | | "app@3x" : "unpackage/res/icons/180x180.png", |
| | | "notification@2x" : "unpackage/res/icons/40x40.png", |
| | | "notification@3x" : "unpackage/res/icons/60x60.png", |
| | | "settings@2x" : "unpackage/res/icons/58x58.png", |
| | | "settings@3x" : "unpackage/res/icons/87x87.png", |
| | | "spotlight@2x" : "unpackage/res/icons/80x80.png", |
| | | "spotlight@3x" : "unpackage/res/icons/120x120.png" |
| | | "iphone": { |
| | | "app@2x": "unpackage/res/icons/120x120.png", |
| | | "app@3x": "unpackage/res/icons/180x180.png", |
| | | "notification@2x": "unpackage/res/icons/40x40.png", |
| | | "notification@3x": "unpackage/res/icons/60x60.png", |
| | | "settings@2x": "unpackage/res/icons/58x58.png", |
| | | "settings@3x": "unpackage/res/icons/87x87.png", |
| | | "spotlight@2x": "unpackage/res/icons/80x80.png", |
| | | "spotlight@3x": "unpackage/res/icons/120x120.png" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "nativePlugins" : { |
| | | "Mpaas-Scan" : { |
| | | "AppId" : "ALIPUB2087527291109", |
| | | "License" : "uqSDoPf8ArVz0mKgs62fihEiELxaNc/fCwZU2eRwDvfdN3uhWCRRtXgszPkWmqjSUPYSFgOdMh0dv4UkQe0twC8fZt8+71FB3K6A83NaLtwi5gu+hVJ8MZnOTUe/ipmCCVmRGapmwfKfyHbV2oSAOLbq4/fgBszewOVtdjx7ogzyIltcCHOESsdejnFxmg/7+HuX5/0qmLxGIUUwGhwQazot0bQeGBP8sJ4ONZLd7n4WQFe8bQCrRcB3CPAFClwA/VldpIjOwrTYTd0LHyrhPJN5xHdpeoKmGIyJYsoxm94DDUFZyGHB+Qs+3euCJHOlCqpa7/A+ciAdUSeKHa0tkw==", |
| | | "WorkspaceId" : "default", |
| | | "__plugin_info__" : { |
| | | "name" : "支付宝原生扫码插件", |
| | | "description" : "支付宝原生扫码组件,包体积仅0.7MB,15分钟即可完成接入。同时,mPaaS提供「扫码分析」大盘", |
| | | "platforms" : "Android,iOS", |
| | | "url" : "https://ext.dcloud.net.cn/plugin?id=2636", |
| | | "android_package_name" : "com.shebeiguanli.www", |
| | | "ios_bundle_id" : "", |
| | | "isCloud" : true, |
| | | "bought" : 1, |
| | | "pid" : "2636", |
| | | "parameters" : { |
| | | "AppId" : { |
| | | "des" : "Android平台的AppId,请填写Android的config文件中的appId对应的值", |
| | | "key" : "mobilegw.appid", |
| | | "value" : "" |
| | | "nativePlugins": { |
| | | "Mpaas-Scan": { |
| | | "AppId": "ALIPUB2087527291109", |
| | | "License": "uqSDoPf8ArVz0mKgs62fihEiELxaNc/fCwZU2eRwDvfdN3uhWCRRtXgszPkWmqjSUPYSFgOdMh0dv4UkQe0twC8fZt8+71FB3K6A83NaLtwi5gu+hVJ8MZnOTUe/ipmCCVmRGapmwfKfyHbV2oSAOLbq4/fgBszewOVtdjx7ogzyIltcCHOESsdejnFxmg/7+HuX5/0qmLxGIUUwGhwQazot0bQeGBP8sJ4ONZLd7n4WQFe8bQCrRcB3CPAFClwA/VldpIjOwrTYTd0LHyrhPJN5xHdpeoKmGIyJYsoxm94DDUFZyGHB+Qs+3euCJHOlCqpa7/A+ciAdUSeKHa0tkw==", |
| | | "WorkspaceId": "default", |
| | | "__plugin_info__": { |
| | | "name": "支付宝原生扫码插件", |
| | | "description": "支付宝原生扫码组件,包体积仅0.7MB,15分钟即可完成接入。同时,mPaaS提供「扫码分析」大盘", |
| | | "platforms": "Android,iOS", |
| | | "url": "https://ext.dcloud.net.cn/plugin?id=2636", |
| | | "android_package_name": "com.shebeiguanli.www", |
| | | "ios_bundle_id": "", |
| | | "isCloud": true, |
| | | "bought": 1, |
| | | "pid": "2636", |
| | | "parameters": { |
| | | "AppId": { |
| | | "des": "Android平台的AppId,请填写Android的config文件中的appId对应的值", |
| | | "key": "mobilegw.appid", |
| | | "value": "" |
| | | }, |
| | | "License" : { |
| | | "des" : "Android平台的License,,请填写Android的config文件中的mpaasConfigLicense对应的值", |
| | | "key" : "mpaasConfigLicense", |
| | | "value" : "" |
| | | "License": { |
| | | "des": "Android平台的License,,请填写Android的config文件中的mpaasConfigLicense对应的值", |
| | | "key": "mpaasConfigLicense", |
| | | "value": "" |
| | | }, |
| | | "WorkspaceId" : { |
| | | "des" : "Android平台的WorkspaceId,请填写Android的config文件中的workspaceId对应的值", |
| | | "key" : "workspaceId", |
| | | "value" : "" |
| | | "WorkspaceId": { |
| | | "des": "Android平台的WorkspaceId,请填写Android的config文件中的workspaceId对应的值", |
| | | "key": "workspaceId", |
| | | "value": "" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "permissions": [ |
| | | "android.permission.POST_NOTIFICATIONS" // Android 13+ 必需:通知权限 |
| | | ], |
| | | "notificationChannels": [ |
| | | // 渠道1:重要通知(不折叠、弹出、声音+震动) |
| | | { |
| | | "id": "critical_notify", // 渠道ID(唯一,自定义) |
| | | "name": "重要通知", // 用户可见的渠道名称 |
| | | "description": "", // 用户可见的渠道描述 |
| | | "importance": 4, // 最高优先级(1-4,4=弹出+声音+震动) |
| | | "sound": "system", // 自定义通知声音(支持本地路径或系统声音) |
| | | "vibration": true, // 启用震动 |
| | | "vibrationPattern": [0, 100, 200, 300], // 震动模式:[延迟, 震动, 暂停, 震动](毫秒) |
| | | "lights": true, // 启用呼吸灯 |
| | | "lightColor": "#FF0000", // 呼吸灯颜色(RGB格式) |
| | | "showBadge": true // 显示应用角标 |
| | | } |
| | | ] |
| | | }, |
| | | /* 快应用特有相关 */ |
| | | "quickapp" : {}, |
| | | "quickapp": {}, |
| | | /* 小程序特有相关 */ |
| | | "mp-weixin" : { |
| | | "appid" : "", |
| | | "setting" : { |
| | | "urlCheck" : false |
| | | "mp-weixin": { |
| | | "appid": "", |
| | | "setting": { |
| | | "urlCheck": false |
| | | }, |
| | | "usingComponents" : true |
| | | "usingComponents": true |
| | | }, |
| | | "mp-alipay" : { |
| | | "usingComponents" : true |
| | | "mp-alipay": { |
| | | "usingComponents": true |
| | | }, |
| | | "mp-baidu" : { |
| | | "usingComponents" : true |
| | | "mp-baidu": { |
| | | "usingComponents": true |
| | | }, |
| | | "mp-toutiao" : { |
| | | "usingComponents" : true |
| | | "mp-toutiao": { |
| | | "usingComponents": true |
| | | }, |
| | | "uniStatistics" : { |
| | | "enable" : false |
| | | "uniStatistics": { |
| | | "enable": false |
| | | }, |
| | | "vueVersion" : "2", |
| | | |
| | | "locale" : "zh-Hans", |
| | | "fallbackLocale" : "zh-Hans" |
| | | } |
| | | "vueVersion": "2", |
| | | "orientation": [ |
| | | //竖屏正方向 |
| | | "portrait-primary", |
| | | //竖屏反方向 |
| | | "portrait-secondary", |
| | | //横屏正方向 |
| | | "landscape-primary", |
| | | //横屏反方向 |
| | | "landscape-secondary", |
| | | //自然方向 |
| | | "default" |
| | | ], |
| | | "locale": "zh-Hans", |
| | | "fallbackLocale": "zh-Hans" |
| | | } |
| | |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/baogong/abnormal", |
| | | "style": { |
| | | "navigationBarTitleText": "异常反馈单", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | // { |
| | | // "path": "pages/baogong/abnormal", |
| | | // "style": { |
| | | // "navigationBarTitleText": "异常反馈单", |
| | | // "enablePullDownRefresh": false |
| | | // } |
| | | // }, |
| | | { |
| | | "path": "pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBillList", |
| | | "style": { |
| | |
| | | "navigationBarTitleText": "巡检单" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ZLGL/mojianjianyan/lastPieceCheckBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "末件检验单维护" |
| | | } |
| | | }, |
| | | // { |
| | | // "path": "pages/ZLGL/mojianjianyan/lastPieceCheckBillList", |
| | | // "style": { |
| | | // "navigationBarTitleText": "末件检验单维护" |
| | | // } |
| | | // }, |
| | | { |
| | | "path": "pages/ZLGL/lailiaojianyan/POStockInCheckBill", |
| | | "style": { |
| | |
| | | "navigationBarTitleText": "来料检验单维护" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/ZLGL/mojianjianyan/lastPieceCheckBill", |
| | | "style": { |
| | | "navigationBarTitleText": "末件检验单" |
| | | } |
| | | }, |
| | | // { |
| | | // "path": "pages/ZLGL/mojianjianyan/lastPieceCheckBill", |
| | | // "style": { |
| | | // "navigationBarTitleText": "末件检验单" |
| | | // } |
| | | // }, |
| | | { |
| | | "path": "pages/chaituosaoma-xiaowei/UnpackPallet", |
| | | "style": { |
| | |
| | | <view class="bottom-btn" id="bottom-btn"> |
| | | <button :class="EnableSubmit?'btn-a':'btn-c'" :disabled="!EnableSubmit" size="mini" |
| | | @tap="cmdSubmit">提交</button> |
| | | <button class="btn-a" size="mini" @tap="cmdAdd">新增</button> |
| | | <button class="btn-a" size="mini" @tap="cmdAdd">新增</button> |
| | | <view style="flex: 1;"></view> |
| | | <!-- <button class="btn-d" size="mini" @tap="cmdDelete">删除</button> --> |
| | | <button class="btn-c" size="mini" @tap="cmdExit">退出</button> |
| | |
| | | detailManifestCursor: 0, // 明细清单索引指针 |
| | | |
| | | HCheckResultValueList: ["合格", "不合格", "保留"], |
| | | HUseResultValueList: ["接收", "让步接收", "挑选(全检)", "判退"], |
| | | HUseResultValueList: ["接收", "让步接收"], |
| | | HCheckResultList: [{ |
| | | value: 1, |
| | | text: "合格" |
| | |
| | | value: 3, |
| | | text: "保留" |
| | | }], |
| | | |
| | | HUseResultList: [{ |
| | | value: "A", |
| | | text: "接收" |
| | |
| | | HCheckResultChangeHandle(e) { |
| | | this.detailManifestItem.HCheckResult = |
| | | this.HCheckResultList.find(elem => elem.text == e)?.value |
| | | if (e == '合格') { |
| | | this.HUseResultValueList = ["接收", "让步接收"] |
| | | } else if (e == '不合格') { |
| | | this.HUseResultValueList = ["挑选(全检)", "判退"] |
| | | } else if (e == '保留') { |
| | | this.HUseResultValueList = ["接收", "让步接收", "挑选(全检)", "判退"] |
| | | } |
| | | |
| | | this.HUseResultChangeHandle(this.HUseResultValueList[0]) |
| | | }, |
| | | HUseResultChangeHandle(e) { |
| | | this.detailManifestItem.HUseResult = |
| | |
| | | this.getCode(code) |
| | | }) |
| | | }, |
| | | cmdAdd(){ |
| | | cmdAdd() { |
| | | uni.redirectTo({ |
| | | url: "/pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast" |
| | | }) |
| | |
| | | "HCheckResult": this.detailManifestItem.HCheckResult, |
| | | "HSupNumber": this.detailManifestItem.HSupNumber, |
| | | "HUseResult": this.detailManifestItem.HUseResult, |
| | | "HSeQ": this.detailManifestItem.HSeQ, |
| | | "HSeQ": this.detailManifestItem.HSeQ || 1, |
| | | "HSourceInterID": this.detailManifestItem.HSourceInterID, |
| | | "HSourceEntryID": this.detailManifestItem.HSourceEntryID, |
| | | "HSourceBillNo": this.detailManifestItem.HSourceBillNo, |
| | |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /></view> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | arrayHStockPlaceNameComputed: { |
| | | get() { |
| | | // 动态计算对应仓库的仓位 |
| | | return this.HStockPlaceNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | this.OperationType = e.OperationType |
| | |
| | | this.refreshHBillNoFocus() |
| | | }, |
| | | methods: { |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('Code: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | handleInput(event) { |
| | | // 这里可以添加额外的逻辑处理,比如校验或进一步的操作 |
| | | console.log(event.target.value); |
| | |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | if(this.HWHNameList[i]['启用仓位'] == 'Y'){ |
| | | this.showHStockPlaceName = true |
| | | }else { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | } |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | CommonUtils |
| | | } from "../../utils/common"; |
| | | import { getLanguagePackJson } from "../../utils/i18n"; |
| | | import WebSocketServices from "../../utils/WebSocketServices"; |
| | | import WebSocketServices from "@/utils/WebSocketServices"; |
| | | export default { |
| | | components: { |
| | | hFormAlert |
| | |
| | | "杭州凯贝奈特": 'http://192.168.50.253:8080/API/', |
| | | "杭州凯贝奈特外网": 'http://erp.hzcabinet.cn:9090/API/', |
| | | "翁涛涛本地测试": 'http://localhost:81/API/', |
| | | "陈镐哲本地测试": 'http://192.168.0.121:81/API/', |
| | | "陈镐哲本地测试2": 'http://192.168.89.27:81/API/', |
| | | "陈镐哲本地测试": 'http://192.168.0.102:81/API/', |
| | | "陈镐哲本地测试2": 'http://192.168.255.35:81/API/', |
| | | "张瑞广本地测试": 'http://localhost:8082/API/', |
| | | "余思杰本地测试": 'http://localhost:8082/LuBaoAPI/', |
| | | // 小卫内外网 |
| | |
| | | "宁波四维尔-外网": "http://220.189.218.155:9010/API/", |
| | | // 锦隆 |
| | | "锦隆-智能家居": "http://192.168.1.11/API/", |
| | | "锦隆-智能家居-外网": "http://61.174.29.234:8880/API/", |
| | | // 华舟包装 |
| | | "宁波华舟包装": "http://192.168.88.167:8082/API/", |
| | | "宁波华舟包装-外网": "http://61.164.64.222:8082//API/", |
| | |
| | | uni.setStorageSync('HSecManagerID', res.data.data[0].HSecManagerID); //对应验收 |
| | | uni.setStorageSync('HSecManagerName', res.data.data[0].HSecManagerName); |
| | | this.CommonUtils.setServerUrl(this.serverUrl) |
| | | // this.WebSocketServices.createConnect(res.data.data[0].Czybm) |
| | | // console.log('this.WebSocsketServices: ',this.WebSocsketServices); |
| | | // this.WebSocketServices.createConnect(res.data.data[0].HEmpID,res.data.data[0].HEmpName); |
| | | uni.reLaunch({ |
| | | url: '/pages/index/index' |
| | | }) |
| | |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | </view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | components: { |
| | | FIFOListComponentVue |
| | | }, |
| | | computed: { |
| | | arrayHStockPlaceNameComputed: { |
| | | get() { |
| | | // 动态计算对应仓库的仓位 |
| | | return this.HStockPlaceNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | userInfo: getUserInfo(), |
| | |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('Code: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | cmdDelete(item) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | } else { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | } |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | </view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | arrayHStockPlaceNameComputed: { |
| | | get() { |
| | | // 动态计算对应仓库的仓位 |
| | | return this.HStockPlaceNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | this.OperationType = e.OperationType |
| | |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('Code: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async refreshHBarCodeFocus() { |
| | | this.HBarCodeFocus = false |
| | | await this.$nextTick() |
| | |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | } else { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | } |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | </view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | components: { |
| | | FIFOListComponentVue |
| | | }, |
| | | computed: { |
| | | arrayHStockPlaceNameComputed: { |
| | | get() { |
| | | // 动态计算对应仓库的仓位 |
| | | return this.HStockPlaceNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | userInfo: getUserInfo(), |
| | |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('Code: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async refreshHBillState() { |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | } else { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | } |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | <view class="title">调出仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HSCWHName" |
| | | @input="HSCWHNameChange"></uni-combox> |
| | | @input="HSCWHNameChange" @confirm="HWHNameOutScan"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调出仓位:</view> |
| | | <view class="right" v-show="showHSCStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HSCSPName" @input="HSCStockPlaceNameChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHSCStockPlaceName"> |
| | | <input v-model="hform.HSCSPName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | <!-- TODO: 四维尔需要扫仓位码 带出仓库仓位信息,根据公司判断是否需要禁用仓位 --> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HOutStockPlaceName" @input="HOutStockPlaceNameChange" |
| | | @confirm="HStockPlaceOutNameScan"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="tabs"> |
| | |
| | | <view class="form-item"> |
| | | <view class="title">调入仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | <uni-combox :candidates="arrayHWHInName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | @input="HWHInNameChange" @confirm="HWHNameInScan"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">调入仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | <!-- TODO: 添加公司判断,四维尔清除仓位扫码限制,其他照旧 --> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHStockPlaceInNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceInNameChange" |
| | | @confirm="HStockPlaceNameInScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | </view> |
| | | <!-- <view class="righton" v-show="!HIsStockMgr"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!HIsStockMgr" placeholder="不可操作" /> |
| | | </view> --> |
| | | </view> |
| | | <view class="form-item" v-show="showHBillNo"> |
| | | <view class="title">单据号:</view> |
| | |
| | | HWHNameList: [], |
| | | arrayHStockPlaceName: [], //仓位 |
| | | HStockPlaceNameList: [], |
| | | arrayHWHInName: [], // 调入仓库 |
| | | HWHInNameList: [], |
| | | arrayHStockPlaceInName: [], //调入仓位 |
| | | HStockPlaceInNameList: [], |
| | | |
| | | Materlist: [], |
| | | hform: { |
| | |
| | | HFIFOList: [], // 先进先出列表缓存 |
| | | } |
| | | }, |
| | | computed: { |
| | | HIsStockInner: { |
| | | get: function() { |
| | | if (this.hform.HStockStyle == '组织内调拨') { |
| | | return true |
| | | } |
| | | return false |
| | | } |
| | | }, |
| | | arrayHStockPlaceNameComputed: { |
| | | get() { |
| | | // 动态计算对应调出仓库的仓位 |
| | | return this.HStockPlaceNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HSCWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | }, |
| | | arrayHStockPlaceInNameComputed: { |
| | | get() { |
| | | // 动态计算对应调入仓库的仓位 |
| | | return this.HStockPlaceInNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | this.OperationType = e.OperationType |
| | |
| | | } |
| | | |
| | | this.getHBaseList() |
| | | this.getHWarehouseInList() |
| | | }, |
| | | methods: { |
| | | // 调入仓位修改 |
| | | HStockPlaceInNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceInNameList.length; i++) { |
| | | if (this.HStockPlaceInNameList[i].仓位名称 == e) { |
| | | this.hform.HStockPlaceName = this.HStockPlaceInNameList[i].仓位名称 |
| | | this.hform.HStockPlaceID = this.HStockPlaceInNameList[i].HMainID |
| | | } |
| | | } |
| | | }, |
| | | // 调入仓库修改 |
| | | HWHInNameChange(e) { |
| | | console.log('e: ', e); |
| | | this.hform.HStockPlaceName = '' |
| | | this.hform.HStockPlaceID = 0 |
| | | for (var i = 0; i < this.HWHInNameList.length; i++) { |
| | | if (this.HWHInNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHInNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHInNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | if (this.HWHInNameList[i]['启用仓位'] == 'Y') { |
| | | this.HIsStockMgr = true |
| | | this.getStockPlaceRemote(this.HWHInNameList[i]["HSPGroupID"], 1) // 修改调入仓库 |
| | | } else { |
| | | // this.hform.HStockPlaceName = '' |
| | | this.HIsStockMgr = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | // 调入仓库资料 |
| | | getHWarehouseInList(Organizaiton) { |
| | | Organizaiton = Organizaiton || uni.getStorageSync("Organization") |
| | | CommonUtils.doRequest2({ |
| | | url: '/Gy_Warehouse/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: Organizaiton |
| | | }, |
| | | resFunction: (res) => { |
| | | console.log('调入仓库 res: ', res.data.data); |
| | | if (res.data.count == 1) { |
| | | this.HWHInNameList = [] |
| | | this.arrayHWHInName = [] |
| | | |
| | | this.HWHInNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHWHInName[i] = res.data.data[i].仓库名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓库数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | }, |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID, Mode) { |
| | | // Mode=1 -> 调入仓位数据获取; Mode=2 -> 调出仓位数据获取 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | if (Mode == 1) { |
| | | this.HStockPlaceInNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceInName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | return |
| | | } |
| | | if (Mode == 2) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | return |
| | | } |
| | | |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HWHNameOutScan(e) { |
| | | return |
| | | // 扫描仓库码 |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHNameList.findIndex(elem => elem['条码编号'] == e) |
| | | if (index == -1) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描仓库条码对应的仓库不存在...' |
| | | }) |
| | | } else { |
| | | this.HWHNameChange(this.HWHNameList[index]['仓库名称']) |
| | | } |
| | | }, |
| | | async HStockPlaceOutNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('仓位码: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HOutStockPlaceID = 0 |
| | | this.hform.HOutStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HOutStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HOutStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HSCWHID = res.data.data[0].HWHID |
| | | this.hform.HSCWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HWHNameInScan(e) { |
| | | return; |
| | | // 扫描仓库码 |
| | | console.log('仓库码: ', e); |
| | | let index = this.HWHInNameList.findIndex(elem => elem['条码编号'] == e) |
| | | if (index == -1) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: '扫描仓库条码对应的仓库不存在...' |
| | | }) |
| | | } else { |
| | | this.HWHInNameChange(this.HWHInNameList[index]['仓库名称']) |
| | | } |
| | | }, |
| | | async HStockPlaceNameInScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('仓位码: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | cmdDelete(item){ |
| | | uni.showModal({ |
| | | title: '提示', |
| | |
| | | console.log('调出仓库: ',this.HWHNameList[i]); |
| | | this.hform.HSCWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HSCWHID = this.HWHNameList[i].HItemID |
| | | this.HOutStockPlaceNameChange(null) |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHSCStockPlaceName = true |
| | | this.HSCIsStockMgr = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"], 2) // 修改调出仓库 |
| | | // 查询仓位数据 |
| | | } else { |
| | | this.hform.HSCSPName = '' |
| | | this.showHSCStockPlaceName = false |
| | | |
| | | this.HSCIsStockMgr = false |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | HOutStockPlaceNameChange(e) { |
| | | let index = this.HStockPlaceNameList.findIndex(elem => elem['仓位名称'] == e) |
| | | this.hform.HOutStockPlaceName = '' |
| | | this.hform.HOutStockPlaceID = 0 |
| | | if (index != -1) { |
| | | this.hform.HOutStockPlaceName = this.HStockPlaceNameList[index].仓位名称 |
| | | this.hform.HOutStockPlaceID = this.HStockPlaceNameList[index].HMainID |
| | | } |
| | | |
| | | // for (var i = 0; i < this.HStockPlaceInNameList.length; i++) { |
| | | // if (this.HStockPlaceInNameList[i].仓位名称 == e) { |
| | | // this.hform.HOutStockPlaceName = this.HStockPlaceInNameList[i].仓位名称 |
| | | // this.hform.HOutStockPlaceID = this.HStockPlaceInNameList[i].HMainID |
| | | // } |
| | | // } |
| | | }, |
| | | //选择调入仓位 |
| | | HStockPlaceNameChange(e) { |
| | | for (var i = 0; i < this.HStockPlaceNameList.length; i++) { |
| | |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"><input v-model="hform.HStockPlaceName" |
| | | placeholder="不可操作" /></view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | HFIFOList: [], // 先进先出列表缓存 |
| | | } |
| | | }, |
| | | computed: { |
| | | arrayHStockPlaceNameComputed: { |
| | | get() { |
| | | // 动态计算对应仓库的仓位 |
| | | return this.HStockPlaceNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | BillListPopupVue, |
| | | FIFOListComponentVue |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('Code: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | toScanCode2() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | if (this.HWHNameList[i].启用仓位 == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | } else { |
| | | this.showHStockPlaceName = false |
| | | } |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | </view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | arrayHStockPlaceNameComputed: { |
| | | get() { |
| | | // 动态计算对应仓库的仓位 |
| | | return this.HStockPlaceNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | this.OperationType = e.OperationType |
| | |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('Code: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async refreshHBarCodeFocus() { |
| | | this.HBarCodeFocus = false |
| | | await this.$nextTick() |
| | |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | } else { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | } |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | </view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | |
| | | components: { |
| | | FIFOListComponentVue |
| | | }, |
| | | computed: { |
| | | arrayHStockPlaceNameComputed: { |
| | | get() { |
| | | // 动态计算对应仓库的仓位 |
| | | return this.HStockPlaceNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | userInfo: getUserInfo(), |
| | |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('Code: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async refreshHBillState() { |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | } else { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | } |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | <view class="form-item"> |
| | | <view class="title">仓库:</view> |
| | | <view class="right"> |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName" |
| | | <uni-combox :candidates="arrayHWHName" placeholder="请选择仓库" v-model="hform.HWHName" |
| | | @input="HWHNameChange"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">仓位:</view> |
| | | <view class="right" v-show="showHStockPlaceName"> |
| | | <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange"></uni-combox> |
| | | <view class="right" v-show="true"> |
| | | <uni-combox :candidates="arrayHStockPlaceNameComputed" placeholder="请输入(或扫描)仓位" |
| | | v-model="hform.HStockPlaceName" @input="HStockPlaceNameChange" |
| | | @confirm="HStockPlaceNameScan"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHStockPlaceName"> |
| | | <input v-model="hform.HStockPlaceName" :disabled="!showHStockPlaceName" placeholder="不可操作" /> |
| | | </view> |
| | | <view class="righton" v-show="false"><input v-model="hform.HStockPlaceName" placeholder="不可操作" |
| | | :disabled="!showHStockPlaceName" /></view> |
| | | </view> |
| | | |
| | | <view class="tabs"> |
| | | <!-- <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">选择源单</view> --> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">表头信息</view> |
| | |
| | | HFIFOList: [], // 先进先出列表缓存 |
| | | } |
| | | }, |
| | | computed: { |
| | | arrayHStockPlaceNameComputed: { |
| | | get() { |
| | | // 动态计算对应仓库的仓位 |
| | | return this.HStockPlaceNameList |
| | | .filter(e => e['所属仓库'] == this.hform.HWHName) |
| | | .map(e => e['仓位名称']) |
| | | } |
| | | } |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | this.OperationType = e.OperationType |
| | |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | // 获取仓位 |
| | | async getStockPlaceRemote(HSPGroupID) { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and HSPGroupID = ${HSPGroupID}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | this.HStockPlaceNameList = res.data.data |
| | | for (var i = 0; i < res.data.data.length; i++) { |
| | | this.arrayHStockPlaceName[i] = res.data.data[i].仓位名称 |
| | | } |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async HStockPlaceNameScan(e) { |
| | | // 扫描仓位码 |
| | | console.log('Code: ', e); |
| | | // 不先置空的话,数据再次扫描相同的仓位码 不会触发组件内的刷新 |
| | | this.hform.HStockPlaceID = 0 |
| | | this.hform.HStockPlaceName = '' |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_StockPlace/list', |
| | | data: { |
| | | sWhere: ` and 条码编号 = '${e}'`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | }) |
| | | |
| | | if (res.data.count == 1) { |
| | | |
| | | this.hform.HStockPlaceID = res.data.data[0].HMainID |
| | | this.hform.HStockPlaceName = res.data.data[0].仓位名称 |
| | | this.hform.HWHID = res.data.data[0].HWHID |
| | | this.hform.HWHName = res.data.data[0].所属仓库 |
| | | } else { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | uni.showToast({ |
| | | title: '仓位数据请求失败', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | async refreshHBillState() { |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | |
| | | // var name = e.split("(") |
| | | for (var i = 0; i < this.HWHNameList.length; i++) { |
| | | if (this.HWHNameList[i].仓库名称 == e) { |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | } else { |
| | | this.hform.HStockPlaceName = '' |
| | | this.showHStockPlaceName = false |
| | | } |
| | | this.hform.HWHName = this.HWHNameList[i].仓库名称 |
| | | this.hform.HWHID = this.HWHNameList[i].HItemID |
| | | this.HStockPlaceNameChange(null) |
| | | this.showHStockPlaceName = false |
| | | if (this.HWHNameList[i]['启用仓位'] == 'Y') { |
| | | this.showHStockPlaceName = true |
| | | this.getStockPlaceRemote(this.HWHNameList[i]["HSPGroupID"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | import { CommonUtils } from "@/utils/common.js"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common.js"; |
| | | |
| | | class WebSocketServices { |
| | | constructor() { |
| | | this.wsInstance = null; // WebSocket 实例 |
| | | this.isConnecting = false; // 避免并发重连 |
| | | this.isConnected = false; // 避免并发重连 |
| | | this.wsUrl = CommonUtils.httpFormatWs() |
| | | this.wsUrl = CommonUtils.httpFormatWs() |
| | | } |
| | | |
| | | |
| | | // 建立WebSocket连接 |
| | | createConnect(userId) { // 使用用户标识 作为后端连接的凭据 |
| | | |
| | | if(this.isConnecting || !userId || this.isConnected) { |
| | | createConnect(userId, userName) { // 使用用户标识 作为后端连接的凭据 |
| | | console.log('wsUrl: ', this.wsUrl); |
| | | console.log('userId: ', userId); |
| | | console.log('userName: ', userName); |
| | | if (this.isConnecting || !userId || this.isConnected) { |
| | | return |
| | | } |
| | | console.log('wsUrl: ',this.wsUrl); |
| | | console.log('userId: ',userId); |
| | | this.wsInstance = uni.connectSocket({ |
| | | url: this.wsUrl, |
| | | header: { |
| | | "X-User-Id": userId |
| | | }, |
| | | url: this.wsUrl + `?userId=${userId}&userName=${encodeURIComponent(userName)}`, |
| | | success() { |
| | | this.isConnecting = true |
| | | } |
| | | }) |
| | | |
| | | |
| | | // 监听套接字连接建立 |
| | | uni.onSocketOpen((res) => { |
| | | console.log('[webSocket]: 套接字连接建立成功'); |
| | | this.isConnecting = false |
| | | this.isConnected = true |
| | | console.log('res: ',res); |
| | | console.log('res: ', res); |
| | | this.wsInstance = res.socketTask |
| | | }) |
| | | |
| | | uni.onSocketMessage((res) => { |
| | | let message = JSON.parse(res.data) |
| | | console.log('message: ', message); |
| | | if (message.Type == 'Message') { |
| | | // 消息信号 |
| | | let content = JSON.parse(message.Content) |
| | | console.log('content: ', content); |
| | | |
| | | this.showTaskTip(`您有${content.length}条消息需要处理!`) |
| | | } else if (message.Type == 'ping') { |
| | | // 心跳信号 |
| | | uni.sendSocketMessage({ |
| | | data: "pong" |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 重连 |
| | | reConnect(reCount = 1, limit = 3) { |
| | | if(reCount > limit) { |
| | | if (reCount > limit) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: `超出最大重连次数。已退出连接` |
| | |
| | | icon: 'none', |
| | | title: `正在尝试重连,重连次数 ${reCount}` |
| | | }) |
| | | |
| | | reConnect(reCount+1, limit) |
| | | |
| | | |
| | | reConnect(reCount + 1, limit) |
| | | |
| | | uni.hideToast() |
| | | } |
| | | |
| | |
| | | disConnect() { |
| | | |
| | | } |
| | | |
| | | showTaskTip(Content) { |
| | | console.log('Content: ', Content); |
| | | // #ifdef APP-PLUS || APP |
| | | console.log('Content2: ', Content); |
| | | let content = Content; |
| | | let options = { |
| | | title: "重要通知", |
| | | cover: true, // 是否覆盖上一次的通知 |
| | | when: new Date() // 通知显示时间 |
| | | }; |
| | | // TODO 跳转到指定页 |
| | | let payload = JSON.stringify({}); |
| | | |
| | | plus.push.createMessage(content, payload, options); |
| | | // #endif |
| | | } |
| | | } |
| | | |
| | | export default new WebSocketServices() |
| | |
| | | console.log('httpUrl: ',httpUrl); |
| | | if(httpUrl.indexOf("http://") === 0){ |
| | | httpUrl = httpUrl.replace("http://", "") |
| | | httpUrl = "ws://" + httpUrl.split(":")[0]+":18080/WS" |
| | | httpUrl = "ws://" + httpUrl.split(":")[0]+":8089/ws" |
| | | }else if(httpUrl.indexOf("https://") === 0) { |
| | | httpUrl = httpUrl.replace("https://", "") |
| | | httpUrl = "wss://" + httpUrl.split(":")[0]+":18080/WS" |
| | | httpUrl = "wss://" + httpUrl.split(":")[0]+":8089/ws" |
| | | }else{ |
| | | // 提示传入连接错误 |
| | | } |