Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
# Conflicts:
# manifest.json
| | |
| | | node_modules |
| | | /package-lock.json |
| | | /unpackage |
| | | |
| | |
| | | "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') |
| | | |
| | | }, |
| | | onHide: function() { |
| | | console.log('App Hide') |
| | |
| | | { |
| | | "path": "pages/index/tab3", |
| | | "style": { |
| | | "navigationBarTitleText": "模具管理" |
| | | "navigationBarTitleText": "器具管理" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/baogong/AddLineBind", |
| | | "style": { |
| | | "navigationBarTitleText": "产线绑定", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/baogong/OA_ErrMsgBackBill", |
| | | "style": { |
| | | "navigationBarTitleText": "异常反馈单", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | // { |
| | | // "path": "pages/baogong/OA_ErrMsgBackBill", |
| | | // "style": { |
| | | // "navigationBarTitleText": "异常反馈单", |
| | | // "enablePullDownRefresh": false |
| | | // } |
| | | // }, |
| | | { |
| | | "path": "pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBillList", |
| | | "style": { |
| | |
| | | "style": { |
| | | "navigationBarTitleText": "采购退料列表", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/ZLGL/QualityReportStep/QualityReportStepBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "全检检验单(不良汇报)", |
| | | "pageOrientation": "auto" |
| | | |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/caigoutuiliao/POStockInBackBill", |
| | |
| | | { |
| | | "path": "pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList", |
| | | "style": { |
| | | "navigationBarTitleText": "模具调拨单", |
| | | "navigationBarTitleText": "器具调拨单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBill", |
| | | "style": { |
| | | "navigationBarTitleText": "模具调拨单", |
| | | "navigationBarTitleText": "器具调拨单", |
| | | "enablePullDownRefresh": true |
| | | } |
| | | }, |
| | |
| | | "path" : "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "模具维修派工单" |
| | | "navigationBarTitleText" : "器具维修派工单" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBillList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "模具维修派工单缓存" |
| | | "navigationBarTitleText" : "器具维修派工单缓存" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "模具维修验收单" |
| | | "navigationBarTitleText" : "器具维修验收单" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBillList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "模具维修验收单缓存" |
| | | "navigationBarTitleText" : "器具维修验收单缓存" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport", |
| | | "path" : "pages/ZLGL/OA_WorkLink/OA_WorkLinkBill", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "设备保养任务" |
| | | "navigationBarTitleText" : "工作联系单" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport", |
| | | "path" : "pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "模具保养任务" |
| | | "navigationBarTitleText" : "工作联系单列表" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "设备维修任务" |
| | | } |
| | | }, |
| | | { |
| | | "path" : "pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "器具维修任务" |
| | | } |
| | | } |
| | | |
| | |
| | | "pagePath": "pages/index/tab4", |
| | | "iconPath": "static/tabBar/icon3.png", |
| | | "selectedIconPath": "static/tabBar/icon3-default.png", |
| | | "text": "质量管理" |
| | | "text": "质量管理" |
| | | }, |
| | | { |
| | | "pagePath": "pages/index/tab2", |
| | |
| | | "selectedIconPath": "static/tabBar/user-default.png", |
| | | "text": "我的" |
| | | } |
| | | ] |
| | | }, |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarTitleText": "设备管理", |
| | | "navigationBarBackgroundColor": "#3A78FF", |
| | | "backgroundColor": "#F8F8F8" |
| | | }, |
| | | "uniIdRouter": {}, |
| | | "condition": { //模式配置,仅开发期间生效 |
| | | "current": 0, //当前激活的模式(list 的索引项) |
| | | "list": [{ |
| | | "name": "", //模式名称 |
| | | "path": "", //启动页面,必选 |
| | | "query": "" //启动参数,在页面的onLoad函数里面得到 |
| | | }] |
| | | } |
| | | ] |
| | | }, |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "white", |
| | | "navigationBarTitleText": "设备管理", |
| | | "navigationBarBackgroundColor": "#3A78FF", |
| | | "backgroundColor": "#F8F8F8", |
| | | "pageOrientation": "default" |
| | | }, |
| | | "uniIdRouter": {}, |
| | | "condition": { //模式配置,仅开发期间生效 |
| | | "current": 0, //当前激活的模式(list 的索引项) |
| | | "list": [{ |
| | | "name": "", //模式名称 |
| | | "path": "", //启动页面,必选 |
| | | "query": "" //启动参数,在页面的onLoad函数里面得到 |
| | | }] |
| | | } |
| | | } |
| | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | sWhere: ` and HUSEORGID = ${uni.getStorageSync('OrganizationID')}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | sWhere: ` AND HUSEORGID = ${uni.getStorageSync('OrganizationID')} `, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| | |
| | | message: err |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | }, |
| | | toCheckFile() { |
| | | if (this.hform.HEquipID == 0) { |
| | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | sWhere: ` AND HUSEORGID = ${uni.getStorageSync('OrganizationID')}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | sWhere: ` and HUSEORGID = ${uni.getStorageSync('OrganizationID')}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | sWhere: ` and HUSEORGID = ${uni.getStorageSync('OrganizationID')} `, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="switchTab(0)">待维修</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="switchTab(1)">已维修</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="switchTab(2)">全部任务</view> |
| | | </view> |
| | | |
| | | <!-- 设备维修任务列表列表 --> |
| | | <view class="list" v-for="(item,index) in reportBillsDisplay" :key="index"> |
| | | <uni-card :title="item.故障登记单号" :extra="`日期: ${dayjs(item.设备故障日期).format('YYYY-MM-DD')}`" style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-for="(field, index) in CommonUtils.emptyValueFilter(item, HFieldList)" :key="index"> |
| | | <text>{{field.ColmCols}}:</text>{{item[field.ColmCols]}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="reportBillsDisplay.length == 0">暂无数据</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getUserInfo |
| | | } from '../../../utils/auth'; |
| | | import { |
| | | CommonUtils |
| | | } from '../../../utils/common'; |
| | | import dayjs from 'dayjs'; |
| | | export default { |
| | | // 设备维修任务 模块 |
| | | name: 'Sb_EquipRepairTaskReport', |
| | | data() { |
| | | return { |
| | | dayjs, |
| | | CommonUtils, |
| | | tabs: 0, |
| | | reportBillsDisplay: [], |
| | | reportBillsAwaitRepair: [], // 待维修 |
| | | reportBillsRepaired: [], // 已维修 |
| | | reportBillsAll: [], // 全部任务 |
| | | HFieldList: [], // 字段列表 |
| | | }; |
| | | }, |
| | | methods: { |
| | | switchTab(tabIndex) { |
| | | this.tabs = tabIndex |
| | | switch (tabIndex) { |
| | | case 0: |
| | | this.reportBillsDisplay = this.reportBillsAwaitRepair; |
| | | break; |
| | | case 1: |
| | | this.reportBillsDisplay = this.reportBillsRepaired; |
| | | break; |
| | | case 2: |
| | | this.reportBillsDisplay = this.reportBillsAll; |
| | | break; |
| | | } |
| | | }, |
| | | async getRepairList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: 'Sb_EquipRepairTaskReport/RepairList', |
| | | data: { |
| | | user: getUserInfo()["Czymc"] |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | count, |
| | | data, |
| | | Message, |
| | | list |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | |
| | | this.reportBillsAwaitRepair = data.h_p_Sb_EquipRepairTaskReport |
| | | this.reportBillsRepaired = data.h_p_Sb_EquipRepairTaskReport1 |
| | | this.reportBillsAll = data.h_p_Sb_EquipRepairTaskReport2 |
| | | |
| | | let fieldList = CommonUtils.fieldListFilterRole({ |
| | | ExcludeKeys: ['故障登记单号', '设备故障日期'], |
| | | FieldList: list |
| | | }) |
| | | |
| | | if (fieldList.status == false) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取表单结构失败: ${fieldList.Message}` |
| | | }) |
| | | } |
| | | |
| | | this.HFieldList = fieldList.data |
| | | |
| | | this.switchTab(0) |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取维修单异常: ${Message}` |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取维修单异常: ${err}` |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getRepairList() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | </style> |
| | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | sWhere: ` and HUSEORGID = ${uni.getStorageSync('OrganizationID')}`, |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="switchTab(0)">待维修</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="switchTab(1)">已维修</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="switchTab(2)">全部任务</view> |
| | | </view> |
| | | |
| | | <!-- 设备维修任务列表列表 --> |
| | | <view class="list" v-for="(item,index) in reportBillsDisplay" :key="index"> |
| | | <uni-card :title="item.故障登记单号" :extra="`日期: ${dayjs(item.器具故障日期).format('YYYY-MM-DD')}`" style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-for="(field, index) in CommonUtils.emptyValueFilter(item, HFieldList)" :key="index"> |
| | | <text>{{field.ColmCols}}:</text>{{item[field.ColmCols]}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="reportBillsDisplay.length == 0">暂无数据</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getUserInfo |
| | | } from '../../../utils/auth'; |
| | | import { |
| | | CommonUtils |
| | | } from '../../../utils/common'; |
| | | import dayjs from 'dayjs'; |
| | | export default { |
| | | // 设备维修任务 模块 |
| | | name: 'Sb_EquipRepairTaskReport', |
| | | data() { |
| | | return { |
| | | dayjs, |
| | | CommonUtils, |
| | | tabs: 0, |
| | | reportBillsDisplay: [], |
| | | reportBillsAwaitRepair: [], // 待维修 |
| | | reportBillsRepaired: [], // 已维修 |
| | | reportBillsAll: [], // 全部任务 |
| | | HFieldList: [], // 字段列表 |
| | | }; |
| | | }, |
| | | methods: { |
| | | switchTab(tabIndex) { |
| | | this.tabs = tabIndex |
| | | switch (tabIndex) { |
| | | case 0: |
| | | this.reportBillsDisplay = this.reportBillsAwaitRepair; |
| | | break; |
| | | case 1: |
| | | this.reportBillsDisplay = this.reportBillsRepaired; |
| | | break; |
| | | case 2: |
| | | this.reportBillsDisplay = this.reportBillsAll; |
| | | break; |
| | | } |
| | | }, |
| | | async getRepairList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: 'Sc_MouldRepairTaskReport/RepairList', |
| | | data: { |
| | | user: getUserInfo()["Czymc"] |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | count, |
| | | data, |
| | | Message, |
| | | list |
| | | } = res.data |
| | | if (count == 1) { |
| | | console.log('data: ', data); |
| | | |
| | | this.reportBillsAwaitRepair = data.h_p_Sc_MouldRepairTaskReport |
| | | this.reportBillsRepaired = data.h_p_Sc_MouldRepairTaskReport1 |
| | | this.reportBillsAll = data.h_p_Sc_MouldRepairTaskReport2 |
| | | |
| | | let fieldList = CommonUtils.fieldListFilterRole({ |
| | | ExcludeKeys: ['故障登记单号', '器具故障日期'], |
| | | FieldList: list |
| | | }) |
| | | |
| | | if (fieldList.status == false) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取表单结构失败: ${fieldList.Message}` |
| | | }) |
| | | } |
| | | |
| | | this.HFieldList = fieldList.data |
| | | |
| | | this.switchTab(0) |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取维修单异常: ${Message}` |
| | | }) |
| | | } |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取维修单异常: ${err}` |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getRepairList() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | </style> |
| | |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | </style> |
| | |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/MJGL/style/MJBillStyle.scss" |
| | | </style> |
| | |
| | | import {CommonUtils} from "@/utils/common"; |
| | | import getDateTime from '@/utils/getdateTime.js'; |
| | | import {getUserInfo} from "../../../../utils/auth"; |
| | | import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | </style> |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "../../../../utils/auth"; |
| | | import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | </style> |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "../../../../utils/auth"; |
| | | import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | </style> |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "../../../../utils/auth"; |
| | | import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | </style> |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "../../../../utils/auth"; |
| | | import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss" |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view> |
| | | <!-- <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">明细信息</view> --> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">其他信息</view> |
| | | <!-- <view :class="tabs == 3 ? 'on':''" @tap="tabs = 3">附件信息</view> --> |
| | | </view> |
| | | <!-- 基本信息 --> |
| | | <template v-if="tabs == 0"> |
| | | <view class="form" :style="{ |
| | | height: containerHeight + 'px', |
| | | overflow: 'auto' |
| | | }"> |
| | | <view class="form-item"> |
| | | <view class="title">主题:</view> |
| | | <view class="right"> |
| | | <input type="text" v-model="hform.HContext" placeholder="请输入主题..." /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发送人:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HEmpList" dataKey="HName" dataValue="HName" |
| | | v-model="hform.HSendMan" :filterable="true"> |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">接收人:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HEmpList" dataKey="HName" dataValue="HName" |
| | | v-model="hform.HReceiveMan" :filterable="true"> |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">紧急类型:</view> |
| | | <zxz-uni-data-select class="right" :localdata="[ |
| | | {value: '普通'}, |
| | | {value: '紧急'} |
| | | ]" dataKey="value" dataValue="value" v-model="hform.HLevel"> |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发送类型:</view> |
| | | <zxz-uni-data-select class="right" :localdata="[ |
| | | {value: '公共'}, |
| | | {value: '个人'} |
| | | ]" dataKey="value" dataValue="value" v-model="hform.HSendType"> |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">抄送人:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HEmpList" dataKey="HName" dataValue="HName" |
| | | :filterable="true" |
| | | :multiple="true" placeholder="请选择抄送人..." |
| | | @input="HCopyManChange"> |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HBillNo" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">单据日期:</view> |
| | | <view class="righton"> |
| | | <input disabled v-model="hform.HDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">推荐完成日期:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HCommDate"> |
| | | <input :value="hform.HCommDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">发送部门:</view> |
| | | <zxz-uni-data-select class="right" :localdata="HDeptList" dataKey="部门名称" dataValue="HItemID" |
| | | v-model="hform.HDeptID" :filterable="true"> |
| | | |
| | | </zxz-uni-data-select> |
| | | <!-- <input disabled v-model="hform.HDeptName" placeholder="请选择部门" /> --> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">详细内容:</view> |
| | | <view class="right"> |
| | | <textarea v-model="hform.HDescription" placeholder="请输入详细内容" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">备注:</view> |
| | | <view class="right"> |
| | | <textarea v-model="hform.HRemark" placeholder="请输入备注" /> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </template> |
| | | <!-- 其他信息 --> |
| | | <template v-if="tabs == 2"> |
| | | <view class="form" :style="{ |
| | | height: containerHeight + 'px', |
| | | overflow: 'auto' |
| | | }"> |
| | | <view class="form-item"> |
| | | <view class="title">创建人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMaker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">创建日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HMakeDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDater" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">修改日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HUpDateDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HChecker" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">审核时间:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HCheckDate" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废人:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteMan" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">作废日期:</view> |
| | | <view class="righton"> |
| | | <input v-model="hform.HDeleteDate" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </template> |
| | | <!-- 操作按钮 --> |
| | | <view class="buttons" id="buttons"> |
| | | <button class="btn-a" size="mini" @tap="submit">提交</button> |
| | | <view style="flex: 1;"></view> |
| | | <button class="btn-a" size="mini" @tap="addNew">新增</button> |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common"; |
| | | import { |
| | | MpaasScan |
| | | } from "@/utils/mpaasScan.js" |
| | | import { |
| | | getUserInfo |
| | | } from "../../../utils/auth"; |
| | | import { |
| | | getEmpList |
| | | } from "@/utils/BasicInfo.js" |
| | | export default { |
| | | name: 'OA_WorkLinkBill', |
| | | data() { |
| | | return { |
| | | tabs: 0, |
| | | HMainSourceBillType: "", |
| | | btnTop: 0, |
| | | tabsBottom: 0, |
| | | HModName: "OA_WorkLinkBill", |
| | | HBillType: '4501', |
| | | operationType: 1, |
| | | refSav: 'Add', // 执行提交的操作类型,与operationType类似 |
| | | enableEdit: true, |
| | | uploadOptions: {}, |
| | | |
| | | HEmpList: [], |
| | | HDeptList: [], |
| | | HShiftsList: [], |
| | | HCheckFileList: [], |
| | | attachmentInfo: [], |
| | | |
| | | hform: { |
| | | HBarCode: "", |
| | | HBillNo: "", |
| | | HInterID: "", |
| | | HEntryID: "", |
| | | HDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HContext: "", |
| | | HSendMan: getUserInfo()["HEmpName"], |
| | | HReceiveMan: "", |
| | | HLevel: "普通", |
| | | HSendType: "公共", |
| | | HCopyMan: "", |
| | | HDescription: "", |
| | | HRemark: "", |
| | | HCommDate: "", |
| | | HEvaluateStatusName: "", |
| | | HEvaluateStatusID: "0", |
| | | HRelationBillNo: "", |
| | | HRelationInterID: "0", |
| | | HRelationEntryID: "0", |
| | | HRelationBillType: "", |
| | | HDeptName: "", |
| | | HDeptID: "0", |
| | | HHasten: "0", |
| | | HMaker: getUserInfo()['Czymc'], |
| | | HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | HUpDater: "", |
| | | HUpDateDate: "", |
| | | HChecker: "", |
| | | HCheckDate: "", |
| | | HDeleteMan: "", |
| | | HDeleteDate: "", |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | containerHeight: { |
| | | get() { |
| | | return this.btnTop - this.tabsBottom - 5 |
| | | } |
| | | }, |
| | | calcHLastResult: { |
| | | get() { |
| | | if (this.HCheckFileList.length == 0) { |
| | | return 'OK' |
| | | } else { |
| | | let okCount = this.HCheckFileList.reduce((acc, item) => { |
| | | if (item.HMaintainResult) { |
| | | return acc + 1 |
| | | } |
| | | return acc |
| | | }, 0) |
| | | if (okCount == this.HCheckFileList.length) { |
| | | return 'OK' |
| | | } |
| | | return 'NG' |
| | | } |
| | | } |
| | | } |
| | | |
| | | }, |
| | | methods: { |
| | | // 抄送人修改 |
| | | HCopyManChange(e) { |
| | | this.hform.HCopyMan = e.join(',') |
| | | }, |
| | | ValidCheck() { |
| | | if (this.hform.HContext == "") { |
| | | return { |
| | | Message: "未录入主题,请先录入主题!", |
| | | state: false |
| | | } |
| | | } |
| | | if (this.hform.HSendMan == "") { |
| | | return { |
| | | Message: "未录入主题,请先录入主题!", |
| | | state: false |
| | | } |
| | | } |
| | | if (this.hform.HReceiveMan == "") { |
| | | return { |
| | | Message: "未选择接收人,请先选择接收人!", |
| | | state: false |
| | | } |
| | | } |
| | | if (this.hform.HDeptID == 0) { |
| | | return { |
| | | Message: "未选择发送部门,请先选择发送部门", |
| | | state: false |
| | | } |
| | | } |
| | | |
| | | return { |
| | | Message: "", |
| | | state: true |
| | | } |
| | | }, |
| | | addNew() { |
| | | uni.redirectTo({ |
| | | url: './OA_WorkLinkBill?operationType=1' |
| | | }) |
| | | }, |
| | | goBack() { |
| | | uni.navigateBack() |
| | | }, |
| | | //获取使用部门数据 |
| | | async getHDeptList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Gy_Department/list', |
| | | data: { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | this.HDeptList = data |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | } |
| | | }, |
| | | async getMaxNum() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/Web/GetMAXNum", |
| | | data: { |
| | | "HBillType": this.HBillType |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | count, |
| | | data, |
| | | Message |
| | | } = res.data |
| | | console.log('data: ', data); |
| | | this.hform.HInterID = 0 |
| | | this.hform.HBillNo = data[0]["HBillNo"] |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "获取单据信息异常: " + err |
| | | }) |
| | | } |
| | | }, |
| | | async submit() { |
| | | let valid = this.ValidCheck() |
| | | if (!valid.state) { |
| | | return CommonUtils.showTips({ |
| | | message: valid.Message |
| | | }) |
| | | } |
| | | |
| | | try { |
| | | let oMain = JSON.stringify(this.hform); |
| | | let sMainSub = oMain + ';' + getUserInfo()['Czymc'] + ';' + this.refSav; |
| | | let res = await CommonUtils.doRequest2Sync({ |
| | | url: "/Sc_MESTransFerWorkBill/SaveOA_WorkLinkBill", |
| | | data: { |
| | | "msg": sMainSub |
| | | }, |
| | | method: "POST" |
| | | }) |
| | | |
| | | if (!res) { |
| | | return |
| | | } |
| | | |
| | | let { |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: res.data.Message + '。是否继续新增?(点击取消返回上级页面)', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.redirectTo({ |
| | | url: './OA_WorkLinkBill?operationType=1' |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | setTimeout(() => { |
| | | uni.navigateBack(); |
| | | }, 50) |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "提交单据失败: " + Message |
| | | }) |
| | | } |
| | | |
| | | |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: "提交单据失败: " + err |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | async onLoad(e) { |
| | | console.log('e: ', e); |
| | | if (!e.operationType) { |
| | | this.operationType = 1 |
| | | } else { |
| | | this.operationType = e.operationType |
| | | } |
| | | |
| | | if (this.operationType == 1) { |
| | | // 新增 |
| | | this.getMaxNum() |
| | | } else if (this.operationType == 2) { |
| | | // 复制 |
| | | } else if (this.operationType == 3) { |
| | | // 编辑 |
| | | |
| | | } else if (this.operationType == 4) { |
| | | // 浏览 |
| | | |
| | | } |
| | | |
| | | this.getHDeptList() |
| | | try { |
| | | this.HEmpList = await getEmpList() |
| | | } catch (err) { |
| | | |
| | | } |
| | | |
| | | }, |
| | | onReady() { |
| | | const query = uni.createSelectorQuery().in(this) |
| | | query.select("#buttons") |
| | | .boundingClientRect() |
| | | .select("#tabs") |
| | | .boundingClientRect() |
| | | .exec(res => { |
| | | this.btnTop = Math.floor(res[0].top) |
| | | this.tabsBottom = Math.ceil(res[1].bottom) |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/pages/ZLGL/style/MJBillStyle.scss" |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="title">开始时间:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate"> |
| | | <input :value="hform.HBeginDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">结束时间:</view> |
| | | <view class="right"> |
| | | <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate"> |
| | | <input :value="hform.HEndDate" /> |
| | | </uni-datetime-picker> |
| | | </view> |
| | | </view> |
| | | <view v-if="showmore"> |
| | | <view class="form-item"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right"> |
| | | <input v-model="hform.HBillNo" placeholder="请输入单据号" /> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="other"> |
| | | <view v-if="!showmore" @tap="changeShowMore"> |
| | | 展开其他条件<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons> |
| | | </view> |
| | | <view v-if="showmore" @tap="changeShowMore"> |
| | | 折叠其他条件<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="buttons"> |
| | | <button class="btn-a" size="mini" type="default" @tap="clear">重置</button> |
| | | <button class="btn-b" size="mini" type="default" @tap="add">新增</button> |
| | | <button class="btn-c" size="mini" type="default" @tap="search">查询</button> |
| | | </view> |
| | | </view> |
| | | |
| | | <view id="divide" style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> |
| | | <view :style="{ |
| | | height: calcContentHeight + 'px', |
| | | overflowY: 'auto' |
| | | }"> |
| | | <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0"> |
| | | <uni-card :title="item.制单日期.substr(0,10)" :extra="item.单据号" style="margin: 10px;" |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.主题"> |
| | | <text>主题:</text>{{item.主题}} |
| | | </view> |
| | | <view class="detail" v-if="item.紧急程度"> |
| | | <text>紧急程度:</text>{{item.紧急程度}} |
| | | </view> |
| | | <view class="detail" v-if="item.发送类型"> |
| | | <text>发送类型:</text>{{item.发送类型}} |
| | | </view> |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | | </view> |
| | | <view class="detail" v-if="item.阅读状态"> |
| | | <text>阅读状态:</text>{{item.阅读状态}} |
| | | </view> |
| | | <view class="detail" v-if="item.发送部门"> |
| | | <text>发送部门:</text>{{item.发送部门}} |
| | | </view> |
| | | <view class="detail" v-if="item.发送人"> |
| | | <text>发送人:</text>{{item.发送人}} |
| | | </view> |
| | | <view class="detail" v-if="item.接收人"> |
| | | <text>接收人:</text>{{item.接收人}} |
| | | </view> |
| | | <view class="detail" v-if="item.抄送接收人"> |
| | | <text>抄送接收人:</text>{{item.抄送接收人}} |
| | | </view> |
| | | <view class="detail" v-if="item.所有抄送人"> |
| | | <text>所有抄送人:</text>{{item.所有抄送人}} |
| | | </view> |
| | | <view class="card-detail" v-if="showDetail == index"> |
| | | <view class="detail" v-if="item.内容"> |
| | | <text>内容:</text>{{item.内容}} |
| | | </view> |
| | | <view class="detail" v-if="item.表头备注"> |
| | | <text>表头备注:</text>{{item.表头备注}} |
| | | </view> |
| | | <view class="detail" v-if="item.建议完成日期"> |
| | | <text>建议完成日期:</text>{{dayjs(item.建议完成日期).format("YYYY-MM-DD HH:mm:DD")}} |
| | | </view> |
| | | <view class="detail" v-if="item.催促次数"> |
| | | <text>催促次数:</text>{{item.催促次数}} |
| | | </view> |
| | | <view class="detail" v-if="item.hmainid"> |
| | | <text>内部单据号:</text>{{item.hmainid}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="more" v-if="showDetail == index && operations != index"> |
| | | <view class="part" style="border-right: 1px solid #eee;"> |
| | | <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>收起 |
| | | </view> |
| | | <view class="part" @tap.stop="operations = operations==index?-1:index"> |
| | | <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>操作 |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="showDetail != index && operations != index"> |
| | | <view class="part" style="border-right: 1px solid #eee;"> |
| | | <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息 |
| | | </view> |
| | | <view class="part" @tap.stop="operations = operations==index?-1:index"> |
| | | <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>操作 |
| | | </view> |
| | | </view> |
| | | <view class="op" v-if="operations == index"> |
| | | <!-- <button class="op3" size="mini" plain @tap.stop="edit(item)">编辑</button> --> |
| | | <!-- <button class="op4" size="mini" plain @tap.stop="del(item)">删除</button> --> |
| | | <button class="op5" size="mini" plain @tap.stop="operations = -1">取消操作</button> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | </view> |
| | | <view class="pagination-zone" id="pagination-zone"> |
| | | <uni-pagination show-icon :page-size="size" :total="dataLength" :current="page" |
| | | @change="onPaginationChangeHandler"></uni-pagination> |
| | | </view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import BarCodePopupVue from "@/components/BarCodePopup/BarCodePopup.vue"; |
| | | import { |
| | | CommonUtils |
| | | } from "../../../utils/common"; |
| | | import dayjs from "dayjs"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | dayjs, |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | tabs: 0, |
| | | urls: '/Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListPage', |
| | | MvarReportTitle: '设备维修派工单缓存', |
| | | hform: { |
| | | HBillNo: '', |
| | | HSourceBillNo: '', |
| | | HBillType: 3909, |
| | | user: uni.getStorageSync('HUserName'), |
| | | HStockOrgID: uni.getStorageSync('OrganizationID'), |
| | | sWhere: "", |
| | | HBeginDate: dayjs(new Date()).subtract(30, 'day').format("YYYY-MM-DD"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | }, |
| | | sWhere: '', |
| | | listData: [], |
| | | showList: [], |
| | | showDetail: -1, |
| | | operations: -1, |
| | | |
| | | page: 1, |
| | | size: 20, |
| | | dataLength: 0, |
| | | divideBottom: 0, |
| | | paginationTop: 0, |
| | | showmore: false, |
| | | } |
| | | }, |
| | | computed: { |
| | | calcContentHeight: { |
| | | get() { |
| | | return this.paginationTop - this.divideBottom |
| | | } |
| | | } |
| | | }, |
| | | onShow() { |
| | | //用户模块权限判断 |
| | | this.CheckModRight() |
| | | this.changeTab(0) |
| | | console.log(this.userInfo, uni.getStorageSync('HUserName')) |
| | | }, |
| | | components: { |
| | | BarCodePopupVue |
| | | }, |
| | | onPullDownRefresh: function() { |
| | | this.clear() |
| | | setTimeout(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }, 1000); |
| | | }, |
| | | onReady() { |
| | | this.getCalcHeight() |
| | | }, |
| | | methods: { |
| | | changeShowMore() { |
| | | this.showmore = !this.showmore |
| | | this.$nextTick(() => { |
| | | // 重新计算内容视口高度 |
| | | this.getCalcHeight() |
| | | }) |
| | | }, |
| | | getCalcHeight() { |
| | | let query = uni.createSelectorQuery().in(this) |
| | | query |
| | | .select("#divide") |
| | | .boundingClientRect() |
| | | .select("#pagination-zone") |
| | | .boundingClientRect() |
| | | .exec(res => { |
| | | this.divideBottom = Math.ceil(res[0].bottom) |
| | | this.paginationTop = Math.floor(res[1].top) |
| | | }) |
| | | }, |
| | | async qrCodeDisplay(item) { |
| | | this.$refs.barcodePopup.setCodeInfo(item.HBillNo) |
| | | await this.$nextTick() |
| | | this.$refs.barcodePopup.open() |
| | | }, |
| | | CheckModRight() { |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/CheckModRight_Json', |
| | | data: { |
| | | ModRightName: 'CE_OtherOut', |
| | | HUserName: uni.getStorageSync('HUserName') |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) {} else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | onPaginationChangeHandler({ |
| | | current |
| | | }) { |
| | | this.page = current |
| | | // this.showList = this.getPage(current, this.size, this.listData) |
| | | this.getList() |
| | | }, |
| | | getPage(page, size, list) { |
| | | let sindex = (parseInt(page) - 1) * size |
| | | let eindex = parseInt(page) * size |
| | | let newList = list.slice(sindex, eindex) |
| | | return newList |
| | | }, |
| | | changeTab(e) { |
| | | this.tabs = e |
| | | this.page = 1 |
| | | this.showList = [] |
| | | |
| | | if (this.tabs == 0) { |
| | | this.urls = '/Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListPage' |
| | | } |
| | | // if (this.tabs == 1) { |
| | | // this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json' |
| | | // } |
| | | this.search() |
| | | }, |
| | | async getList() { |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: this.urls, |
| | | data: { |
| | | sWhere: this.hform.sWhere, |
| | | user: this.hform.user, |
| | | page: this.page, |
| | | size: this.size |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | count, |
| | | data, |
| | | Message |
| | | } = res.data |
| | | |
| | | if (count > 0) { |
| | | if (data == null) { |
| | | data = [] |
| | | } |
| | | this.listData = data |
| | | console.log('data: ', data); |
| | | this.showList = data |
| | | this.dataLength = count |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取设备点检记录单失败: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: "温馨提示", |
| | | message: `获取设备点检记录单失败: ${err}` |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | search() { |
| | | this.hform.sWhere = '' |
| | | this.listData = [] |
| | | this.page = 1 |
| | | this.showList = [] |
| | | |
| | | console.log(this.hform) |
| | | if (this.hform.HBillNo) { |
| | | this.hform.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"; |
| | | } |
| | | if (this.hform.HBeginDate && this.hform.HEndDate) { |
| | | this.hform.sWhere += |
| | | ` and convert(date,日期) between convert(date, '${this.hform.HBeginDate}') and convert(date, '${this.hform.HEndDate}')`; |
| | | } |
| | | this.getList() |
| | | }, |
| | | clear() { |
| | | this.listData = [] |
| | | this.page = 1 |
| | | this.showList = [] |
| | | |
| | | this.sWhere = '' |
| | | this.hform = { |
| | | HBillNo: '', |
| | | HSourceBillNo: '', |
| | | HBillType: 3909, |
| | | user: uni.getStorageSync('HUserName'), |
| | | HStockOrgID: uni.getStorageSync('OrganizationID'), |
| | | sWhere: "", |
| | | HBeginDate: dayjs(new Date()).subtract(30, 'day').format("YYYY-MM-DD"), |
| | | HEndDate: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | } |
| | | this.search() |
| | | }, |
| | | add() { |
| | | uni.navigateTo({ |
| | | url: '/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill?operationType=1' |
| | | }) |
| | | }, |
| | | //编辑 |
| | | edit(item) { |
| | | console.log(item) |
| | | uni.request({ |
| | | url: this.serverUrl + '/WEBSController/TempList_Modify_Json', |
| | | data: { |
| | | "HInterID": item.HInterID, |
| | | "HBillNo": item.单据号, |
| | | "HBillType": this.hform.HBillType |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | uni.navigateTo({ |
| | | url: './OtherOutBill?OperationType=2&HInterID=' + item.HInterID |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }) |
| | | }, |
| | | //删除 |
| | | del(item) { |
| | | // console.log(item.hmainid,uni.getStorageSync('HUserName')) |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除记录?删除后不能恢复', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.request({ |
| | | url: this.serverUrl + |
| | | '/Sb_EquipRepairSendWorkBill/DeleteWorkBill', |
| | | data: { |
| | | HInterID: item.hmainid, |
| | | user: uni.getStorageSync('HUserName'), |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | this.clear() |
| | | } |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | //撤销 |
| | | revoke(item) { |
| | | // console.log(item.hmainid,uni.getStorageSync('HUserName')) |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '是否确认撤销', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.request({ |
| | | url: this.serverUrl + |
| | | '/WEBSController/set_DeleteICStockBillAndWMS_Json', |
| | | data: { |
| | | HInterID: item.HInterID, |
| | | HBillNo: item.单据号, |
| | | HBillType: this.hform.HBillType, |
| | | HMaker: uni.getStorageSync('HUserName'), |
| | | MvarReportTitle: this.MvarReportTitle, |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | this.clear() |
| | | } |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/pages/ZLGL/style/MJListStyle.scss" |
| | | </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, |
| New file |
| | |
| | | .buttons { |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | height: 120rpx; |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | background-color: #fff; |
| | | box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4); |
| | | padding: 30rpx 40rpx 40rpx 40rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 10rpx; |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | .btn-a { |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | .btn-b { |
| | | background-color: #41a863; |
| | | color: #fff; |
| | | } |
| | | .btn-c { |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | // position: absolute; |
| | | // right: 120rpx; |
| | | } |
| | | .btn-d { |
| | | background-color: #ff8901; |
| | | color: #fff; |
| | | } |
| | | .placeholder-view { |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | .tabs { |
| | | width: 100%; |
| | | display: flex; |
| | | border-bottom: 1px solid #ddd; |
| | | |
| | | view { |
| | | width: 25%; |
| | | font-size: 30rpx; |
| | | color: #555; |
| | | text-align: center; |
| | | padding: 16rpx 0; |
| | | } |
| | | |
| | | .on { |
| | | color: #3a78ff; |
| | | font-weight: bold; |
| | | border-bottom: 3px solid #3a78ff; |
| | | } |
| | | } |
| | | |
| | | .form { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 10rpx; |
| | | box-sizing: border-box; |
| | | padding: 20rpx 40rpx; |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 30rpx; |
| | | padding: 6rpx 0; |
| | | gap: 12rpx; |
| | | |
| | | .title { |
| | | width: 208rpx; |
| | | flex-shrink: 0; |
| | | |
| | | text { |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .required::after{ |
| | | content: "*"; |
| | | color: red; |
| | | margin-left: 4px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .right { |
| | | // width: 450rpx; |
| | | flex: 1; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | position: relative; |
| | | display: flex; |
| | | |
| | | picker { |
| | | width: 100%; |
| | | } |
| | | |
| | | .uni-combox { |
| | | width: 100% |
| | | } |
| | | } |
| | | |
| | | .righton { |
| | | width: 450rpx; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | } |
| | | |
| | | input { |
| | | width: 100%; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | textarea { |
| | | width: 98%; |
| | | height: 6em; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | |
| | | .icon-wrapper { |
| | | background-color: #3A78FF; |
| | | width: 52rpx; |
| | | height: 52rpx; |
| | | border-radius: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-shrink: 0; |
| | | |
| | | .uni-icons { |
| | | color: #fff !important; |
| | | } |
| | | } |
| | | |
| | | .icon-wrapper[disabled] { |
| | | background-color: rgba(228, 228, 228, 1); |
| | | pointer-events: none; |
| | | touch-action: none; |
| | | } |
| | | |
| | | } |
| | | |
| | | .none-border { |
| | | border: none !important; |
| | | } |
| | | |
| | | .radio_Container { |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 30rpx; |
| | | } |
| | | |
| | | .list { |
| | | width: 100%; |
| | | |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .card-item-wrapper { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | box-sizing: border-box; |
| | | padding: 20rpx 20rpx; |
| | | |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | |
| | | .operation { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 10rpx; |
| | | |
| | | .btn-a { |
| | | background-color: #3A78FF; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-b { |
| | | background-color: rgb(255, 87, 34); |
| | | color: #fff; |
| | | } |
| | | |
| | | uni-button {} |
| | | } |
| | | |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .attachment-btns { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: flex-start; |
| | | gap: 6rpx; |
| | | |
| | | } |
| | | |
| | | .card-buttons { |
| | | padding: 8rpx; |
| | | display: flex; |
| | | flex-direction: row; |
| | | gap: 20rpx; |
| | | justify-content: center; |
| | | align-items: flex-start; |
| | | |
| | | button { |
| | | border-radius: 10rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | .btn-a { |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | .btn-b { |
| | | background-color: #41a863; |
| | | color: #fff; |
| | | } |
| | | .btn-c { |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | // position: absolute; |
| | | // right: 120rpx; |
| | | } |
| | | .btn-d { |
| | | background-color: #ff8901; |
| | | color: #fff; |
| | | } |
| | | |
| | | .placeholder { |
| | | flex: 1 |
| | | } |
| | | } |
| New file |
| | |
| | | .form { |
| | | padding: 20rpx; |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | } |
| | | |
| | | .other { |
| | | margin-top: 8rpx; |
| | | text-align: center; |
| | | font-size: 28rpx; |
| | | padding: 4rpx 18rpx; |
| | | color: #1890FF; |
| | | } |
| | | |
| | | .tabs { |
| | | width: 100%; |
| | | position: fixed; |
| | | left: 0; |
| | | z-index: 9; |
| | | display: flex; |
| | | background-color: #e5e5e5; |
| | | |
| | | view { |
| | | width: 50%; |
| | | font-size: 30rpx; |
| | | color: #333; |
| | | text-align: center; |
| | | padding: 16rpx 0; |
| | | } |
| | | |
| | | .on { |
| | | color: #3a78ff; |
| | | font-weight: bold; |
| | | border-bottom: 3px solid #3a78ff; |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: 20rpx; |
| | | |
| | | button { |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-b { |
| | | background-color: #41a863; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c { |
| | | background-color: #3a78ff; |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .form-item { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | padding: 6rpx 0; |
| | | |
| | | .title { |
| | | width: 180rpx; |
| | | |
| | | text { |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | width: 450rpx; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | } |
| | | |
| | | .righton { |
| | | width: 450rpx; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | } |
| | | |
| | | input { |
| | | width: 100%; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | width: 100%; |
| | | |
| | | .card-detail { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | color: #555; |
| | | padding-bottom: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .more { |
| | | color: #888; |
| | | font-size: 26rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | |
| | | .op { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-top: 20rpx; |
| | | |
| | | button { |
| | | padding: 0; |
| | | width: 150rpx; |
| | | font-size: 25rpx; |
| | | } |
| | | |
| | | .op1 { |
| | | border: 1px solid #41a863; |
| | | color: #41a863; |
| | | } |
| | | |
| | | .op2 { |
| | | border: 1px solid #d98d00; |
| | | color: #d98d00; |
| | | } |
| | | |
| | | .op3 { |
| | | border: 1px solid #3a78ff; |
| | | color: #3a78ff; |
| | | } |
| | | |
| | | .op4 { |
| | | border: 1px solid #da0000; |
| | | color: #da0000; |
| | | } |
| | | |
| | | .op5 { |
| | | border: 1px solid #888; |
| | | color: #888; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .pagination-zone { |
| | | position: fixed; |
| | | bottom: 0; |
| | | box-sizing: border-box; |
| | | background-color: #fff; |
| | | box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4); |
| | | padding: 20rpx 40rpx 20rpx 40rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20rpx; |
| | | justify-content: space-between; |
| | | width: 100%; |
| | | } |
| | |
| | | </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"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | import { |
| | | CommonUtils |
| | | } from "../../utils/common"; |
| | | import { getLanguagePackJson } from "../../utils/i18n"; |
| | | import { getLanguagePackJson } from "../../utils/i18n"; |
| | | import WebSocketServices from "@/utils/WebSocketServices"; |
| | | export default { |
| | | components: { |
| | | hFormAlert |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | WebSocketServices, |
| | | CommonUtils, |
| | | arrayDataBases: [], |
| | | DataBases: '', |
| | |
| | | "杭州凯贝奈特外网": '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/', |
| | | "陈镐哲本地测试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/", |
| | | "宁波华舟包装-外网": "http://61.164.64.222:8082/API/", |
| | | }, |
| | | serverUrlName:uni.getStorageSync('serverUrlName') || '浙江智云迈思', |
| | | |
| | |
| | | uni.setStorageSync('HSecManagerID', res.data.data[0].HSecManagerID); //对应验收 |
| | | uni.setStorageSync('HSecManagerName', res.data.data[0].HSecManagerName); |
| | | this.CommonUtils.setServerUrl(this.serverUrl) |
| | | // console.log('this.WebSocsketServices: ',this.WebSocsketServices); |
| | | // this.WebSocketServices.createConnect(res.data.data[0].Czybm,res.data.data[0].Czymc); |
| | | uni.reLaunch({ |
| | | url: '/pages/index/index' |
| | | }) |
| | |
| | | <template> |
| | | <view class="content"> |
| | | <view class="header"> |
| | | <view class="switch-button"> |
| | | <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="mains"> |
| | | <view v-if="!canEdit" :hidden="item.hidden||!item.id" class="box" v-for="(item,index) in itemData" |
| | | :key="index" @tap="toUrl(item)"> |
| | | <image :src="item.img" mode=""></image> |
| | | <view class="texts"> |
| | | {{item.text}} |
| | | </view> |
| | | </view> |
| | | <view :enable-hidden="item.hidden" :hidden="!item.id" v-if="canEdit" class="box edit" |
| | | v-for="(item,index) in itemData" :key="index" @tap="switchHidden(index)"> |
| | | <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons> |
| | | <image :src="item.img" mode=""></image> |
| | | <view class="texts"> |
| | | {{item.text}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="content"> |
| | | <view class="header"> |
| | | <view class="switch-button"> |
| | | <uni-icons type="loop" @click="switchIconsModeHandler"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="mains"> |
| | | <view v-if="!canEdit" :hidden="item.hidden||!item.id" class="box" v-for="(item,index) in itemData" |
| | | :key="index" @tap="toUrl(item)"> |
| | | <image :src="item.img" mode=""></image> |
| | | <view class="texts"> |
| | | {{item.text}} |
| | | </view> |
| | | </view> |
| | | <view :enable-hidden="item.hidden" :hidden="!item.id" v-if="canEdit" class="box edit" |
| | | v-for="(item,index) in itemData" :key="index" @tap="switchHidden(index)"> |
| | | <uni-icons class="edit-mark" color="red" type="closeempty"></uni-icons> |
| | | <image :src="item.img" mode=""></image> |
| | | <view class="texts"> |
| | | {{item.text}} |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common' |
| | | import { |
| | | getMenuList, |
| | | setMenuList |
| | | } from '../../utils/menuListApp' |
| | | import { |
| | | getUserInfo |
| | | } from '../../utils/auth' |
| | | export default { |
| | | data() { |
| | | return { |
| | | updateCount: 0, |
| | | menuListName: 'tab3', |
| | | canEdit: false, |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | itemData: [{ |
| | | img: '../../static/icon/icon6.png', |
| | | text: '模具状态分析', |
| | | tip: '查看详情', |
| | | url: '/pages/mujvzhuangtai/mujvzhuangtai', |
| | | id: 1, |
| | | hidden: false, |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common' |
| | | import { |
| | | getMenuList, |
| | | setMenuList |
| | | } from '../../utils/menuListApp' |
| | | import { |
| | | getUserInfo |
| | | } from '../../utils/auth' |
| | | export default { |
| | | data() { |
| | | return { |
| | | updateCount: 0, |
| | | menuListName: 'tab3', |
| | | canEdit: false, |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | itemData: [{ |
| | | img: '../../static/icon/icon6.png', |
| | | text: '模具状态分析', |
| | | tip: '查看详情', |
| | | url: '/pages/mujvzhuangtai/mujvzhuangtai', |
| | | id: 1, |
| | | hidden: false, |
| | | |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '模具档案查询', |
| | | url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`, |
| | | id: 2, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon16.png', |
| | | text: '模具寿命', |
| | | url: '/pages/shoujishouming/table', |
| | | id: 3, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具故障登记单", |
| | | "url": "/pages/qijvguzhangdengji/mouldMistakeBill?operationType=1", |
| | | "id": 4, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具维修派工单", |
| | | "url": "/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill", |
| | | "id": 5, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具维修记录单", |
| | | "url": "/pages/weixiujilu/mouldRepairRecordBill", |
| | | "id": 6, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具维修验收单", |
| | | "url": "/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill", |
| | | "id": 7, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具点检记录单", |
| | | "url": "/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill", |
| | | "id": 8, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具保养记录单", |
| | | "url": "/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill", |
| | | "id": 9, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用出库单", |
| | | "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBill", |
| | | "id": 10, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用退库单", |
| | | "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill", |
| | | "id": 11, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '上模单', |
| | | url: `/pages/MJGL/shangmudan/MouldUpperBill`, |
| | | id: 12, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '下模单', |
| | | url: `/pages/MJGL/xiamodan/MouldLowerBill`, |
| | | id: 13, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具报废出库单", |
| | | "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill", |
| | | "id": 14, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon1.png', |
| | | text: '设备档案查询', |
| | | tip: '查看详情', |
| | | url: '/pages/shebeidangan/Gy_EquipFileMainBillList', |
| | | id: 15, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '设备履历查询', |
| | | tip: '查看详情', |
| | | url: '/pages/shebeilvli/EquipFileBillResume', |
| | | id: 16, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon32.png', |
| | | text: '设备运行状态', |
| | | tip: '查看详情', |
| | | url: '/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai', |
| | | id: 17, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备点检记录单", |
| | | "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill", |
| | | "id": 18, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备保养记录单", |
| | | "url": "/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill", |
| | | "id": 19, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修派工单", |
| | | "url": "/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill", |
| | | "id": 21, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修验收单", |
| | | "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill", |
| | | "id": 23, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备保养任务", |
| | | "url": "/pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport", |
| | | "id": 24, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具保养任务", |
| | | "url": "/pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport", |
| | | "id": 25, |
| | | "hidden": false |
| | | }, |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getHiddenItem() |
| | | }, |
| | | methods: { |
| | | judgeHidden() { |
| | | return process.env.NODE_ENV === 'development' |
| | | }, |
| | | async getHiddenItem() { |
| | | let data = await getMenuList({ |
| | | menuName: this.menuListName |
| | | }) |
| | | Array.from(data).forEach(e => { |
| | | this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"]) |
| | | this.itemData[e["HIndex"]].id = e["HEntryID"]; //id为0强制隐藏 |
| | | }) |
| | | }, |
| | | switchHidden(index) { |
| | | this.updateCount++; |
| | | this.itemData[index].hidden = !this.itemData[index].hidden |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '模具档案查询', |
| | | url: `/pages/MJGL/Gy_MouldFile/Gy_MouldFileList`, |
| | | id: 2, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon16.png', |
| | | text: '模具寿命', |
| | | url: '/pages/shoujishouming/table', |
| | | id: 3, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具故障登记单", |
| | | "url": "/pages/qijvguzhangdengji/mouldMistakeBill?operationType=1", |
| | | "id": 4, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具维修派工单", |
| | | "url": "/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill", |
| | | "id": 5, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon13.png", |
| | | "text": "模具维修记录单", |
| | | "url": "/pages/weixiujilu/mouldRepairRecordBill", |
| | | "id": 6, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具维修验收单", |
| | | "url": "/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill", |
| | | "id": 7, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具点检记录单", |
| | | "url": "/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill", |
| | | "id": 8, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具保养记录单", |
| | | "url": "/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill", |
| | | "id": 9, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用出库单", |
| | | "url": "/pages/MJGL/mujulingliaochukudan/MouldProdOutBill", |
| | | "id": 10, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具领用退库单", |
| | | "url": "/pages/MJGL/mujulingliaotuikudan/Sc_MouldProdBackBill", |
| | | "id": 11, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '上模单', |
| | | url: `/pages/MJGL/shangmudan/MouldUpperBill`, |
| | | id: 12, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '下模单', |
| | | url: `/pages/MJGL/xiamodan/MouldLowerBill`, |
| | | id: 13, |
| | | hidden: false, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具报废出库单", |
| | | "url": "/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill", |
| | | "id": 14, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon1.png', |
| | | text: '设备档案查询', |
| | | tip: '查看详情', |
| | | url: '/pages/shebeidangan/Gy_EquipFileMainBillList', |
| | | id: 15, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon8.png', |
| | | text: '设备履历查询', |
| | | tip: '查看详情', |
| | | url: '/pages/shebeilvli/EquipFileBillResume', |
| | | id: 16, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | img: '../../static/icon/icon32.png', |
| | | text: '设备运行状态', |
| | | tip: '查看详情', |
| | | url: '/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai', |
| | | id: 17, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备点检记录单", |
| | | "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill", |
| | | "id": 18, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备保养记录单", |
| | | "url": "/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill", |
| | | "id": 19, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修派工单", |
| | | "url": "/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill", |
| | | "id": 21, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修验收单", |
| | | "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill", |
| | | "id": 23, |
| | | "hidden": false |
| | | }, { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具维修派工单", |
| | | "url": "/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill", |
| | | "id": 29, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具维修验收单", |
| | | "url": "/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill", |
| | | "id": 30, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备保养任务", |
| | | "url": "/pages/MJGL/SBMJReport/Sb_EquipMaintainTaskReport", |
| | | "id": 24, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "模具保养任务", |
| | | "url": "/pages/MJGL/SBMJReport/Sc_MouldMaintainTaskReport", |
| | | "id": 25, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "设备维修任务", |
| | | "url": "/pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport", |
| | | "id": 26, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon8.png", |
| | | "text": "器具维修任务", |
| | | "url": "/pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport", |
| | | "id": 27, |
| | | "hidden": false |
| | | }, |
| | | ] |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.getHiddenItem() |
| | | }, |
| | | methods: { |
| | | judgeHidden() { |
| | | return process.env.NODE_ENV === 'development' |
| | | }, |
| | | async getHiddenItem() { |
| | | let data = await getMenuList({ |
| | | menuName: this.menuListName |
| | | }) |
| | | Array.from(data).forEach(e => { |
| | | this.itemData[e["HIndex"]].hidden = !CommonUtils.stringToBoolean(e["HShowMode"]) |
| | | this.itemData[e["HIndex"]].id = e["HEntryID"]; //id为0强制隐藏 |
| | | }) |
| | | }, |
| | | switchHidden(index) { |
| | | this.updateCount++; |
| | | this.itemData[index].hidden = !this.itemData[index].hidden |
| | | |
| | | }, |
| | | switchIconsModeHandler() { |
| | | this.canEdit = !this.canEdit |
| | | if (this.canEdit == false && this.updateCount > 0) { |
| | | this.$nextTick(() => { |
| | | // uni.setStorageSync("HIndexItemData", this.itemData) |
| | | setMenuList({ |
| | | menuName: this.menuListName, |
| | | payload: this.itemData |
| | | }) |
| | | }, |
| | | switchIconsModeHandler() { |
| | | this.canEdit = !this.canEdit |
| | | if (this.canEdit == false && this.updateCount > 0) { |
| | | this.$nextTick(() => { |
| | | // uni.setStorageSync("HIndexItemData", this.itemData) |
| | | setMenuList({ |
| | | menuName: this.menuListName, |
| | | payload: this.itemData |
| | | }) |
| | | |
| | | this.updateCount = 0 |
| | | }) |
| | | } |
| | | this.$forceUpdate() |
| | | }, |
| | | toUrl(item) { |
| | | if (item.url) { |
| | | uni.navigateTo({ |
| | | url: item.url |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: '功能开发中。。。', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | this.updateCount = 0 |
| | | }) |
| | | } |
| | | this.$forceUpdate() |
| | | }, |
| | | toUrl(item) { |
| | | if (item.url) { |
| | | uni.navigateTo({ |
| | | url: item.url |
| | | }) |
| | | } else { |
| | | uni.showToast({ |
| | | title: '功能开发中。。。', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | // .mains{ |
| | | // width: 720rpx; |
| | | // margin: 0 auto; |
| | | // display: flex; |
| | | // flex-wrap: wrap; |
| | | // margin-top: 10rpx; |
| | | // padding-bottom: 80rpx; |
| | | // .box{ |
| | | // width: 100%; |
| | | // margin: 26rpx 26rpx 0 26rpx; |
| | | // padding: 0 0 16rpx 10rpx; |
| | | // display: flex; |
| | | // align-items: center; |
| | | // border-bottom: 1px solid #f0f0f0; |
| | | // image{ |
| | | // width: 52rpx; |
| | | // height: 52rpx; |
| | | // } |
| | | // .texts{ |
| | | // font-size: 30rpx; |
| | | // color: #333333; |
| | | // margin-left: 30rpx; |
| | | // } |
| | | // } |
| | | // } |
| | | // .mains{ |
| | | // width: 720rpx; |
| | | // margin: 0 auto; |
| | | // display: flex; |
| | | // flex-wrap: wrap; |
| | | // margin-top: 10rpx; |
| | | // padding-bottom: 80rpx; |
| | | // .box{ |
| | | // width: 100%; |
| | | // margin: 26rpx 26rpx 0 26rpx; |
| | | // padding: 0 0 16rpx 10rpx; |
| | | // display: flex; |
| | | // align-items: center; |
| | | // border-bottom: 1px solid #f0f0f0; |
| | | // image{ |
| | | // width: 52rpx; |
| | | // height: 52rpx; |
| | | // } |
| | | // .texts{ |
| | | // font-size: 30rpx; |
| | | // color: #333333; |
| | | // margin-left: 30rpx; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | .header { |
| | | width: 100%; |
| | | height: 2em; |
| | | position: relative; |
| | | .header { |
| | | width: 100%; |
| | | height: 2em; |
| | | position: relative; |
| | | |
| | | .switch-button { |
| | | position: absolute; |
| | | right: 10rpx; |
| | | bottom: 0; |
| | | } |
| | | } |
| | | .switch-button { |
| | | position: absolute; |
| | | right: 10rpx; |
| | | bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .mains { |
| | | width: 720rpx; |
| | | margin: 0 auto; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding-bottom: 80rpx; |
| | | .mains { |
| | | width: 720rpx; |
| | | margin: 0 auto; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding-bottom: 80rpx; |
| | | |
| | | .box { |
| | | width: 25%; |
| | | margin-top: 2.5vh; |
| | | text-align: center; |
| | | .box { |
| | | width: 25%; |
| | | margin-top: 2.5vh; |
| | | text-align: center; |
| | | |
| | | image { |
| | | width: 18vw; |
| | | height: 18vw; |
| | | } |
| | | image { |
| | | width: 18vw; |
| | | height: 18vw; |
| | | } |
| | | |
| | | .texts { |
| | | width: 120rpx; |
| | | margin: 0 auto; |
| | | font-size: 29rpx; |
| | | font-weight: normal; |
| | | color: #333333; |
| | | margin-top: .2vh; |
| | | } |
| | | } |
| | | .texts { |
| | | width: 120rpx; |
| | | margin: 0 auto; |
| | | font-size: 29rpx; |
| | | font-weight: normal; |
| | | color: #333333; |
| | | margin-top: .2vh; |
| | | } |
| | | } |
| | | |
| | | .edit { |
| | | position: relative; |
| | | } |
| | | .edit { |
| | | position: relative; |
| | | } |
| | | |
| | | .edit-mark { |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | } |
| | | .edit-mark { |
| | | position: absolute; |
| | | top: 0; |
| | | right: 0; |
| | | } |
| | | |
| | | view[enable-hidden] { |
| | | opacity: .4 !important; |
| | | } |
| | | view[enable-hidden] { |
| | | opacity: .4 !important; |
| | | } |
| | | |
| | | view[hidden] { |
| | | display: none; |
| | | } |
| | | } |
| | | view[hidden] { |
| | | display: none; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | "id": 15, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "工作联系单", |
| | | "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill?OperationType=1", |
| | | "id": 16, |
| | | "hidden": false |
| | | }, |
| | | { |
| | | "img": "../../static/icon/icon15.png", |
| | | "text": "工作联系单列表", |
| | | "url": "/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList?OperationType=1", |
| | | "id": 16, |
| | | "hidden": false |
| | | }, |
| | | |
| | | ] |
| | | } |
| | |
| | | <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"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | async searchbarCodeInfo() { |
| | | await this.$nextTick() |
| | | let urlEncode = |
| | | `/Gy_BarCodeBillList/page?sWhere= and 条码编号=\'\'${this.barCodeInfoMeta.barCodeNo}\'\'&user=${this.userInfo.HEmpName}&page=1&size=1` |
| | | `/Gy_BarCodeBillList/page?sWhere= and 条码编号=\'\'${this.barCodeInfoMeta.barCodeNo}\'\'&user=${getUserInfo()['Czymc']}&page=1&size=1` |
| | | .toString() |
| | | if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) == true) { |
| | | return uni.showToast({ |
| | |
| | | <view class="left">条码编号:</view> |
| | | <view class="right"> |
| | | <input :focus="HBarCodeFocus" v-model="barCodeInfoMeta.barCodeNo" placeholder="请扫描条码" |
| | | @blur="searchbarCodeInfo" @confirm="getCode(barCodeInfoMeta.barCodeNo)" /> |
| | | @blur="searchbarCodeInfo" @confirm="searchbarCodeInfo" /> |
| | | </view> |
| | | <view> |
| | | <uni-icons type="scan" |
| | |
| | | barCodeInfo: { |
| | | |
| | | }, |
| | | barCodeCall: false, |
| | | barCodeSplitInfo: [], |
| | | dialogVal: 0, |
| | | itemCache: {}, |
| | |
| | | }, |
| | | //摄像头调用 |
| | | async searchbarCodeInfo() { |
| | | if(this.barCodeCall) { |
| | | return |
| | | } |
| | | this.barCodeCall = true |
| | | await this.$nextTick() |
| | | let urlEncode = |
| | | `/Gy_BarCodeBillList/page?sWhere= and 条码编号=\'\'${this.barCodeInfoMeta.barCodeNo}\'\'&user=${this.userInfo.HEmpName}&page=1&size=1` |
| | | `/Gy_BarCodeBillList/page?sWhere= and 条码编号=''${this.barCodeInfoMeta.barCodeNo}''&user=${getUserInfo()["Czymc"]}&page=1&size=1` |
| | | .toString() |
| | | if (CommonUtils.isEmpty(this.barCodeInfoMeta.barCodeNo) == true) { |
| | | return uni.showToast({ |
| | |
| | | this.barCodeSplitInfo = [] |
| | | // 扫描条码后重置按钮状态 |
| | | this.resetButtonState(); |
| | | this.barCodeCall = false |
| | | } |
| | | }, |
| | | (err) => { |
| | | console.err(err) |
| | | this.barCodeCall = false |
| | | } |
| | | ) |
| | | }, |
| | |
| | | <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"]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| New file |
| | |
| | | import { CommonUtils } from "./common" |
| | | |
| | | export async function getEmpList() { |
| | | return new Promise(async (resolve, reject) => { |
| | | // 获取职员数据 |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/PublicPageMethod/UserList', |
| | | data: { |
| | | sWhere: " where 1=1", |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message |
| | | } = res.data |
| | | if (count == 1) { |
| | | resolve(data) |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: Message |
| | | }) |
| | | reject() |
| | | |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: err |
| | | }) |
| | | reject() |
| | | } |
| | | }) |
| | | } |
| New file |
| | |
| | | import { |
| | | CommonUtils |
| | | } from "@/utils/common.js"; |
| | | |
| | | class WebSocketServices { |
| | | constructor() { |
| | | this.wsInstance = null; // WebSocket 实例 |
| | | this.isConnecting = false; // 避免并发重连 |
| | | this.isConnected = false; // 避免并发重连 |
| | | this.wsUrl = CommonUtils.httpFormatWs() |
| | | } |
| | | |
| | | // 建立WebSocket连接 |
| | | createConnect(userId, userName) { // 使用用户标识 作为后端连接的凭据 |
| | | console.log('wsUrl: ', this.wsUrl); |
| | | console.log('userId: ', userId); |
| | | console.log('userName: ', userName); |
| | | if (this.isConnecting || !userId || this.isConnected) { |
| | | return |
| | | } |
| | | this.wsInstance = uni.connectSocket({ |
| | | url: this.wsUrl + `?userId=${encodeURIComponent(userId)}&userName=${encodeURIComponent(userName)}`, |
| | | success() { |
| | | this.isConnecting = true |
| | | } |
| | | }) |
| | | |
| | | // 监听套接字连接建立 |
| | | uni.onSocketOpen((res) => { |
| | | console.log('[webSocket]: 套接字连接建立成功'); |
| | | this.isConnecting = false |
| | | this.isConnected = true |
| | | 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) { |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: `超出最大重连次数。已退出连接` |
| | | }) |
| | | this.isConnecting = false |
| | | return |
| | | } |
| | | uni.showToast({ |
| | | icon: 'none', |
| | | title: `正在尝试重连,重连次数 ${reCount}` |
| | | }) |
| | | |
| | | 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() |
| | |
| | | return item[e.ColmCols] |
| | | }) |
| | | } |
| | | |
| | | httpFormatWs(httpUrl=this.serverUrl) { |
| | | console.log('httpUrl: ',httpUrl); |
| | | if(httpUrl.indexOf("http://") === 0){ |
| | | httpUrl = httpUrl.replace("http://", "") |
| | | httpUrl = "ws://" + httpUrl.split(":")[0]+":8089/ws" |
| | | }else if(httpUrl.indexOf("https://") === 0) { |
| | | httpUrl = httpUrl.replace("https://", "") |
| | | httpUrl = "wss://" + httpUrl.split(":")[0]+":8089/ws" |
| | | }else{ |
| | | // 提示传入连接错误 |
| | | } |
| | | |
| | | return httpUrl |
| | | } |
| | | } |
| | | |
| | | export const CommonUtils = new commonUtils() |