From 9b2bf18d4be98e8da39b01e6efbd726a76c45428 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期五, 16 一月 2026 09:38:57 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/index/tab2.vue | 2
pages/qitachukujiaoyan/qitachukudanjiaoyan.vue | 108
pages/weiwailingliaojiaoyan/EntrustOutCheckBill.vue | 108
.hbuilderx/launch.json | 4
pages/ZLGL/AanDengHujiao/OA_ErrMsgBackReceiveBill/OA_ErrMsgBackReceiveBill.vue | 2
pages/index/tab1.vue | 19
pages/ZLGL/mojianjianyan/ProcessCheckBill.vue | 22
pages/shengchanruku/ProductInCheckBill.vue | 100
pages/ZLGL/AanDengHujiao/OA_ErrMsgBackCheckBill/OA_ErrMsgBackCheckBill.vue | 2
pages/index/login.vue | 17
pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue | 2
pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill.vue | 2
pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue | 34
utils/WebSocketServices.js | 228 ++
pages.json | 124
pages/ZLGL/QualityReportStep/QualityReportStepBill.vue | 83
pages/ZLGL/style/MJListStyle.scss | 193 +
pages/index/tab4.vue | 16
pages/ZLGL/AanDengHujiao/OA_ErrMsgBackHandleBill/OA_ErrMsgBackHandleBill.vue | 2
pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList.vue | 483 ++++
pages/ZLGL/style/MJBillStyle.scss | 310 ++
pages/shengchandiaobo/MoveStockBill.vue | 290 ++
pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue | 474 ++++
pages/ZLGL/mojianjianyan/ProcessCheckBillList.vue | 2
pages/index/tab3.vue | 687 +++---
pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue | 2
pages/ZLGL/AanDengHujiao/OA_ErrMsgBackSignBill/OA_ErrMsgBackSignBill.vue | 2
pages/shengchanlingliao/PPickingCheckBill.vue | 105
pages/EmployeeRecords/EmployeeRecordsBillList.vue | 558 +++++
.gitignore | 1
pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill.vue | 2
pages/tiaomachaima/tiaomachaima.vue | 2
utils/BasicInfo.js | 37
App.vue | 35
utils/common.js | 15
pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue | 5
pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue | 5
pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport.vue | 121 +
pages/index/index.vue | 1
pages/index/mine.vue | 7
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue | 2
pages/qitarukujiaoyan/Kf_OtherInBillCheck.vue | 108
pages/xiaoshouchukujiaoyan/SellOutCheckBill.vue | 109
pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill.vue | 2
pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue | 14
pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast.vue | 17
pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue | 2
pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport.vue | 121 +
pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill.vue | 2
manifest.json | 9
pages/jishikucunchaxun/table.vue | 2
pages/caigourukujiaoyan/POStockInCheckBill.vue | 119
pages/shengchanbuliaojiaoyan/MateReplenishOutCheckBill.vue | 108
pages/EmployeeRecords/EmployeeRecordsBill.vue | 1566 ++++++++++++++
pages/tiaomachaima/tiaomachaima2.vue | 11
55 files changed, 5,786 insertions(+), 618 deletions(-)
diff --git a/.gitignore b/.gitignore
index f8d66e1..b99a29d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
node_modules
/package-lock.json
/unpackage
+
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index 4dd14cd..a7d9080 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -21,11 +21,11 @@
"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"
}
]
diff --git a/App.vue b/App.vue
index c4c1fff..a26a7c6 100644
--- a/App.vue
+++ b/App.vue
@@ -1,16 +1,47 @@
<script>
+ import WebSocketServices from "./utils/WebSocketServices";
import {
getOpenId,
setUserInfo,
setToken,
- getToken
+ getToken,
+ getUserInfo
} from "./utils/auth";
export default {
onLaunch: function() {
console.log('App Launch')
+ // #ifdef H5
+ // // 娴嬭瘯鏃讹紝H5椤甸潰鍒锋柊浼氫涪澶盬ebSocket杩炴帴锛岄渶瑙﹀彂閲嶈繛 锛堥渶瑕佹祴璇曠殑鏃跺�欏啀瑙i櫎娉ㄩ噴锛屽惁鍒欎細褰卞搷鐑洿鏂帮級
+ // if (uni.getStorageSync("userinfo")) {
+ // if (WebSocketServices.wsInstance) { // 鍋囪浣犵殑 WebSocket 瀹炰緥瀛樺湪 wsInstance 涓�
+ // WebSocketServices.closeConnect(); // 璋冪敤浣犲皝瑁呯殑鈥滃叧闂繛鎺モ�濇柟娉�
+ // }
+
+ // setTimeout(() => {
+ // WebSocketServices.createConnect(
+ // getUserInfo()["Czybm"],
+ // getUserInfo()["Czymc"],
+ // )
+ // }, 500)
+
+ // }
+
+ // // 鍏抽敭锛氱洃鍚儹鏇存柊妯″潡鏇挎崲锛岄攢姣佹棫杩炴帴
+ // if (module.hot) {
+ // module.hot.accept(); // 鍏佽褰撳墠妯″潡鐑洿鏂�
+ // module.hot.dispose(() => {
+ // // 鐑洿鏂版浛鎹㈡ā鍧楀墠锛岄攢姣� WebSocket 杩炴帴
+ // if (WebSocketServices.wsInstance) {
+ // WebSocketServices.closeConnect();
+ // WebSocketServices.wsInstance = null; // 閲嶇疆瀹炰緥
+ // }
+ // });
+ // }
+ // #endif
},
onShow: function() {
console.log('App Show')
+
},
onHide: function() {
console.log('App Hide')
@@ -29,7 +60,7 @@
/* 鐢ㄤ簬瑙e喅picker鍐呴儴璁剧疆 disabled input 鏃朵笉鍝嶅簲鐨勯棶棰� */
.picker-overlay {
- box-sizing: border-box;
+ box-sizing: border-box;
position: absolute;
top: 0;
left: 0;
diff --git a/manifest.json b/manifest.json
index ab0fb2f..2a2de20 100644
--- a/manifest.json
+++ b/manifest.json
@@ -2,8 +2,8 @@
"name" : "鏅轰簯LMES",
"appid" : "__UNI__B002F49",
"description" : "",
- "versionName" : "2.0.51",
- "versionCode" : 251,
+ "versionName" : "2.0.58",
+ "versionCode" : 258,
"transformPx" : false,
/* 5+App鐗规湁鐩稿叧 */
"app-plus" : {
@@ -26,7 +26,8 @@
"Camera" : {},
"Contacts" : {},
"Bluetooth" : {},
- "Barcode" : {}
+ "Barcode" : {},
+ "Push" : {}
},
/* 搴旂敤鍙戝竷淇℃伅 */
"distribute" : {
@@ -131,7 +132,7 @@
}
}
}
- }
+ }
},
/* 蹇簲鐢ㄧ壒鏈夌浉鍏� */
"quickapp" : {},
diff --git a/pages.json b/pages.json
index 6c8cb0b..1ea2118 100644
--- a/pages.json
+++ b/pages.json
@@ -29,7 +29,7 @@
{
"path": "pages/index/tab3",
"style": {
- "navigationBarTitleText": "妯″叿绠$悊"
+ "navigationBarTitleText": "鍣ㄥ叿绠$悊"
}
},
{
@@ -230,20 +230,13 @@
"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": {
@@ -341,16 +334,7 @@
"style": {
"navigationBarTitleText": "閲囪喘閫�鏂欏垪琛�",
"enablePullDownRefresh": true
- }
- },
- {
- "path" : "pages/ZLGL/QualityReportStep/QualityReportStepBill",
- "style" :
- {
- "navigationBarTitleText" : "鍏ㄦ妫�楠屽崟(涓嶈壇姹囨姤)",
- "pageOrientation": "auto"
-
- }
+ }
},
{
"path": "pages/caigoutuiliao/POStockInBackBill",
@@ -1138,14 +1122,14 @@
{
"path": "pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBillList",
"style": {
- "navigationBarTitleText": "妯″叿璋冩嫧鍗�",
+ "navigationBarTitleText": "鍣ㄥ叿璋冩嫧鍗�",
"enablePullDownRefresh": true
}
},
{
"path": "pages/MJGL/qijudiaobodan/Sc_MouldMoveStockBill",
"style": {
- "navigationBarTitleText": "妯″叿璋冩嫧鍗�",
+ "navigationBarTitleText": "鍣ㄥ叿璋冩嫧鍗�",
"enablePullDownRefresh": true
}
},
@@ -1326,7 +1310,7 @@
}
},
{
- "path": "pages/ZLGL/mojianjianyan/lastPieceCheckBillList",
+ "path": "pages/ZLGL/mojianjianyan/ProcessCheckBillList",
"style": {
"navigationBarTitleText": "鏈欢妫�楠屽崟缁存姢"
}
@@ -1344,7 +1328,7 @@
}
},
{
- "path": "pages/ZLGL/mojianjianyan/lastPieceCheckBill",
+ "path": "pages/ZLGL/mojianjianyan/ProcessCheckBill",
"style": {
"navigationBarTitleText": "鏈欢妫�楠屽崟"
}
@@ -1541,44 +1525,73 @@
"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" : "鍣ㄥ叿缁翠慨浠诲姟"
+ }
+ },
+ {
+ "path" : "pages/EmployeeRecords/EmployeeRecordsBill",
+ "style" :
+ {
+ "navigationBarTitleText" : "鍛樺伐绛惧埌璁板綍琛�"
+ }
+ },
+ {
+ "path" : "pages/EmployeeRecords/EmployeeRecordsBillList",
+ "style" :
+ {
+ "navigationBarTitleText" : "鍛樺伐绛惧埌璁板綍琛ㄥ垪琛�"
}
}
+
],
"tabBar": {
@@ -1608,7 +1621,7 @@
"pagePath": "pages/index/tab4",
"iconPath": "static/tabBar/icon3.png",
"selectedIconPath": "static/tabBar/icon3-default.png",
- "text": "璐ㄩ噺绠$悊"
+ "text": "璐ㄩ噺绠$悊"
},
{
"pagePath": "pages/index/tab2",
@@ -1622,21 +1635,22 @@
"selectedIconPath": "static/tabBar/user-default.png",
"text": "鎴戠殑"
}
- ]
- },
- "globalStyle": {
- "navigationBarTextStyle": "white",
- "navigationBarTitleText": "璁惧绠$悊",
- "navigationBarBackgroundColor": "#3A78FF",
- "backgroundColor": "#F8F8F8"
- },
- "uniIdRouter": {},
- "condition": { //妯″紡閰嶇疆锛屼粎寮�鍙戞湡闂寸敓鏁�
- "current": 0, //褰撳墠婵�娲荤殑妯″紡(list 鐨勭储寮曢」)
- "list": [{
- "name": "", //妯″紡鍚嶇О
- "path": "", //鍚姩椤甸潰锛屽繀閫�
- "query": "" //鍚姩鍙傛暟锛屽湪椤甸潰鐨刼nLoad鍑芥暟閲岄潰寰楀埌
- }]
- }
+ ]
+ },
+ "globalStyle": {
+ "navigationBarTextStyle": "white",
+ "navigationBarTitleText": "璁惧绠$悊",
+ "navigationBarBackgroundColor": "#3A78FF",
+ "backgroundColor": "#F8F8F8",
+ "pageOrientation": "default"
+ },
+ "uniIdRouter": {},
+ "condition": { //妯″紡閰嶇疆锛屼粎寮�鍙戞湡闂寸敓鏁�
+ "current": 0, //褰撳墠婵�娲荤殑妯″紡(list 鐨勭储寮曢」)
+ "list": [{
+ "name": "", //妯″紡鍚嶇О
+ "path": "", //鍚姩椤甸潰锛屽繀閫�
+ "query": "" //鍚姩鍙傛暟锛屽湪椤甸潰鐨刼nLoad鍑芥暟閲岄潰寰楀埌
+ }]
+ }
}
\ No newline at end of file
diff --git a/pages/EmployeeRecords/EmployeeRecordsBill.vue b/pages/EmployeeRecords/EmployeeRecordsBill.vue
new file mode 100644
index 0000000..e6f179a
--- /dev/null
+++ b/pages/EmployeeRecords/EmployeeRecordsBill.vue
@@ -0,0 +1,1566 @@
+<template>
+ <view class="form">
+ <view class="form-base-info">
+ <view class="form-item">
+ <view class="title">鏉$爜</view>
+ <view class="right">
+ <input type="text" :focus="HBarCodeFocus" v-model="HBarCode"
+ @confirm="GetMeesageByBarCode(HBarCode)" />
+ </view>
+ <view class="right-icon">
+ <uni-icons type="scan"
+ style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20"
+ @click="toScanCode2"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">瑙掕壊</view>
+ <view class="right">
+ <!-- 澶氶�変笅鎷夋 -->
+ <uni-data-select v-model="hform.HRoles" :multiple="true" :localdata="roleOptions"
+ placeholder="璇烽�夋嫨瑙掕壊" :clear="false" @change="onRoleChange">
+ </uni-data-select>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐢熶骇杞﹂棿:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHDeptName" placeholder="璇烽�夋嫨杞﹂棿" v-model="hform.HDeptName"
+ @input="HDeptNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">绛惧埌浜哄憳:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHEmpName" placeholder="璇烽�夋嫨绛惧埌浜哄憳" v-model="hform.HEmpName"
+ @input="HEmpNameChange"></uni-combox>
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="title">鐝粍:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHGroupName" placeholder="璇烽�夋嫨杞﹂棿" v-model="hform.HGroupName"
+ @input="HGroupNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐝:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHShiftsName" placeholder="璇烽�夋嫨杞﹂棿" v-model="hform.HShiftsName"
+ @input="HShiftsNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鐢熶骇璧勬簮:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHSourceName" placeholder="璇烽�夋嫨杞﹂棿" v-model="hform.HSourceName"
+ @input="HSourceNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">宸ュ簭:</view>
+ <view class="right">
+ <uni-combox :candidates="arrayHProcName" placeholder="璇烽�夋嫨杞﹂棿" v-model="hform.HProcName"
+ @input="HProcNameChange"></uni-combox>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏃ユ湡</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HDate" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HBillNo" />
+ </view>
+ </view>
+ </view>
+ <view class="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>
+ <!-- 瑁呯淇℃伅 -->
+ <view v-if="tabs == 1">
+ <zb-table id="list-table" :checked-highlight="true" :fit="true" :style="{height: `${listTableHeight}px`}"
+ :columns="columns" :data="listData" :show-header="true" :border="true" :row-key="row => row.index"
+ @toggleRowSelection="handleSelect" @toggleAllSelection="handleSelectAll"
+ @rowClick="onTableRowClickHandler" />
+ </view>
+ <view v-if="tabs == 0" class="machine-info-container">
+ <view class="form-item" v-if="false">
+ <view class="title">璁惧ID:</view>
+ <view class="righton">
+ <input name="HEquipID" disabled v-model="hform.HEquipID" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁惧鍚嶇О:</view>
+ <view class="righton">
+ <input name="HEquipName" disabled v-model="hform.HEquipName" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">妯″叿缂栫爜:</view>
+ <view class="righton">
+ <input name="HMouldNo" disabled v-model="hform.HMouldNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">妯″叿鍚嶇О:</view>
+ <view class="righton">
+ <input name="HMouldName" disabled v-model="hform.HMouldName" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">妯″叿鐘舵��:</view>
+ <view class="righton">
+ <input name="HMouldState" disabled v-model="hform.HMouldState" />
+ </view>
+ </view>
+ <!-- <label class="checkbox" style="float: right;">
+ <checkbox :checked="hform.chkHBarflag" style="transform:scale(0.8)" disabled color="#4f81fc" />鏉$爜鏍稿
+ </label> -->
+ </view>
+ <!-- 鍒跺崟淇℃伅 -->
+ <view v-if="tabs == 2">
+ <view class="bill-info">
+ <view class="form-item">
+ <view class="title">鍒涘缓鏃ユ湡</view>
+ <view class="right">
+ <uni-datetime-picker type="date" v-model="hform.HDate">
+ <input type="text" v-model="hform.HDate" disabled />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ </view>
+ <view class="bill-info">
+ <view class="form-item">
+ <view class="title">鍒涘缓浜�</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HMaker" />
+ </view>
+ </view>
+ </view>
+ <view class="bill-info">
+ <view class="form-item">
+ <view class="title">淇敼鏃ユ湡</view>
+ <view class="right">
+ <uni-datetime-picker type="date" v-model="hform.HUpDateDate">
+ <input type="text" v-model="hform.HDate" disabled />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ </view>
+ <view class="bill-info">
+ <view class="form-item">
+ <view class="title">淇敼浜�</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HUpDater" />
+ </view>
+ </view>
+ </view>
+ <view class="bill-info">
+ <view class="form-item">
+ <view class="title">淇敼鏃ユ湡</view>
+ <view class="right">
+ <uni-datetime-picker type="date" v-model="hform.HCheckDate">
+ <input type="text" v-model="hform.HDate" disabled />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ </view>
+ <view class="bill-info">
+ <view class="form-item">
+ <view class="title">淇敼浜�</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HChecker" />
+ </view>
+ </view>
+ </view>
+ <view class="bill-info">
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HBillNo" />
+ </view>
+ </view>
+ </view>
+
+ <view class="bill-info">
+ <view class="form-item">
+ <view class="title">缁勭粐</view>
+ <view class="right disabled">
+ <input type="text" disabled :value="hform.HStockOrgName" />
+ </view>
+ </view>
+ </view>
+
+ </view>
+ <view class="bottom-btn" id="bottom-btn">
+ <button :class="EnableSubmit?'btn-a':'btn-c'" :disabled="!EnableSubmit" size="mini"
+ @tap="cmdSubmit">鎻愪氦</button>
+ <view style="flex: 1;"></view>
+ <!-- <button class="btn-d" size="mini" @tap="cmdDelete">鍒犻櫎</button> -->
+ <button class="btn-c" size="mini" @tap="cmdExit">閫�鍑�</button>
+ </view>
+ <!-- 鎵撳嵃妯″潡 -->
+ <labelPrinterComponentVue ref="labelPrinter" :printInfo="printInfo" :printMode="'cpcl'">
+ </labelPrinterComponentVue>
+
+ <!-- 鎵撳嵃鏈洪�夋嫨鍒楄〃 -->
+ <view v-if="maskShow" class="uni-mask" @tap="maskShow = false">
+ <scroll-view class="uni-scroll_box" scroll-y>
+ <view class="uni-list-box" v-for="(device, index) in discoveredDevices" :key="index"
+ @tap="connectBT(device)">
+ <view class="uni-list_name">鍚嶇О锛歿{ device.name }}</view>
+ <view class="uni-list_item">{{ connectedDeviceId === device.address?'宸茶繛鎺�':'鏈繛鎺�' }}</view>
+ </view>
+ </scroll-view>
+ </view>
+ <view v-if="showResultTable" class="result-modal">
+ <view class="modal-mask" @tap="closeResultTable"></view>
+ <view class="modal-content">
+ <view class="modal-header">
+ <text class="modal-title">绛惧埌缁撴灉</text>
+ <uni-icons type="close" size="20" @tap="closeResultTable"></uni-icons>
+ </view>
+ <view class="modal-body">
+ <zb-table :fit="true" :style="{height: '400px'}" :columns="resultTableColumns"
+ :data="resultTableData" :show-header="true" :border="true" :row-key="row => row.index" />
+ </view>
+ <view class="modal-footer">
+ <button class="btn-a" size="mini" @tap="toAddNew">鏂板</button>
+ <button class="btn-a" size="mini" @tap="search">鎵撳嵃</button>
+ <view style="flex: 1;"></view>
+ <button class="btn-c" size="mini" @tap="closeResultTable">鍏抽棴</button>
+ </view>
+ </view>
+
+ </view>
+ </view>
+</template>
+
+<script>
+ import dayjs from 'dayjs'
+ import {
+ getUserInfo
+ } from "../../utils/auth";
+ import {
+ CommonUtils
+ } from "@/utils/common.js"
+ import {
+ MpaasScan
+ } from "@/utils/mpaasScan.js"
+ import labelPrinterComponentVue from "@/components/labelPrinterComponent/labelPrinterComponent.vue"
+ import getdateTime from '../../utils/getdateTime';
+ export default {
+ components: {
+ labelPrinterComponentVue
+ },
+ data() {
+ return {
+
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ // 璁$畻鍒楄〃楂樺害
+ bottomBtnTop: 0,
+ listTableTop: 0,
+ // 鍏叡鍙橀噺
+ arrayHDeptName: [], //閮ㄩ棬
+ HDeptNameList: [],
+ arrayHEmpName: [], //鍛樺伐
+ HEmpNameList: [],
+ arrayHGroupName: [], //鐝粍
+ HGroupNameList: [],
+ arrayHShiftsName: [], //鐝
+ HShiftsNameList: [],
+ arrayHSourceName: [], //鐢熶骇璧勬簮
+ HSourceNameList: [],
+ arrayHProcName: [], //宸ュ簭
+ HProcNameList: [],
+
+
+ EnableScanBarCodePack: true,
+ EnableSubmit: true,
+ HBarCodePackFocus: false,
+ HBarCodeFocus: false,
+
+ HBarCode: '', // 鍖呮潯鐮�
+ tabs: 0,
+ HBillType: '4616',
+ HBillSubType: '1', //瀛愮被鍨嬶紙1瑁呯銆�2缁勬墭锛�
+ OperationType: 1, //鎿嶄綔绫诲瀷锛�1鏂板銆�2浠庣紦瀛樺垪琛ㄤ腑杩斿洖锛�
+ HMaterNumber_Pack: "", //鎵樻潯鐮佸搴旂墿鏂欎唬鐮�
+ listOption: [],
+ listData: [],
+ columns: [{
+ type: 'selection',
+ fixed: true,
+ width: 50
+ },
+ {
+ name: 'index',
+ label: '搴忓彿',
+ width: 60,
+ hidden: true
+ },
+ {
+ name: '娴佽浆鍗″彿',
+ label: '娴佽浆鍗″彿',
+ width: 100,
+ },
+ {
+ name: '鏁伴噺',
+ label: '鏁伴噺',
+ width: 100,
+ },
+ {
+ name: '鐗╂枡浠g爜',
+ label: '鐗╂枡浠g爜',
+ width: 100,
+ },
+ {
+ name: '鐗╂枡鍚嶇О',
+ label: '鐗╂枡鍚嶇О',
+ width: 100,
+ },
+ {
+ name: '瑙勬牸鍨嬪彿',
+ label: '瑙勬牸鍨嬪彿',
+ width: 100,
+ },
+ {
+ name: '鏁伴噺',
+ label: '鏁伴噺',
+ width: 100,
+ },
+ {
+ name: '鐢熶骇璧勬簮',
+ label: '鐢熶骇璧勬簮',
+ width: 100,
+ }
+ ],
+ selectedRows: [], // 瀛樺偍閫変腑鐨勬暟鎹�
+ HModName: "Sc_PackUnionBill_Packing_PDA",
+ ModRightName: "CE_PackUnionBill_Packing", //妯″潡鏉冮檺鍙傛暟
+ titleData: [], //涓嶉渶瑕佹樉绀虹殑瀛楁
+ OperationType: 1, //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鏁版嵁绫诲瀷锛�1鏂板銆�2浠庣紦瀛樺垪琛ㄤ腑杩斿洖锛�
+ //钃濈墮鐩稿叧淇℃伅
+ printInfo: "", //鎵撳嵃鍐呭
+ maskShow: false, //钃濈墮鎵撳嵃鏈烘樉绀虹粦瀹�
+ printListData: [], //
+ //灞曠ず琛ㄥ崟
+ showResultTable: false, // 鎺у埗缁撴灉琛ㄦ牸鏄剧ず
+ resultTableData: [], // 缁撴灉琛ㄦ牸鏁版嵁
+ resultTableColumns: [{
+ name: '璁惧缂栫爜',
+ label: '璁惧缂栫爜',
+ width: 120,
+ },
+ {
+ name: '璁惧鍚嶇О',
+ label: '璁惧鍚嶇О',
+ width: 120,
+ },
+ {
+ name: '绛惧埌瑙掕壊',
+ label: '绛惧埌瑙掕壊',
+ width: 100,
+ },
+ {
+ name: '鐢熶骇璧勬簮鍚嶇О',
+ label: '鐢熶骇璧勬簮鍚嶇О',
+ width: 100,
+ }
+ ],
+ //
+
+ // 琛ㄥ崟鎻愪氦鍊�
+ hform: {
+ HDate: dayjs(new Date()).format('YYYY-MM-DD'),
+ HMaker: getUserInfo()['Czymc'],
+ HInterID: '',
+ HStockOrgName: uni.getStorageSync("Organization"),
+ HStockOrgID: uni.getStorageSync("OrganizationID"),
+
+ HQualityApproval: false,
+
+ HMainID: '',
+ HSubID: '',
+ HSourceBillSEQ: '',
+ HBillNo: '',
+ HEmpID: getUserInfo()['HEmpID'] || '',
+ HEmpName: getUserInfo()['Czymc'] || '',
+ HEmpNumber: getUserInfo()['Czybm'] || uni.getStorageSync("HEmpNumber"),
+
+
+ HCheckEmpName: '',
+
+ HRemark: '',
+
+ HProduceDate: dayjs(new Date()).format('YYYY-MM-DD'),
+
+ //鑷畾涔�
+ HMouldID: 0,
+ HMouldName: '',
+ HMouldNumber: '',
+ HMouldNo: '',
+ HMouldState: '',
+ HEquipID: 0,
+ HEquipName: '',
+ HSourceID: uni.getStorageSync('HSourceID'),
+ HSourceName: uni.getStorageSync('HSourceName'),
+ HProcID: uni.getStorageSync('HProcID'),
+ HProcName:uni.getStorageSync('HProcName'),
+ HGroupID:uni.getStorageSync('HGroupID'),
+ HGroupName: uni.getStorageSync('HGroupName'),
+ HShiftsID: 0,
+ HShiftsName: '',
+ HDeptName: uni.getStorageSync('HDeptName'),
+ HDeptID: uni.getStorageSync('HDeptID'),
+ //HEmpID:0,
+ //HEmpName:'',
+ HSignInReason: '',
+ HSignRemark: '',
+
+ HMaterID: 0,
+ HMaterNumber: '',
+ HMaterName: '',
+ HMaterModel: '',
+ HRoles: [],
+ },
+ roleOptions: [],
+ // [{
+ // value: '鐝粍闀�',
+ // text: '鐝粍闀�'
+ // },
+ // {
+ // value: '鐝憳',
+ // text: '鐝憳'
+ // },
+ // {
+ // value: '鏈轰慨宸�',
+ // text: '鏈轰慨宸�'
+ // },
+ // {
+ // value: '鎿嶄綔宸�',
+ // text: '鎿嶄綔宸�'
+ // }
+ // ],
+ // 鍒嗛〉妯″潡鍏冩暟鎹�
+ paginationMeta: {
+
+ }
+ }
+ },
+ methods: {
+ onTableRowClickHandler(row, index) {
+ console.log('row: ', row);
+ if (!this.listData[index].checked) {
+ this.$set(this.listData[index], 'checked', true)
+ } else {
+ this.listData[index].checked = !this.listData[index].checked
+ }
+ },
+ async HBarCodeFocusRefresh() {
+ this.HBarCode = ''
+ this.HBarCodeFocus = false
+ await this.$nextTick()
+ this.HBarCodeFocus = true
+ },
+ async HBarCodePackFocusRefresh() {
+ this.HBarCode_Pack = ''
+ this.HBarCodePackFocus = false
+ await this.$nextTick()
+ this.HBarCodePackFocus = true
+ },
+ //#region 涓嬫媺妗�
+ //鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
+ async getHDeptList() {
+ try{
+ let res = await CommonUtils.doRequest2Async({
+ url: '/PublicPageMethod/DeptList',
+ data: {
+ sWhere: "where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + uni.getStorageSync(
+ 'OrganizationID') + ""
+ },
+ })
+
+ console.log('res: ', res);
+ if (res.data.count == 1) {
+ console.log('res.data.data: ', res.data.data);
+ this.HDeptNameList = res.data.data
+ // for (var i = 0; i < res.data.data.length; i++) {
+ // this.arrayHDeptName[i] = res.data.data[i].HName
+ // }
+ this.arrayHDeptName = res.data.data.map(item => item.HName)
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ }catch(err) {
+ uni.showToast({
+ title: err,
+ icon: 'none'
+ })
+ }
+
+ },
+ //閫夋嫨浣跨敤閮ㄩ棬
+ HDeptNameChange(e) {
+ for (var i = 0; i < this.HDeptNameList.length; i++) {
+ if (this.HDeptNameList[i].HName == e) {
+ this.hform.HDeptID = this.HDeptNameList[i].HItemID
+ }
+ }
+ },
+ //鎿嶄綔鍛樸�佽礋璐d汉
+ async getHEmpList() {
+ try{
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Web/GetEmployeeList_Json',
+ data: {
+ Employee: '',
+ HGroupID: 0
+ },
+ })
+
+ console.log('res: ', res);
+ if (res.data.count == 1) {
+ console.log('res.data.data: ', res.data.data);
+ this.HEmpNameList = res.data.data
+ // for (var i = 0; i < res.data.data.length; i++) {
+ // this.arrayHDeptName[i] = res.data.data[i].HName
+ // }
+ this.arrayHEmpName = res.data.data.map(item => item.HName)
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ }catch(err) {
+ uni.showToast({
+ title: err,
+ icon: 'none'
+ })
+ }
+
+ },
+ //閫夋嫨鎿嶄綔鍛�
+ HEmpNameChange(e) {
+ for (var i = 0; i < this.HEmpNameList.length; i++) {
+ if (this.HEmpNameList[i].HName == e) {
+ this.hform.HEmpID = this.HEmpNameList[i].HItemID
+ }
+ }
+ },
+
+ //鐝粍
+ async getHGroupList() {
+ try{
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Group/list',
+ data: {
+ sWhere: '',
+ user: getUserInfo()['Czymc'] || '',
+ },
+ })
+
+ console.log('res: ', res);
+ if (res.data.count > 0) {
+ console.log('res.data.data: ', res.data.data);
+ this.HGroupNameList = res.data.data
+ // for (var i = 0; i < res.data.data.length; i++) {
+ // this.arrayHDeptName[i] = res.data.data[i].HName
+ // }
+ this.arrayHGroupName = res.data.data.map(item => item.鐝粍鍚嶇О)
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ }catch(err) {
+ uni.showToast({
+ title: err,
+ icon: 'none'
+ })
+ }
+
+ },
+ //閫夋嫨鐝粍
+ HGroupNameChange(e) {
+ for (var i = 0; i < this.HGroupNameList.length; i++) {
+ if (this.HGroupNameList[i].鐝粍鍚嶇О == e) {
+ this.hform.HGroupID = this.HGroupNameList[i].HItemID
+ }
+ }
+ },
+ //鐝璫i
+ async getHShiftsList() {
+ try{
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_ShiftsController/Get_Gy_WorkShiftList',
+ data: {
+ sWhere: '',
+ HMaker: getUserInfo()['Czymc'] || '',
+ },
+ })
+
+ console.log('res: ', res);
+ if (res.data.count > 0) {
+ console.log('res.data.data: ', res.data.data);
+ this.HShiftsNameList = res.data.data
+ // for (var i = 0; i < res.data.data.length; i++) {
+ // this.arrayHDeptName[i] = res.data.data[i].HName
+ // }
+ this.arrayHShiftsName = res.data.data.map(item => item.鐝鍚嶇О)
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ }catch(err) {
+ uni.showToast({
+ title: err,
+ icon: 'none'
+ })
+ }
+
+ },
+ //閫夋嫨鐝璫i
+ HShiftsNameChange(e) {
+ for (var i = 0; i < this.HSourceNameList.length; i++) {
+ if (this.HSourceNameList[i].鐝鍚嶇О == e) {
+ this.hform.HSourceID = this.HSourceNameList[i].HInterID
+ }
+ }
+ },
+ //鐢熶骇璧勬簮
+ async getHSourceList() {
+ try{
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Source/list',
+ data: {
+ sWhere: '',
+ user: getUserInfo()['Czymc'] || '',
+ },
+ })
+
+ console.log('鐢熶骇璧勬簮res: ', res);
+ if (res.data.count > 0) {
+ console.log('鐢熶骇璧勬簮res.data.data: ', res.data.data);
+ this.HSourceNameList = res.data.data
+ // for (var i = 0; i < res.data.data.length; i++) {
+ // this.arrayHDeptName[i] = res.data.data[i].HName
+ // }
+ this.arrayHSourceName = res.data.data.map(item => item.鐢熶骇璧勬簮鍚嶇О)
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ }catch(err) {
+ uni.showToast({
+ title: err,
+ icon: 'none'
+ })
+ }
+
+ },
+ //閫夋嫨shengcanziyuan
+ HSourceNameChange(e) {
+ for (var i = 0; i < this.HSourceNameList.length; i++) {
+ if (this.HSourceNameList[i].鐢熶骇璧勬簮鍚嶇О == e) {
+ this.hform.HSourceID = this.HSourceNameList[i].HItemID
+ console.log("HSourceID涓�",this.hform.HSourceID)
+ }
+ }
+ },
+ //宸ュ簭
+ async getHProcList() {
+ try{
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Process/list',
+ data: {
+ sWhere: '',
+ user: getUserInfo()['Czymc'] || '',
+ },
+ })
+
+ console.log('宸ュ簭res: ', res);
+ if (res.data.count > 0) {
+ console.log('宸ュ簭res.data.data: ', res.data.data);
+ this.HProcNameList = res.data.data
+ // for (var i = 0; i < res.data.data.length; i++) {
+ // this.arrayHDeptName[i] = res.data.data[i].HName
+ // }
+ this.arrayHProcName = res.data.data.map(item => item.宸ュ簭鍚嶇О)
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ }catch(err) {
+ uni.showToast({
+ title: err,
+ icon: 'none'
+ })
+ }
+
+ },
+ //閫夋嫨Proc
+ HProcNameChange(e) {
+ for (var i = 0; i < this.HProcNameList.length; i++) {
+ if (this.HProcNameList[i].宸ュ簭鍚嶇О == e) {
+ this.hform.HProcID = this.HProcNameList[i].HItemID
+ }
+ }
+ },
+
+
+ // 鑾峰彇瑙掕壊鍒楄〃
+ async getRoleList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Xt_UserGroup/list',
+ data: {
+ sWhere: '',
+ },
+ })
+
+ console.log('瑙掕壊鍒楄〃res: ', res);
+ if (res.data.count > 0) {
+ console.log('瑙掕壊鍒楄〃res.data.data: ', res.data.data);
+ // 灏嗘帴鍙h繑鍥炵殑鏁版嵁杞崲涓� uni-data-select 闇�瑕佺殑鏍煎紡
+ this.roleOptions = res.data.data.map(item => {
+
+ return {
+ value: item.瑙掕壊 ,
+ text: item.瑙掕壊
+ };
+ });
+ this.$forceUpdate();
+ } else {
+ uni.showToast({
+ title: res.data.Message || '鑾峰彇瑙掕壊鍒楄〃澶辫触',
+ icon: 'none'
+ });
+ // 濡傛灉鎺ュ彛澶辫触锛屽彲浠ヨ缃粯璁ら�夐」
+ this.roleOptions = [];
+ }
+ } catch(err) {
+ uni.showToast({
+ title: err.message || '鑾峰彇瑙掕壊鍒楄〃寮傚父',
+ icon: 'none'
+ });
+ // 寮傚父鎯呭喌璁剧疆榛樿閫夐」
+ this.roleOptions = [];
+ }
+ },
+ //#endregion
+
+
+ toScanCode2() {
+ MpaasScan.scanCode((scanCode) => {
+ this.HBarCode = scanCode
+ GetMeesageByBarCode(scanCode)
+ })
+ },
+ GetMeesageByBarCode(HBarCode) {
+
+ // 鑾峰彇寰呯粍鎵樻潯鐮佸搴旂殑鏁版嵁
+ let sOldBarCode = this.HBarCode
+ let HDeleteFlag = sOldBarCode.substring(0, 1)
+ let sBarCode = sOldBarCode.slice(1)
+ if (HDeleteFlag == '*') {
+ if (!sBarCode) {
+ return uni.showToast({
+ icon: 'none',
+ title: '璇锋壂鎻忚鍒犻櫎鐨勬潯鐮�',
+ })
+ } else {
+ this.HBarCodeFocusRefresh()
+ }
+ CommonUtils.doRequest2({
+ url: '/WEBSController/set_DelPackUnionBill_Temp_Pack_Json',
+ data: {
+ "HInterID": this.hform.HInterID,
+ "HBarCode": sBarCode,
+ "HBillType": this.HBillType
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ CommonUtils.playSound(1)
+ //this.DisBillEntryList()
+ } else {
+ CommonUtils.playSound(0)
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ } else {
+ let sBarCode = this.HBarCode
+ if (!sBarCode) {
+ return uni.showToast({
+ icon: 'none',
+ title: '鏉$爜涓嶈兘涓虹┖锛岃鎵弿鏉$爜锛�',
+ })
+ }
+ CommonUtils.doRequest2({
+ url: '/Sc_EmployeeSignInNoteBillController/APP_Edit_json',
+ data: {
+ "HInterID": this.hform.HInterID,
+ "HBarCode": sBarCode,
+ },
+
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ CommonUtils.playSound(1)
+ //let data=res.data
+ console.log(sBarCode)
+ console.log(res.data.data[0])
+ console.log(res.data[1])
+ debugger
+ this.hform.HMouldID = data[0][0].妯″叿id
+ console.log("idwei", data[0][0].妯″叿id)
+ this.hform.HMouldNo = data[0][0].妯″叿缂栫爜
+ this.hform.HMouldName = data[0][0].妯″叿鍚嶇О
+ this.hform.HMouldState = data[0][0].妯″叿鐘舵��
+ this.listData = []
+ let tabledata = data[1][0]
+ if (data[1].length > 0) {
+ this.hform.HEquipID = tabledata.璁惧鍐呯爜
+ this.hform.HEquipName = tabledata.璁惧鍚嶇О
+ //
+ //this.hform.HSourceID = tabledata.HSourceID
+ this.hform.HMaterID = tabledata.HMaterID
+ //this.hform.HProcID = tabledata.HSourceInterID
+ for (let i = 0; i < data[1].length; i++) {
+ this.listData.push(Object.assign(data[1][i], {
+ index: i
+ }))
+ }
+ }
+
+
+ } else {
+ CommonUtils.playSound(0)
+ this.listData = []
+ this.HBarCodeFocusRefresh()
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ }
+ },
+ onRoleChange(e) {
+ console.log('閫変腑鐨勮鑹�:', this.hform.HRoles);
+ },
+
+
+ handleSelect(selected, array) {
+ this.selectedRows = array
+ },
+ handleSelectAll(selected, array) {
+ this.selectedRows = array
+ },
+ getMaxNo() {
+ CommonUtils.doRequest2({
+ url: "/WEBSController/GetMaxBillNoAndID_Json",
+ data: {
+ "HBillType": this.HBillType
+ },
+ resFunction: (d) => {
+ console.log('d: ', d);
+ let {
+ count,
+ data,
+ Message
+ } = d.data
+ if (count == 1) {
+ this.hform.HInterID = data[0].HInterID;
+ this.hform.HBillNo = data[0].HBillNo
+ } else {
+
+ uni.showModal({
+ title: "娓╅Θ鎻愮ず",
+ showCancel: false,
+ content: Message
+
+ })
+
+ }
+ }
+ })
+ },
+ submitPreCheck() {
+ if (CommonUtils.isEmpty(this.hform.HInterID)) {
+ uni.showToast({
+ icon: 'none',
+ title: '鍗曟嵁鍐呯爜鑾峰彇澶辫触锛岄敊璇殑鍗曟嵁鍐呯爜锛�'
+ })
+ return false
+ }
+ if (CommonUtils.isEmpty(this.hform.HBillNo)) {
+ uni.showToast({
+ icon: 'none',
+ title: '鍗曟嵁鍙疯幏鍙栧け璐ワ紝閿欒鐨勫崟鎹彿锛�'
+ })
+ return false
+ }
+ if (this.listData.length < 1) {
+ uni.showToast({
+ icon: 'none',
+ title: '娌℃湁鎵爜淇℃伅锛岃鍏堟壂鎻忔潯鐮侊紝纭鏃犺鍚庡啀鎻愪氦锛�'
+ })
+ return false
+ }
+ return true
+ },
+ cmdDelete() {
+ console.log('this.selectedRows: ', this.selectedRows);
+ if (this.selectedRows.length != 1) {
+ return uni.showToast({
+ icon: 'none',
+ title: '璇烽�夋嫨涓�琛岃褰曪紝杩涜鍒犻櫎锛�'
+ })
+ }
+ uni.showModal({
+ title: '鍒犻櫎纭',
+ content: '纭瑕佸垹闄ら�変腑琛屾墍鏈夋壂鐮佽褰曪紵鍒犻櫎鍚庡皢涓嶅彲鎭㈠!',
+ success: () => {
+ if (confirm) {
+ CommonUtils.doRequest2({
+ url: '/WEBSController/set_DelPackUnionBill_Temp_Pack_Json',
+ data: {
+ HInterID: this.hform.HInterID,
+ HBillType: this.HBillType,
+ HBarCode: this.selectedRows[0].HBarCode
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ CommonUtils.playSound(1)
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ //this.DisBillEntryList()
+ } else {
+ CommonUtils.playSound(0)
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ }
+ }
+ })
+ },
+
+ async cmdSubmit() {
+ let checkRes = this.submitPreCheck()
+ if (!checkRes) {
+ return
+ }
+ this.EnableSubmit = false
+
+ try {
+ debugger
+ this.hform.HInterID = 0
+ for (let i = 0; i < this.hform.HRoles.length; i++) {
+ this.hform.HSignRemark = this.hform.HSignRemark + this.hform.HRoles[i] + ","
+ }
+ let oMain = JSON.stringify(this.hform);
+ console.log("鎻愪氦鐨刯son", oMain)
+ // this.HBillSub[0].HRepairCheckID = this.hform.HRepairCheckMainID
+ // this.HBillSub[0].HManagerID = this.hform.HManagerID
+ // this.HBillSub[0].HRepairCheckContent = this.hform.HRepairCheckMainContent
+ // let sSubStr = JSON.stringify(this.HBillSub);
+ let sMainSub = oMain + ';' + getUserInfo()['OrganizationID'] + ';' + getUserInfo()['Czymc'];
+ await CommonUtils.doRequest2({
+ url: "/Sc_EmployeeSignInNoteBillController/SaveBill_APP",
+ data: {
+ "msg": sMainSub
+ },
+ method: "POST",
+ resFunction: async (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ // 绛夊緟鏁版嵁鑾峰彇瀹屾垚鍚庡啀鏄剧ず琛ㄦ牸
+ await this.getResultTableData();
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ this.EnableSubmit = true;
+ }
+ }
+ })
+ } catch (error) {
+ console.error('鎻愪氦澶辫触:', error);
+ this.EnableSubmit = true;
+ }
+ },
+ getResultTableData() {
+ CommonUtils.doRequest2({
+ url: '/Sc_EmployeeSignInNoteBillController/GetListPage',
+ data: {
+ "sWhere": 'and HEquipID=' + this.hform.HEquipID,
+ "user": 'admin'
+ },
+ resFunction: (res) => {
+ console.log('缁撴灉鎺ュ彛杩斿洖:', res);
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ console.log('鑾峰彇鍒扮粨鏋滄暟鎹�:', data);
+ this.resultTableData = data;
+ this.showResultTable = true; // 鏄剧ず缁撴灉琛ㄦ牸
+ console.log('showResultTable 璁剧疆涓�:', this.showResultTable);
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message || '鑾峰彇鏁版嵁澶辫触'
+ })
+ this.EnableSubmit = true;
+ }
+ }
+ })
+ },
+ // 鏂板鏂规硶
+ toAddNew() {
+ // 閲嶇疆鏁版嵁锛屽噯澶囨柊澧�
+ this.showResultTable = false;
+ this.EnableSubmit = true;
+ this.resultTableData = [];
+ this.HBarCode_Pack = '';
+ this.HBarCode = '';
+ this.listData = [];
+ this.getMaxNo(); // 閲嶆柊鑾峰彇鏂扮殑鍗曟嵁鍙�
+ this.HBarCodePackFocusRefresh(); // 閲嶆柊鑱氱劍
+ },
+
+ // 鍏抽棴缁撴灉琛ㄦ牸
+ closeResultTable() {
+ this.showResultTable = false;
+ uni.navigateBack();
+ },
+ cmdExit() {
+ uni.navigateBack()
+ },
+ //鎵撳嵃妯″潡鍑芥暟
+ /**
+ * 鎵撳嵃鍑芥暟
+ */
+ async search() {
+ // #ifndef APP-PLUS
+ uni.showModal({
+ content: "涓嶆敮鎸佽摑鐗欐墦鍗板姛鑳斤紝璇峰垏鎹㈢Щ鍔ㄨ澶�...",
+ })
+ return
+ // #endif
+ if (this.$printer.isConnected() === false) {
+ this.$refs.labelPrinter.openPopup()
+ } else {
+ let printContent = []
+ let printInfoBuffer = []
+ let count = 0
+ uni.showLoading()
+ console.log('this.listData: ', this.printListData);
+ for (let listOne of this.printListData) {
+ let Message = await this.getPrintTemplate(listOne.HInterID, listOne.HItemID)
+ printContent.push(Message)
+ count++;
+ if (count == 10) {
+ printInfoBuffer.push(printContent.join("\r\n"))
+ count = 0
+ printContent = []
+ }
+ }
+ uni.hideLoading()
+ printInfoBuffer.push(printContent.join("\r\n"))
+ this.printInfo = JSON.stringify(printInfoBuffer)
+ printInfoBuffer = []
+
+ await this.$nextTick(() => {
+ this.$refs.labelPrinter.execPrint()
+ })
+ }
+ },
+ /** 鑾峰彇鎵撳嵃妯℃澘
+ * @param {Object} HInterID
+ * @param {Object} HItemID
+ */
+ async getPrintTemplate(HInterID, HItemID) {
+ console.log('data: ', {
+ HOrginationName: uni.getStorageSync("Organization"),
+ HBillSubType: this.HBillType,
+ HInterID: HInterID,
+ HItemID: HItemID,
+ })
+ return new Promise((resolve, reject) => {
+ CommonUtils.doRequest2({
+ url: "/Sc_BarCode/Get_BarCodePrintCode_CPCL",
+ data: {
+ HOrginationName: uni.getStorageSync("Organization"),
+ HBillSubType: this.HBillType,
+ HInterID: HInterID,
+ HItemID: HItemID,
+ },
+ resFunction: (res) => {
+ let {
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ console.log('Message: ', Message);
+ resolve(Message)
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ reject();
+ }
+ },
+ errFunction: (err) => {
+ reject();
+ },
+
+ })
+ })
+ },
+ /**
+ * 鏌ユ壘鎵撳嵃鏈�
+ */
+ async searchLabelPrinter() {
+ // 鏌ユ壘鎵撳嵃鏈�
+ var that = this
+ // 浣跨敤openBluetoothAdapter 鎺ュ彛锛屽厤鍘讳富鍔ㄧ敵璇锋潈闄愮殑楹荤儲
+ uni.openBluetoothAdapter({
+ success: async (res) => {
+ await this.checkPermission();
+ console.log('start discovery devices');
+ this.discoveredDevices = [];
+ console.log(res)
+ bluetoothTool.discoveryNewDevice();
+ this.maskShow = true
+ },
+ fail: async (e) => {
+ console.error(e)
+ switch (e.code) {
+ case "10009":
+ this.showToast("姝よ澶囦笉鏀寔璁惧鎼滅储鍔熻兘!");
+ break;
+ default:
+ console.error(e);
+ }
+ }
+ })
+
+ },
+ onDevice(device) {
+ console.log("鐩戝惉瀵绘壘鍒版柊璁惧鐨勪簨浠�---------------")
+ console.log(device)
+ if (typeof device === 'undefined') return;
+ if (typeof device.name === 'undefined') return;
+ console.log(device.name);
+ if (device.name === '') return;
+ if (device.name === null) return;
+ if (device.name.toUpperCase().endsWith('_BLE') ||
+ device.name.toUpperCase().endsWith('-LE') ||
+ device.name.toUpperCase().endsWith('-BLE')) return;
+ const isDuplicate = this.discoveredDevices.find(item => item.address === device.address);
+ if (isDuplicate) return;
+ this.discoveredDevices.push(device);
+ },
+ connectBT(device) {
+ const vm = this;
+ uni.showLoading({
+ title: '杩炴帴涓�'
+ });
+ bluetoothTool.connDevice(device.address, (result) => {
+ console.log(result)
+ uni.hideLoading()
+ if (result) {
+ // // console.log(result);
+ bluetoothTool.cancelDiscovery();
+ // console.log(vm.$printer)
+ vm.$printer.init(new FakeConnectedDevice());
+ vm.connectedDeviceId = device.address;
+ uni.showToast({
+ icon: 'none',
+ title: '杩炴帴鎴愬姛'
+ })
+ this.maskShow = false
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: '杩炴帴澶辫触'
+ })
+ }
+ });
+ },
+ stopSearchBT() {
+ console.log("鍋滄鎼滃闄勮繎鐨勮摑鐗欏鍥磋澶�---------------")
+ bluetoothTool.cancelDiscovery();
+ },
+ closeBluetooth() {
+ console.log("鍋滄钃濈墮杩炴帴")
+ const vm = this;
+ if (vm.connectedDeviceId != '') {
+ bluetoothTool.closeBtSocket();
+ vm.connectedDeviceId = "";
+ }
+ },
+
+ },
+ computed: {
+ listTableHeight: {
+ get() {
+ return this.bottomBtnTop - this.listTableTop - 10
+ }
+ }
+ },
+ async onReady() {
+ // #ifndef MP-WEIXIN
+ let query = uni.createSelectorQuery().in(this)
+ query.select("#bottom-btn")
+ .boundingClientRect((data) => {
+ if (data) {
+ this.bottomBtnTop = data.top
+ } else {
+ console.log("鏈壘鍒�#bottom-btn鑺傜偣");
+ }
+ })
+ .exec();
+ query.select("#list-table")
+ .boundingClientRect((data) => {
+ if (data) {
+ this.listTableTop = data.top
+ } else {
+ console.log("鏈壘鍒�#list-table鑺傜偣");
+ }
+ })
+ .exec();
+ // #endif
+ },
+ onLoad(e) {
+ // 1涓� 瑁呯 2涓� 缁勬墭
+ this.BarCodeType = e.BarCodeType || 1
+ this.OperationType = e.OperationType || 1
+
+ this.getHDeptList()
+ this.getHEmpList()
+ this.getHGroupList()
+ this.getHShiftsList()
+ this.getHSourceList()
+ this.getHProcList()
+ this.getRoleList()
+ if (this.OperationType == 1) {
+ this.getMaxNo()
+ } else if (this.OperationType == 2) {
+ // this.GetMeesageByBarCode_Pack(this.HBarCode_Pack)
+ //this.DisBillEntryList()
+ this.tabs = 0
+ }
+
+
+ // 鍏夋爣榛樿鑱氱劍鍦ㄦ墭鏉$爜涓�
+ this.HBarCodePackFocusRefresh()
+ }
+ }
+</script>
+
+<style lang="scss">
+ input {
+ width: inherit;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+
+ .uni-mask {
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ z-index: 3;
+ display: flex;
+ align-items: center;
+ width: 100%;
+ background: rgba(0, 0, 0, 0.6);
+ padding: 0 30rpx;
+ box-sizing: border-box;
+ }
+
+ .form {
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+
+ .form-base-info {
+ display: flex;
+ flex-direction: column;
+ gap: 10rpx;
+ box-sizing: border-box;
+ padding: 30rpx;
+ }
+
+ .bill-info {
+ display: flex;
+ flex-direction: column;
+ gap: 10rpx;
+ box-sizing: border-box;
+ padding: 16rpx 30rpx;
+ background-color: #fff;
+ }
+
+ .form-item {
+ display: flex;
+ align-items: center;
+ font-size: 30rpx;
+ padding: 6rpx 0;
+
+ .title {
+ width: 208rpx;
+
+ text {
+ color: red;
+ font-weight: bold;
+ }
+ }
+
+ .right {
+ flex: 1;
+ 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;
+ }
+
+
+
+ textarea {
+ width: 98%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+
+ }
+ }
+
+ .tabs {
+ width: 100%;
+ display: flex;
+ border-bottom: 1px solid #ddd;
+ margin: 20rpx 0;
+
+ 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;
+ }
+ }
+
+ .machine-info-container {
+ padding-left: 40rpx;
+ /* 鍚戝彸绉诲姩40rpx */
+ padding-right: 40rpx;
+ padding-top: 20rpx;
+
+ .form-item {
+ display: flex;
+ align-items: center;
+ font-size: 30rpx;
+ padding: 10rpx 0;
+
+ .title {
+ width: 220rpx;
+ /* 绋嶅井鍔犲鏍囬瀹藉害 */
+ min-width: 220rpx;
+ color: #333;
+ }
+
+ .righton {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #f8f8f8;
+
+ input {
+ width: 100%;
+ padding: 12rpx 20rpx;
+ font-size: 30rpx;
+ color: #666;
+ }
+ }
+ }
+ }
+
+ .bottom-btn {
+ width: 100%;
+ box-sizing: border-box;
+ // 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;
+ }
+ }
+
+ .result-modal {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 2;
+
+ .modal-mask {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(0, 0, 0, 0.5);
+ }
+
+ .modal-content {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ width: 90%;
+ max-width: 700rpx;
+ background: #fff;
+ border-radius: 20rpx;
+ overflow: hidden;
+
+ .modal-header {
+ padding: 30rpx;
+ border-bottom: 1px solid #eee;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+
+ .modal-title {
+ font-size: 32rpx;
+ font-weight: bold;
+ }
+ }
+
+ .modal-body {
+ padding: 30rpx;
+ max-height: 60vh;
+ overflow-y: auto;
+ }
+
+ .modal-footer {
+ padding: 30rpx;
+ border-top: 1px solid #eee;
+ display: flex;
+ align-items: center;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/EmployeeRecords/EmployeeRecordsBillList.vue b/pages/EmployeeRecords/EmployeeRecordsBillList.vue
new file mode 100644
index 0000000..7924e7f
--- /dev/null
+++ b/pages/EmployeeRecords/EmployeeRecordsBillList.vue
@@ -0,0 +1,558 @@
+<template>
+ <view>
+ <view class="page-header">
+ <view class="search-item">
+ <view class="left">鏃ユ湡闂撮殧</view>
+ <view class="right">
+ <picker mode="selector" :value="curDateGap" :range="dateRangePicker"
+ @change="onDateRangePickerChangeHandler">
+ <input disabled v-model="curDateGap" placeholder="璇烽�夋嫨鏃ユ湡闂撮殧" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ </view>
+ <view class="search-item">
+ <view class="left">寮�濮嬫棩鏈�</view>
+ <view class="right">
+ <uni-datetime-picker :clear-icon="false" type="date" v-model="startDate"
+ :disabled="!enableCustomDateRange">
+ <view class="datetime-picker-inner"
+ :class="enableCustomDateRange?'font__enable':'font__disable'">
+ <text>{{ startDate }}</text>
+ </view>
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view class="search-item">
+ <view class="left">缁撴潫鏃ユ湡</view>
+ <view class="right">
+ <uni-datetime-picker :clear-icon="false" type="date" v-model="endDate"
+ :disabled="!enableCustomDateRange">
+ <view class="datetime-picker-inner"
+ :class="enableCustomDateRange?'font__enable':'font__disable'">{{ endDate }}</view>
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view class="search-item">
+ <view class="left">鍗曟嵁鍙�</view>
+ <view class="right">
+ <input type="text" auto-focus v-model="HBillNo" />
+ </view>
+ </view>
+
+ <view class="button-groups">
+ <button type="default" size="mini" class="btn-b" @tap.stop="onAddClickHandler">鏂板</button>
+ <button type="default" size="mini" class="btn-c" @tap.stop="onSearchClickHandler">鏌ヨ</button>
+ <button type="default" size="mini" class="btn-a" @tap.stop="onResetClickHandler">閲嶇疆</button>
+ </view>
+ </view>
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+ <scroll-view id="pageContent" scroll-y class="page-content" :style="{height: pageContentHeight + 'px'}">
+ <view v-for="(item,index) in listData" :key="index">
+ <uni-card :title="item.浜у搧妯″叿" :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.浜哄憳浠g爜">
+ <text>浜哄憳浠g爜锛�</text>{{item.浜哄憳浠g爜}}
+ </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>
+ <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.鍒跺崟鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.瀹℃牳浜�">
+ <text>瀹℃牳浜猴細</text>{{item.瀹℃牳浜簘}
+ </view>
+ <view class="detail" v-if="item.瀹℃牳鏃ユ湡">
+ <text>瀹℃牳鏃ユ湡锛�</text>{{item.瀹℃牳鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.淇敼浜�">
+ <text>淇敼浜猴細</text>{{item.淇敼浜簘}
+ </view>
+ <view class="detail" v-if="item.淇敼鏃ユ湡">
+ <text>淇敼鏃ユ湡锛�</text>{{item.淇敼鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.鍏抽棴浜�">
+ <text>鍏抽棴浜猴細</text>{{item.鍏抽棴浜簘}
+ </view>
+ <view class="detail" v-if="item.鍏抽棴鏃ユ湡">
+ <text>鍏抽棴鏃ユ湡锛�</text>{{item.鍏抽棴鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.浣滃簾浜�">
+ <text>浣滃簾浜猴細</text>{{item.浣滃簾浜簘}
+ </view>
+ <view class="detail" v-if="item.浣滃簾鏃ユ湡">
+ <text>浣滃簾鏃ユ湡锛�</text>{{item.浣滃簾鏃ユ湡.substr(0,10)}}
+ </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 class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
+ </scroll-view>
+ <!-- 鍒嗛〉鍣� -->
+ <view class="page-footer">
+ <uni-pagination id="pagination" title="鏍囬鏂囧瓧" v-model="pageMeta.curPage" :pageSize="pageMeta.size"
+ :total="pageMeta.total" @change="onPageChangeHandler"></uni-pagination>
+ </view>
+ </view>
+</template>
+
+<script>
+ import dayjs from 'dayjs'
+ import {
+ CommonUtils
+ } from '@/utils/common.js'
+ import {
+ getUserInfo
+ } from "../../utils/auth";
+ export default {
+ data() {
+ return {
+ // 璁$畻鍗$墖鍒楄〃楂樺害
+ pagination_top: 0,
+ pageContent_top: 0,
+ // 鍒嗛〉鎺у埗
+ pageMeta: {
+ curPage: 1,
+ size: 50,
+ total: 0,
+ },
+ // 婊氬姩鎺у埗
+ scrollTop: 0,
+ old: {
+ scrollTop: 0
+ },
+
+ dateRangePicker: ["浠绘剰闂撮殧", "浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"],
+ curDateGap: "杩戜竷澶�",
+ enableCustomDateRange: false,
+ startDate: dayjs(new Date()).subtract(7, 'day').format('YYYY-MM-DD'),
+ endDate: dayjs(new Date()).format('YYYY-MM-DD'),
+ HBillNo: '',
+
+ listData: [],
+ showDetail: -1,
+ operations: -1,
+ }
+ },
+ computed: {
+ pageContentHeight: {
+ get() {
+ return (this.pagination_top - this.pageContent_top)
+ }
+ },
+ },
+ onLoad() {
+ this.onSearchClickHandler()
+ },
+ onPullDownRefresh() {
+ this.onSearchClickHandler()
+ },
+ async onReady() {
+ // #ifndef MP-WEIXIN
+ let query = uni.createSelectorQuery().in(this)
+ query.select("#pagination")
+ .boundingClientRect((data) => {
+ if (data) {
+ this.pagination_top = data.top
+ } else {
+ console.log("鏈壘鍒�#pagination鑺傜偣");
+ }
+ })
+ .exec();
+ query.select("#pageContent")
+ .boundingClientRect((data) => {
+ if (data) {
+ this.pageContent_top = data.top
+ } else {
+ console.log("鏈壘鍒�#pageContent鑺傜偣");
+ }
+ })
+ .exec();
+ // #endif
+
+ },
+ methods: {
+ goTop: function(e) {
+ // 瑙e喅view灞備笉鍚屾鐨勯棶棰�
+ this.scrollTop = this.old.scrollTop
+ this.$nextTick(function() {
+ this.scrollTop = 0
+ });
+ },
+ onDateRangePickerChangeHandler({
+ detail
+ }) {
+ this.enableCustomDateRange = false
+ this.curDateGap = this.dateRangePicker[detail.value]
+ let date = new Date()
+ switch (this.curDateGap) {
+ case "浠婂ぉ":
+ this.startDate = dayjs(date).format("YYYY-MM-DD")
+ break;
+ case "杩戜竴澶�":
+ this.startDate = dayjs(date).subtract(1, 'day').format("YYYY-MM-DD")
+ break;
+ case "杩戜袱澶�":
+ this.startDate = dayjs(date).subtract(2, 'day').format("YYYY-MM-DD")
+ break;
+ case "杩戜笁澶�":
+ this.startDate = dayjs(date).subtract(3, 'day').format("YYYY-MM-DD")
+ break;
+ case "杩戝洓澶�":
+ this.startDate = dayjs(date).subtract(4, 'day').format("YYYY-MM-DD")
+ break;
+ case "杩戜簲澶�":
+ this.startDate = dayjs(date).subtract(5, 'day').format("YYYY-MM-DD")
+ break;
+ case "杩戝叚澶�":
+ this.startDate = dayjs(date).subtract(6, 'day').format("YYYY-MM-DD")
+ break;
+ case "杩戜竷澶�":
+ this.startDate = dayjs(date).subtract(7, 'day').format("YYYY-MM-DD")
+ break;
+ case "杩�30澶�":
+ this.startDate = dayjs(date).subtract(30, 'day').format("YYYY-MM-DD")
+ break;
+ }
+ if (this.curDateGap == '浠绘剰闂撮殧') {
+ this.enableCustomDateRange = true
+ }
+ },
+ onSearchClickHandler() {
+ let sWhere = ""
+ if (this.startDate) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.startDate + "'";
+ }
+ if (this.endDate) {
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + this.endDate + "'";
+ }
+ if (this.HBillNo) {
+ sWhere += " and 鍗曟嵁鍙� like '%" + this.HBillNo + "%'";
+ }
+ this.get_DisplayPage(sWhere);
+ },
+ clear() {
+ this.curDateGap = "杩戜竷澶�"
+ this.enableCustomDateRange = false
+ this.startDate = dayjs(new Date()).subtract(7, 'day').format('YYYY-MM-DD')
+ this.endDate = dayjs(new Date()).format('YYYY-MM-DD')
+ this.HBillNo = ''
+ },
+ async onResetClickHandler() {
+ this.clear()
+ await this.$nextTick()
+ this.onSearchClickHandler()
+ },
+ get_DisplayPage(sWhere) {
+ CommonUtils.doRequest2({
+ url: '/Sc_EmployeeSignInNoteBillController/GetListPage',
+ data: {
+ "sWhere": sWhere,
+ "user": getUserInfo()["Czymc"],
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ console.log('res.data: ', res.data);
+ this.listData = data;
+ this.pageMeta.total = count
+ uni.stopPullDownRefresh()
+ }
+ })
+ },
+ onPageChangeHandler() {
+ this.onSearchClickHandler()
+ this.goTop()
+ },
+ // 鏂板
+ onAddClickHandler() {
+ uni.navigateTo({
+ url: "/pages/EmployeeRecords/EmployeeRecordsBill?operationType=1"
+ })
+ },
+ //缂栬緫鐐规璁板綍鍗�
+ edit(item) {
+ console.log(item)
+ uni.navigateTo({
+ url: '/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill?operationType=3&hmainid=' + item.hmainid
+ })
+ },
+ //鍒犻櫎鐐规璁板綍鍗�
+ del(item) {
+ uni.showModal({
+ title: '鍒犻櫎纭',
+ content: '纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ CommonUtils.doRequest2({
+ url: '/Sc_EmployeeSignInNoteBillController/deleteBill',
+ data: {
+ HItemID: item['InterID'],
+ user: getUserInfo()['Czymc']
+ },
+ resFunction: (res) => {
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ uni.showToast({
+ icon: count === 1 ? 'success' : 'error',
+ title: Message,
+ duration: 2000
+ });
+
+ // 绛夊緟鎻愮ず鏄剧ず瀹屾垚鍐嶅埛鏂�
+ setTimeout(() => {
+ this.onSearchClickHandler();
+ }, 2000);
+ } else {
+ uni.showToast({
+ icon: 'none',
+ title: Message
+ })
+ }
+ }
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ }
+ },
+ }
+</script>
+
+<style lang="scss">
+ .page-header {
+ display: flex;
+ box-sizing: border-box;
+ padding: 20rpx;
+ flex-direction: column;
+ gap: 10rpx;
+ font-size: 32rpx;
+
+ .search-item {
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+ justify-content: center;
+ align-items: center;
+
+ .left {
+ width: 4em;
+ }
+
+ .right {
+ flex: 1;
+ position: relative;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ display: flex;
+ padding: 4rpx 10rpx;
+
+ picker {
+ width: 100%;
+ }
+ }
+ }
+
+ input {
+ width: inherit;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+
+ .datetime-picker-inner {
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ display: flex;
+ align-items: center;
+ }
+
+ .font__enable {
+ color: #000;
+ }
+
+ .font__disable {
+ color: #cccccc;
+ }
+ }
+
+ .button-groups {
+ box-sizing: border-box;
+ padding: 10rpx 0 0 0;
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+ justify-content: space-between;
+
+ 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;
+ }
+ }
+
+ .page-content {
+ // height: 40vh;
+ box-sizing: border-box;
+ padding: 10rpx 0;
+
+ .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;
+ }
+ }
+
+ .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;
+ }
+ }
+ }
+
+ .page-footer {
+ position: fixed;
+ bottom: 0;
+ width: 100%;
+ box-sizing: border-box;
+ padding: 32rpx 40rpx;
+ }
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue b/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue
index 9a53f20..b41f1a2 100644
--- a/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue
+++ b/pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill.vue
@@ -441,7 +441,7 @@
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')
}
diff --git a/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue b/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
index acd4e0e..e33628e 100644
--- a/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
+++ b/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
@@ -504,7 +504,7 @@
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')
}
diff --git a/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue b/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
index a651419..a687fab 100644
--- a/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
+++ b/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
@@ -424,9 +424,6 @@
message: err
})
}
-
-
-
},
toCheckFile() {
if (this.hform.HEquipID == 0) {
@@ -554,7 +551,7 @@
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')
}
diff --git a/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue b/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue
index 19c06df..cfbeb05 100644
--- a/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue
+++ b/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue
@@ -403,7 +403,7 @@
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')
}
diff --git a/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill.vue b/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill.vue
index cff4b33..fba70a1 100644
--- a/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill.vue
+++ b/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill.vue
@@ -463,7 +463,7 @@
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')
}
diff --git a/pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport.vue b/pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport.vue
new file mode 100644
index 0000000..b0618b2
--- /dev/null
+++ b/pages/MJGL/Sb_EquipRepairTaskReport/Sb_EquipRepairTaskReport.vue
@@ -0,0 +1,121 @@
+<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>
\ No newline at end of file
diff --git a/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue b/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue
index 7066f6c..ef6f93b 100644
--- a/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue
+++ b/pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill.vue
@@ -550,7 +550,7 @@
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')
}
diff --git a/pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport.vue b/pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport.vue
new file mode 100644
index 0000000..e5b6577
--- /dev/null
+++ b/pages/MJGL/Sc_MouldRepairTaskReport/Sc_MouldRepairTaskReport.vue
@@ -0,0 +1,121 @@
+<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>
\ No newline at end of file
diff --git a/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill.vue b/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill.vue
index be9739d..37d6acd 100644
--- a/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill.vue
+++ b/pages/MJGL/mujubaoyangjiludan/Sc_MouldMaintainBill.vue
@@ -273,7 +273,6 @@
import {
MpaasScan
} from "@/utils/mpaasScan.js"
- import "@/pages/MJGL/style/MJBillStyle.scss"
import {
getUserInfo
} from "../../../utils/auth";
@@ -869,4 +868,5 @@
</script>
<style lang="scss">
+ @import "@/pages/MJGL/style/MJBillStyle.scss"
</style>
\ No newline at end of file
diff --git a/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill.vue b/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill.vue
index 6d8027b..792f7d2 100644
--- a/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill.vue
+++ b/pages/MJGL/mujudianjianjiludan/Sc_MouldDotCheckBill.vue
@@ -309,7 +309,6 @@
import {
MpaasScan
} from "@/utils/mpaasScan.js"
- import "@/pages/MJGL/style/MJBillStyle.scss"
import {
getUserInfo
} from "../../../utils/auth";
@@ -951,4 +950,5 @@
</script>
<style lang="scss">
+ @import "@/pages/MJGL/style/MJBillStyle.scss"
</style>
\ No newline at end of file
diff --git a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill.vue b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill.vue
index 5b4afdd..48535d4 100644
--- a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill.vue
+++ b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackBill/OA_ErrMsgBackBill.vue
@@ -277,7 +277,6 @@
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 {
@@ -1040,4 +1039,5 @@
</script>
<style lang="scss">
+ @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
</style>
\ No newline at end of file
diff --git a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackCheckBill/OA_ErrMsgBackCheckBill.vue b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackCheckBill/OA_ErrMsgBackCheckBill.vue
index 977fc23..cad1a85 100644
--- a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackCheckBill/OA_ErrMsgBackCheckBill.vue
+++ b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackCheckBill/OA_ErrMsgBackCheckBill.vue
@@ -232,7 +232,6 @@
import {
getUserInfo
} from "../../../../utils/auth";
- import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
export default {
data() {
return {
@@ -1020,4 +1019,5 @@
</script>
<style lang="scss">
+ @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
</style>
\ No newline at end of file
diff --git a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackHandleBill/OA_ErrMsgBackHandleBill.vue b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackHandleBill/OA_ErrMsgBackHandleBill.vue
index dc0a762..1eb2a83 100644
--- a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackHandleBill/OA_ErrMsgBackHandleBill.vue
+++ b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackHandleBill/OA_ErrMsgBackHandleBill.vue
@@ -239,7 +239,6 @@
import {
getUserInfo
} from "../../../../utils/auth";
- import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
export default {
data() {
return {
@@ -1044,4 +1043,5 @@
</script>
<style lang="scss">
+ @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
</style>
\ No newline at end of file
diff --git a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackReceiveBill/OA_ErrMsgBackReceiveBill.vue b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackReceiveBill/OA_ErrMsgBackReceiveBill.vue
index aaff83c..1d9f27f 100644
--- a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackReceiveBill/OA_ErrMsgBackReceiveBill.vue
+++ b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackReceiveBill/OA_ErrMsgBackReceiveBill.vue
@@ -240,7 +240,6 @@
import {
getUserInfo
} from "../../../../utils/auth";
- import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
export default {
data() {
return {
@@ -905,4 +904,5 @@
</script>
<style lang="scss">
+ @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
</style>
\ No newline at end of file
diff --git a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackSignBill/OA_ErrMsgBackSignBill.vue b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackSignBill/OA_ErrMsgBackSignBill.vue
index d9c5c84..1025f80 100644
--- a/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackSignBill/OA_ErrMsgBackSignBill.vue
+++ b/pages/ZLGL/AanDengHujiao/OA_ErrMsgBackSignBill/OA_ErrMsgBackSignBill.vue
@@ -227,7 +227,6 @@
import {
getUserInfo
} from "../../../../utils/auth";
- import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
export default {
data() {
return {
@@ -986,4 +985,5 @@
</script>
<style lang="scss">
+ @import "@/pages/ZLGL/AanDengHujiao/style/OA_ErrMsgStyle.scss"
</style>
\ No newline at end of file
diff --git a/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue b/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue
new file mode 100644
index 0000000..1678a02
--- /dev/null
+++ b/pages/ZLGL/OA_WorkLink/OA_WorkLinkBill.vue
@@ -0,0 +1,474 @@
+<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', // 鎵ц鎻愪氦鐨勬搷浣滅被鍨嬶紝涓巓perationType绫讳技
+ 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>
\ No newline at end of file
diff --git a/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList.vue b/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList.vue
new file mode 100644
index 0000000..b0356ab
--- /dev/null
+++ b/pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList.vue
@@ -0,0 +1,483 @@
+<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>
\ No newline at end of file
diff --git a/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue b/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
index 049ddb9..fad9bf8 100644
--- a/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
+++ b/pages/ZLGL/QualityReportStep/QualityReportStepBill.vue
@@ -7,6 +7,7 @@
<view :class="mainTabSelected == 1 ? 'selected' : ''" @tap="mainTabSelected = 1">鍩烘湰淇℃伅</view>
<view :class="mainTabSelected == 2 ? 'selected' : ''" @tap="mainTabSelected = 2">鎵弿淇℃伅</view>
<view :class="mainTabSelected == 3 ? 'selected' : ''" @tap="mainTabSelected = 3">鍒跺崟淇℃伅</view>
+ <view :class="mainTabSelected == 4 ? 'selected' : ''" @tap="mainTabSelected = 4">鍏朵粬淇℃伅</view>
</view>
<!-- 涓昏〃鍐呭 -->
<view class="bill-main-contents">
@@ -92,19 +93,7 @@
<input type="number" v-model="hform.HCheckQty" :disabled="hasCheckQty" />
</view>
</view>
- <view class="form-item">
- <view class="left">鐢熶骇鐝粍</view>
- <view class="right-select">
- <zxz-uni-data-select
- v-model="hform.HGroupID"
- dataKey="鐝粍鍚嶇О"
- dataValue="HItemID"
- :filterable="true"
- :localdata="HGroupList"
- :clear="false"
- ></zxz-uni-data-select>
- </view>
- </view>
+
<view class="form-item">
<view class="left">妫�楠屽憳</view>
<view class="right-select">
@@ -127,19 +116,7 @@
</view>
- <view class="form-item">
- <view class="left">鐢熶骇璧勬簮</view>
- <view class="right-select">
- <zxz-uni-data-select
- v-model="hform.HSourceID"
- dataKey="鐢熶骇璧勬簮鍚嶇О"
- dataValue="HItemID"
- :filterable="true"
- :localdata="HSourceList"
- :clear="false"
- ></zxz-uni-data-select>
- </view>
- </view>
+
<view class="form-item">
<view class="left">澶囨敞</view>
@@ -225,6 +202,35 @@
<view class="left">浣滃簾鏃ユ湡</view>
<view class="right disabled">
<input type="text" :value="hform.HDeleteDate" disabled />
+ </view>
+ </view>
+ </view>
+ <!-- 鍏朵粬淇℃伅 -->
+ <view class="bill-main-content" v-if="mainTabSelected == 4">
+ <view class="form-item">
+ <view class="left">鐢熶骇鐝粍</view>
+ <view class="right-select">
+ <zxz-uni-data-select
+ v-model="hform.HGroupID"
+ dataKey="鐝粍鍚嶇О"
+ dataValue="HItemID"
+ :filterable="true"
+ :localdata="HGroupList"
+ :clear="false"
+ ></zxz-uni-data-select>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="left">鐢熶骇璧勬簮</view>
+ <view class="right-select">
+ <zxz-uni-data-select
+ v-model="hform.HSourceID"
+ dataKey="鐢熶骇璧勬簮鍚嶇О"
+ dataValue="HItemID"
+ :filterable="true"
+ :localdata="HSourceList"
+ :clear="false"
+ ></zxz-uni-data-select>
</view>
</view>
</view>
@@ -349,6 +355,7 @@
HCheckQty: 0,
//婧愬崟淇℃伅
HSourceBillQty: 0,
+ HSourceBillNo:'',
HSourceBillType: "3772",
//娴佽浆鍗′俊鎭�
HICMOBillNo: "",
@@ -529,12 +536,19 @@
count
} = res.data
if (count == 1) {
+ if(data[0]['HBack']==1){
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: data[0]['HBackRemark']
+ })
+ return;
+ }
this.hform.HMaterID = data[0]['HMaterID']
this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
//婧愬崟淇℃伅
- this.hform.HMainSourceBillNo = data[0]['HBillNo']
- this.hform.HSourceBillNo = data[0]['HBillNo']
+ this.hform.HMainSourceBillNo = data[0]['鍗曟嵁鍙�']
+ this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
this.hform.HMainSourceInterID = data[0].HInterID
this.hform.HMainSourceEntryID = data[0].HEntryID
this.hform.HSourceBillQty = data[0].娴佽浆鍗℃暟閲�
@@ -589,13 +603,21 @@
count
} = res.data
if (count == 1) {
+ //濡傛灉婧愬崟鏁伴噺瓒呭嚭鎻愮ず
+ if(data[0]['HBack']==1){
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: data[0]['HBackRemark']
+ })
+ return;
+ }
console.log('鑾峰彇婧愬崟锛�', data)
this.hform.HMaterID = data[0]['HMaterID']
this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
//婧愬崟淇℃伅
this.hform.HMainSourceBillNo = data[0]['HBillNo']
- this.hform.HSourceBillNo = data[0]['HBillNo']
+ this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
this.hform.HMainSourceInterID = data[0].HInterID
this.hform.HMainSourceEntryID = data[0].HEntryID
this.hform.HSourceBillQty = data[0].娴佽浆鍗℃暟閲�
@@ -868,6 +890,9 @@
,HMakeDate:this.hform.HMakeDate
,HReportType:1
,HSourceBillType:this.hform.HSourceBillType
+ ,HSourceBillNo:this.hform.HSourceBillNo
+ ,HSourceInterID:this.hform.HMainSourceInterID
+ ,HSourceEntryID:this.hform.HMainSourceEntryID
,HBadReasonHQty:1
,HQty:this.hform.HCheckQty
}
diff --git a/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue b/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
index fe425fb..6dc23a8 100644
--- a/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
+++ b/pages/ZLGL/checkFlowList/QC_CheckBillflowList.vue
@@ -69,6 +69,7 @@
<view class="op" v-if="operations == index">
<button class="op3" size="mini" plain @tap.stop="audit(item, 0)">瀹℃牳</button>
<button class="op3" size="mini" plain @tap.stop="audit(item, 1)">鍙嶅鏍�</button>
+ <button class="op3" size="mini" plain @tap.stop="fileUpload()">鏂囦欢涓婁紶</button>
<!-- <button class="op3" size="mini" plain @tap.stop="Reject(item)">椹冲洖</button> -->
<button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
</view>
@@ -77,7 +78,7 @@
<view class="over" v-if="listData.length == 0">鏆傛棤鏁版嵁</view>
<view class="over" v-if="listData.length != 0 && listData.length != showList.length">鍔犺浇涓�...</view>
<view class="over" v-if="listData.length != 0 && listData.length == showList.length">宸插埌搴�</view>
-
+ <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload>
</view>
</template>
@@ -97,6 +98,8 @@
return {
showDetail: -1,
operations : -1,
+ //涓婁紶鍙傛暟
+ uploadOptions: {},
hform: {
HSourceBillType:'8505',
HSourceBillTypeName: "棣栦欢妫�楠屽崟",
diff --git a/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue b/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
index 6ef0cb2..883975e 100644
--- a/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
+++ b/pages/ZLGL/lailiaojianyan/POStockInCheckBill.vue
@@ -780,6 +780,13 @@
count
} = res.data
if (count == 1) {
+ if(data[0]['HBack']==1){
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: data[0]['HBackRemark']
+ })
+ return;
+ }
console.log('鑾峰彇婧愬崟锛�', data)
this.hform.HMaterID = data[0]['HMaterID']
this.hform.HMaterName = data[0]['HMaterName']
@@ -881,6 +888,13 @@
count
} = res.data
if (count == 1) {
+ if(data[0]['HBack']==1){
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: data[0]['HBackRemark']
+ })
+ return;
+ }
this.hform.HMaterID = data[0]['HMaterID']
this.hform.HMaterName = data[0]['HMaterName']
this.hform.HMaterNumber = data[0]['HMaterNumber']
diff --git a/pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast.vue b/pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast.vue
index 37fb1b4..2710c7b 100644
--- a/pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast.vue
+++ b/pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast.vue
@@ -285,7 +285,7 @@
<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>
@@ -362,7 +362,7 @@
detailManifestCursor: 0, // 鏄庣粏娓呭崟绱㈠紩鎸囬拡
HCheckResultValueList: ["鍚堟牸", "涓嶅悎鏍�", "淇濈暀"],
- HUseResultValueList: ["鎺ユ敹", "璁╂鎺ユ敹", "鎸戦��(鍏ㄦ)", "鍒ら��"],
+ HUseResultValueList: ["鎺ユ敹", "璁╂鎺ユ敹"],
HCheckResultList: [{
value: 1,
text: "鍚堟牸"
@@ -373,6 +373,7 @@
value: 3,
text: "淇濈暀"
}],
+
HUseResultList: [{
value: "A",
text: "鎺ユ敹"
@@ -472,7 +473,15 @@
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 =
@@ -588,7 +597,7 @@
this.getCode(code)
})
},
- cmdAdd(){
+ cmdAdd() {
uni.redirectTo({
url: "/pages/ZLGL/lailiaojianyan_fast/Kf_QCStockInCheckBill_Fast"
})
@@ -607,7 +616,7 @@
"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,
diff --git a/pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue b/pages/ZLGL/mojianjianyan/ProcessCheckBill.vue
similarity index 99%
rename from pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue
rename to pages/ZLGL/mojianjianyan/ProcessCheckBill.vue
index f2ac772..b04deaa 100644
--- a/pages/ZLGL/mojianjianyan/lastPieceCheckBill.vue
+++ b/pages/ZLGL/mojianjianyan/ProcessCheckBill.vue
@@ -708,11 +708,18 @@
count
} = res.data
if (count == 1) {
+ if(data[0]['HBack']==1){
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: data[0]['HBackRemark']
+ })
+ return;
+ }
this.hform.HMaterID = data[0]['HMaterID']
this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
this.hform.HMainSourceBillNo = data[0]['HBillNo']
- this.hform.HSourceBillNo = data[0]['HBillNo']
+ this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
this.hform.HMainSourceInterID = data[0].HInterID
this.hform.HMainSourceEntryID = data[0].HEntryID
this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�
@@ -762,11 +769,18 @@
} = res.data
if (count == 1) {
console.log('鑾峰彇婧愬崟锛�', data)
+ if(data[0]['HBack']==1){
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: data[0]['HBackRemark']
+ })
+ return;
+ }
this.hform.HMaterID = data[0]['HMaterID']
this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
this.hform.HMainSourceBillNo = data[0]['HBillNo']
- this.hform.HSourceBillNo = data[0]['HBillNo']
+ this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
this.hform.HMainSourceInterID = data[0].HInterID
this.hform.HMainSourceEntryID = data[0].HEntryID
this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�
@@ -1933,7 +1947,7 @@
if (res.confirm) {
console.log("鐢ㄦ埛鐐瑰嚮纭畾");
uni.redirectTo({
- url: "/pages/ZLGL/mojianjianyan/form?operationType=1",
+ url: "/pages/ZLGL/mojianjianyan/ProcessCheckBill?operationType=1",
});
} else if (res.cancel) {
console.log("鐢ㄦ埛鐐瑰嚮鍙栨秷");
@@ -1958,7 +1972,7 @@
},
addNew() {
uni.redirectTo({
- url: "/pages/ZLGL/mojianjianyan/lastPieceCheckBillList?operationType=1",
+ url: "/pages/ZLGL/mojianjianyan/ProcessCheckBill?operationType=1",
});
},
goBack() {
diff --git a/pages/ZLGL/mojianjianyan/lastPieceCheckBillList.vue b/pages/ZLGL/mojianjianyan/ProcessCheckBillList.vue
similarity index 99%
rename from pages/ZLGL/mojianjianyan/lastPieceCheckBillList.vue
rename to pages/ZLGL/mojianjianyan/ProcessCheckBillList.vue
index e8571d7..23a4e45 100644
--- a/pages/ZLGL/mojianjianyan/lastPieceCheckBillList.vue
+++ b/pages/ZLGL/mojianjianyan/ProcessCheckBillList.vue
@@ -193,7 +193,7 @@
},
cmdAdd() {
uni.redirectTo({
- url: "/pages/ZLGL/mojianjianyan/lastPieceCheckBill?operationType=1"
+ url: "/pages/ZLGL/mojianjianyan/ProcessCheckBill?operationType=1"
})
},
async cmdSearch() {
diff --git a/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue b/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
index b2fde55..ef5dc7e 100644
--- a/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
+++ b/pages/ZLGL/shengchanrukujiaoyan/QC_LastPieceCheckBill_v2.vue
@@ -175,13 +175,13 @@
<input type="text" v-model="hform.HErrTreatment" value="" />
</view>
</view>
- <view class="form-item" v-if="false">
+ <view class="form-item" >
<view class="left">浠诲姟鍗曟暟閲�</view>
<view class="right">
<input type="number" v-model="hform.HICMOQty" />
</view>
</view>
- <view class="form-item" v-if="false">
+ <view class="form-item">
<view class="left">娴佽浆鍗℃暟閲�</view>
<view class="right">
<input type="number" v-model="hform.HProcExchQty" />
@@ -794,11 +794,18 @@
count
} = res.data
if (count == 1) {
+ if(data[0]['HBack']==1){
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: data[0]['HBackRemark']
+ })
+ return;
+ }
this.hform.HMaterID = data[0]['HMaterID']
this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
this.hform.HMainSourceBillNo = data[0]['HBillNo']
- this.hform.HSourceBillNo = data[0]['HBillNo']
+ this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
this.hform.HMainSourceInterID = data[0].HInterID
this.hform.HMainSourceEntryID = data[0].HEntryID
this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�
@@ -807,6 +814,7 @@
this.hform.HProcName = data[0]['褰撳墠宸ュ簭']
this.hform.HSourceBillQty = data[0].HSourceBillQty
this.hasSourceBill = true
+ this.hform.HProcExchQty = data[0]['娴佽浆鍗℃暟閲�']
this.get_CheckItem();
this.$refs['billList'].exit()
} else {
@@ -816,14 +824,7 @@
})
}
- if (
- (uni.getStorageSync("OrganizationID") == "7667152" &&
- uni.getStorageSync("Organization") == "CMR Technology Mexico S.A. de C.V.") ||
- (uni.getStorageSync("OrganizationID") == "100199" &&
- uni.getStorageSync("Organization") == "鏉窞鏂帿灏旂鎬ф潗鏂欐湁闄愬叕鍙�")
- ) {
- await this.GetCheckItemID(); // 瀹㈡埛涓烘柉鑾皵锛岃繘鍏ユ寜鐓ц川妫�鏂规琛ㄥご涓婄殑鐗╂枡缁戝畾甯﹀嚭榛樿鏂规
- }
+
} catch (err) {
CommonUtils.showTips({
title: '娓╅Θ鎻愮ず',
@@ -894,12 +895,18 @@
} = res.data
if (count == 1) {
console.log('data: ', data);
-
+ if(data[0]['HBack']==1){
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: data[0]['HBackRemark']
+ })
+ return;
+ }
this.hform.HMaterID = data[0]['HMaterID']
this.hform.HMaterName = data[0]['浜у搧鍚嶇О']
this.hform.HMaterNumber = data[0]['浜у搧浠g爜']
this.hform.HMainSourceBillNo = data[0]['HBillNo']
- this.hform.HSourceBillNo = data[0]['HBillNo']
+ this.hform.HSourceBillNo = data[0]['鍗曟嵁鍙�']
this.hform.HMainSourceInterID = data[0].HInterID
this.hform.HMainSourceEntryID = data[0].HEntryID
this.hform.HQCSchemeName = data[0].妫�楠屾柟妗堝悕绉�
@@ -907,6 +914,7 @@
this.hform.HProcID = data[0]['HProcID']
this.hform.HProcName = data[0]['褰撳墠宸ュ簭']
this.hform.HSourceBillQty = data[0].HSourceBillQty
+ this.hform.HProcExchQty = data[0]['娴佽浆鍗℃暟閲�']
this.hasSourceBill = true
this.get_CheckItem();
} else {
diff --git a/pages/ZLGL/style/MJBillStyle.scss b/pages/ZLGL/style/MJBillStyle.scss
new file mode 100644
index 0000000..21ebdbb
--- /dev/null
+++ b/pages/ZLGL/style/MJBillStyle.scss
@@ -0,0 +1,310 @@
+.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
+ }
+ }
\ No newline at end of file
diff --git a/pages/ZLGL/style/MJListStyle.scss b/pages/ZLGL/style/MJListStyle.scss
new file mode 100644
index 0000000..f27e690
--- /dev/null
+++ b/pages/ZLGL/style/MJListStyle.scss
@@ -0,0 +1,193 @@
+ .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%;
+ }
\ No newline at end of file
diff --git a/pages/caigourukujiaoyan/POStockInCheckBill.vue b/pages/caigourukujiaoyan/POStockInCheckBill.vue
index 01efad5..763ef78 100644
--- a/pages/caigourukujiaoyan/POStockInCheckBill.vue
+++ b/pages/caigourukujiaoyan/POStockInCheckBill.vue
@@ -17,20 +17,21 @@
</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">
@@ -243,6 +244,16 @@
}
}
},
+ 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
@@ -257,6 +268,73 @@
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);
@@ -490,15 +568,14 @@
// 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"])
+ }
}
}
},
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 5dfac23..c486320 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -337,6 +337,7 @@
"id": 26,
"hidden": false
},
+
],
}
diff --git a/pages/index/login.vue b/pages/index/login.vue
index 2b96a53..98a674d 100644
--- a/pages/index/login.vue
+++ b/pages/index/login.vue
@@ -81,7 +81,8 @@
import {
CommonUtils
} from "../../utils/common";
-import { getLanguagePackJson } from "../../utils/i18n";
+ import { getLanguagePackJson } from "../../utils/i18n";
+ import WebSocketServices from "@/utils/WebSocketServices";
export default {
components: {
hFormAlert
@@ -91,6 +92,7 @@
},
data() {
return {
+ WebSocketServices,
CommonUtils,
arrayDataBases: [],
DataBases: '',
@@ -105,7 +107,7 @@
"鏉窞鍑礉濂堢壒澶栫綉": '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/',
// 灏忓崼鍐呭缃�
@@ -116,12 +118,13 @@
"瀹佹尝鍥涚淮灏�-澶栫綉": "http://220.189.218.155:9010/API/",
// 閿﹂殕
"閿﹂殕-鏅鸿兘瀹跺眳": "http://192.168.1.11/API/",
+ "閿﹂殕-鏅鸿兘瀹跺眳-澶栫綉": "http://61.174.29.234:8880/API/",
// 鍗庤垷鍖呰
"瀹佹尝鍗庤垷鍖呰1": "http://192.168.110.222:8082/API_NW/",
"瀹佹尝鍗庤垷鍖呰2": "http://192.168.88.167:8082/API_NW/",
"瀹佹尝鍗庤垷鍖呰": "http://61.164.64.222:8082/API_WW/",
},
- serverUrlName: '娴欐睙鏅轰簯杩堟��',
+ serverUrlName:uni.getStorageSync('serverUrlName') || '娴欐睙鏅轰簯杩堟��',
arrayOrganization: [],
Organization: '',
@@ -194,6 +197,7 @@
let url = this.serverUrlandName[this.serverUrlName];
if (url != undefined) {
uni.setStorageSync('serverUrl', url)
+ uni.setStorageSync('serverUrlName', this.serverUrlName)
this.serverUrl = url
this.changeApi = false
this.getOrganization()
@@ -331,7 +335,14 @@
uni.setStorageSync('HWorkCenterName', res.data.data[0].HWorkCenterName);
uni.setStorageSync('HSecManagerID', res.data.data[0].HSecManagerID); //瀵瑰簲楠屾敹
uni.setStorageSync('HSecManagerName', res.data.data[0].HSecManagerName);
+ uni.setStorageSync('HProcID', res.data.data[0].HProcID);
+ uni.setStorageSync('HProcName', res.data.data[0].HProcName);
+ uni.setStorageSync('HSourceID', res.data.data[0].HSourceID);
+ uni.setStorageSync('HSourceName', res.data.data[0].HSourceName);
+ uni.setStorageSync('HGroupID', res.data.data[0].HGroupID);
+ uni.setStorageSync('HGroupName', res.data.data[0].HGroupName);
this.CommonUtils.setServerUrl(this.serverUrl)
+ this.WebSocketServices.createConnect(res.data.data[0].Czybm,res.data.data[0].Czymc);
uni.reLaunch({
url: '/pages/index/index'
})
diff --git a/pages/index/mine.vue b/pages/index/mine.vue
index 7ffbc22..1a0b49e 100644
--- a/pages/index/mine.vue
+++ b/pages/index/mine.vue
@@ -26,7 +26,8 @@
</template>
<script>
- import { getUserInfo } from "@/utils/auth.js";
+ import WebSocketServices from "../../utils/WebSocketServices";
+import { getUserInfo } from "@/utils/auth.js";
import {
CommonUtils
} from '@/utils/common'
@@ -99,6 +100,10 @@
success: function (res) {
if (res.confirm) {
console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ // 鏂紑Socket杩炴帴
+ WebSocketServices.closeSocket();
+ // 閿�姣� userInfo 缂撳瓨
+ uni.removeStorageSync("userinfo")
uni.reLaunch({
url:'/pages/index/login'
})
diff --git a/pages/index/tab1.vue b/pages/index/tab1.vue
index 1c72b32..541524a 100644
--- a/pages/index/tab1.vue
+++ b/pages/index/tab1.vue
@@ -70,6 +70,7 @@
id: 4,
hidden: false,
},
+
{
img: '../../static/icon/icon14.png',
text: '鎴戠殑鎶ュ伐骞冲彴',
@@ -86,8 +87,22 @@
id: 6,
hidden: false,
},
-
-
+ {
+ img: '../../static/icon/icon12.png',
+ text: '鍛樺伐绛惧埌璁板綍鍗�',
+ tip: '绔嬪嵆鏂板',
+ url: '/pages/EmployeeRecords/EmployeeRecordsBill',
+ id: 7,
+ hidden: false,
+ },
+ {
+ img: '../../static/icon/icon12.png',
+ text: '鍛樺伐绛惧埌璁板綍鍗曞垪琛�',
+ tip: '鐐瑰嚮杩涘叆',
+ url: '/pages/EmployeeRecords/EmployeeRecordsBillList',
+ id: 8,
+ hidden: false,
+ }
]
}
},
diff --git a/pages/index/tab2.vue b/pages/index/tab2.vue
index c02c270..18011ea 100644
--- a/pages/index/tab2.vue
+++ b/pages/index/tab2.vue
@@ -358,7 +358,7 @@
{
"img": "../../static/icon/icon8.png",
"text": "鏈欢妫�楠屽崟鍒楄〃",
- "url": "/pages/ZLGL/mojianjianyan/lastPieceCheckBillList",
+ "url": "/pages/ZLGL/mojianjianyan/ProcessCheckBillList",
"id": 43,
"hidden": false
},
diff --git a/pages/index/tab3.vue b/pages/index/tab3.vue
index f864579..46e036b 100644
--- a/pages/index/tab3.vue
+++ b/pages/index/tab3.vue
@@ -1,351 +1,378 @@
<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: '妯″叿妗f鏌ヨ',
- 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: '璁惧妗f鏌ヨ',
- 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: '妯″叿妗f鏌ヨ',
+ 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: '璁惧妗f鏌ヨ',
+ 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>
\ No newline at end of file
diff --git a/pages/index/tab4.vue b/pages/index/tab4.vue
index 85dbe89..8ce41ca 100644
--- a/pages/index/tab4.vue
+++ b/pages/index/tab4.vue
@@ -64,7 +64,7 @@
{
"img": "../../static/icon/icon8.png",
"text": "鏈欢妫�楠屽崟",
- "url": "/pages/ZLGL/mojianjianyan/lastPieceCheckBill?operationType=1",
+ "url": "/pages/ZLGL/mojianjianyan/ProcessCheckBill?operationType=1",
"id": 3,
"hidden": false
},
@@ -154,6 +154,20 @@
"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
+ },
]
}
diff --git a/pages/jishikucunchaxun/table.vue b/pages/jishikucunchaxun/table.vue
index 719d382..7988855 100644
--- a/pages/jishikucunchaxun/table.vue
+++ b/pages/jishikucunchaxun/table.vue
@@ -192,7 +192,7 @@
}
} else {
uni.showToast({
- title: '浠撲綅鏁版嵁璇锋眰澶辫触',
+ title: '浠撲綅鏁版嵁璇锋眰澶辫触'+res.Message,
icon: 'none'
})
}
diff --git a/pages/qitachukujiaoyan/qitachukudanjiaoyan.vue b/pages/qitachukujiaoyan/qitachukudanjiaoyan.vue
index 432a39a..f8a221a 100644
--- a/pages/qitachukujiaoyan/qitachukudanjiaoyan.vue
+++ b/pages/qitachukujiaoyan/qitachukudanjiaoyan.vue
@@ -20,19 +20,19 @@
<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">
@@ -196,6 +196,16 @@
components: {
FIFOListComponentVue
},
+ computed: {
+ arrayHStockPlaceNameComputed: {
+ get() {
+ // 鍔ㄦ�佽绠楀搴斾粨搴撶殑浠撲綅
+ return this.HStockPlaceNameList
+ .filter(e => e['鎵�灞炰粨搴�'] == this.hform.HWHName)
+ .map(e => e['浠撲綅鍚嶇О'])
+ }
+ }
+ },
data() {
return {
userInfo: getUserInfo(),
@@ -266,6 +276,73 @@
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: '鎻愮ず',
@@ -514,15 +591,14 @@
// 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"])
+ }
}
}
},
diff --git a/pages/qitarukujiaoyan/Kf_OtherInBillCheck.vue b/pages/qitarukujiaoyan/Kf_OtherInBillCheck.vue
index 74a35fb..1ca48ac 100644
--- a/pages/qitarukujiaoyan/Kf_OtherInBillCheck.vue
+++ b/pages/qitarukujiaoyan/Kf_OtherInBillCheck.vue
@@ -19,19 +19,19 @@
<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">
@@ -240,6 +240,16 @@
}
}
},
+ 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
@@ -252,6 +262,73 @@
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()
@@ -464,15 +541,14 @@
// 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"])
+ }
}
}
},
diff --git a/pages/shengchanbuliaojiaoyan/MateReplenishOutCheckBill.vue b/pages/shengchanbuliaojiaoyan/MateReplenishOutCheckBill.vue
index 24a691a..d308931 100644
--- a/pages/shengchanbuliaojiaoyan/MateReplenishOutCheckBill.vue
+++ b/pages/shengchanbuliaojiaoyan/MateReplenishOutCheckBill.vue
@@ -20,19 +20,19 @@
<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">
@@ -195,6 +195,16 @@
components: {
FIFOListComponentVue
},
+ computed: {
+ arrayHStockPlaceNameComputed: {
+ get() {
+ // 鍔ㄦ�佽绠楀搴斾粨搴撶殑浠撲綅
+ return this.HStockPlaceNameList
+ .filter(e => e['鎵�灞炰粨搴�'] == this.hform.HWHName)
+ .map(e => e['浠撲綅鍚嶇О'])
+ }
+ }
+ },
data() {
return {
userInfo: getUserInfo(),
@@ -265,6 +275,73 @@
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(() => {
@@ -485,15 +562,14 @@
// 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"])
+ }
}
}
},
diff --git a/pages/shengchandiaobo/MoveStockBill.vue b/pages/shengchandiaobo/MoveStockBill.vue
index c5ee5e3..b66fe04 100644
--- a/pages/shengchandiaobo/MoveStockBill.vue
+++ b/pages/shengchandiaobo/MoveStockBill.vue
@@ -21,17 +21,16 @@
<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">
@@ -45,19 +44,21 @@
<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>
@@ -270,6 +271,10 @@
HWHNameList: [],
arrayHStockPlaceName: [], //浠撲綅
HStockPlaceNameList: [],
+ arrayHWHInName: [], // 璋冨叆浠撳簱
+ HWHInNameList: [],
+ arrayHStockPlaceInName: [], //璋冨叆浠撲綅
+ HStockPlaceInNameList: [],
Materlist: [],
hform: {
@@ -315,6 +320,32 @@
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
@@ -326,8 +357,212 @@
}
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: '鎻愮ず',
@@ -461,15 +696,34 @@
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++) {
diff --git a/pages/shengchanlingliao/PPickingCheckBill.vue b/pages/shengchanlingliao/PPickingCheckBill.vue
index 71bcaf5..239d49b 100644
--- a/pages/shengchanlingliao/PPickingCheckBill.vue
+++ b/pages/shengchanlingliao/PPickingCheckBill.vue
@@ -20,18 +20,19 @@
<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">
@@ -268,6 +269,16 @@
HFIFOList: [], // 鍏堣繘鍏堝嚭鍒楄〃缂撳瓨
}
},
+ computed: {
+ arrayHStockPlaceNameComputed: {
+ get() {
+ // 鍔ㄦ�佽绠楀搴斾粨搴撶殑浠撲綅
+ return this.HStockPlaceNameList
+ .filter(e => e['鎵�灞炰粨搴�'] == this.hform.HWHName)
+ .map(e => e['浠撲綅鍚嶇О'])
+ }
+ }
+ },
components: {
BillListPopupVue,
FIFOListComponentVue
@@ -314,6 +325,73 @@
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({
@@ -584,13 +662,14 @@
// 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"])
+ }
}
}
},
diff --git a/pages/shengchanruku/ProductInCheckBill.vue b/pages/shengchanruku/ProductInCheckBill.vue
index c91c584..e648467 100644
--- a/pages/shengchanruku/ProductInCheckBill.vue
+++ b/pages/shengchanruku/ProductInCheckBill.vue
@@ -20,19 +20,19 @@
<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>
@@ -252,6 +252,16 @@
}
}
},
+ 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
@@ -264,6 +274,73 @@
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()
@@ -343,13 +420,12 @@
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"])
+ }
}
}
},
diff --git a/pages/tiaomachaima/tiaomachaima.vue b/pages/tiaomachaima/tiaomachaima.vue
index 7ff1d79..931a901 100644
--- a/pages/tiaomachaima/tiaomachaima.vue
+++ b/pages/tiaomachaima/tiaomachaima.vue
@@ -239,7 +239,7 @@
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({
diff --git a/pages/tiaomachaima/tiaomachaima2.vue b/pages/tiaomachaima/tiaomachaima2.vue
index 5f9c841..6d6b8ac 100644
--- a/pages/tiaomachaima/tiaomachaima2.vue
+++ b/pages/tiaomachaima/tiaomachaima2.vue
@@ -5,7 +5,7 @@
<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"
@@ -151,6 +151,7 @@
barCodeInfo: {
},
+ barCodeCall: false,
barCodeSplitInfo: [],
dialogVal: 0,
itemCache: {},
@@ -219,9 +220,13 @@
},
//鎽勫儚澶磋皟鐢�
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({
@@ -243,10 +248,12 @@
this.barCodeSplitInfo = []
// 鎵弿鏉$爜鍚庨噸缃寜閽姸鎬�
this.resetButtonState();
+ this.barCodeCall = false
}
},
(err) => {
console.err(err)
+ this.barCodeCall = false
}
)
},
diff --git a/pages/weiwailingliaojiaoyan/EntrustOutCheckBill.vue b/pages/weiwailingliaojiaoyan/EntrustOutCheckBill.vue
index 5c37658..d738ac6 100644
--- a/pages/weiwailingliaojiaoyan/EntrustOutCheckBill.vue
+++ b/pages/weiwailingliaojiaoyan/EntrustOutCheckBill.vue
@@ -20,19 +20,19 @@
<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">
@@ -201,6 +201,16 @@
components: {
FIFOListComponentVue
},
+ computed: {
+ arrayHStockPlaceNameComputed: {
+ get() {
+ // 鍔ㄦ�佽绠楀搴斾粨搴撶殑浠撲綅
+ return this.HStockPlaceNameList
+ .filter(e => e['鎵�灞炰粨搴�'] == this.hform.HWHName)
+ .map(e => e['浠撲綅鍚嶇О'])
+ }
+ }
+ },
data() {
return {
userInfo: getUserInfo(),
@@ -271,6 +281,73 @@
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(() => {
@@ -436,15 +513,14 @@
// 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"])
+ }
}
}
},
diff --git a/pages/xiaoshouchukujiaoyan/SellOutCheckBill.vue b/pages/xiaoshouchukujiaoyan/SellOutCheckBill.vue
index 49d6b35..4c5041f 100644
--- a/pages/xiaoshouchukujiaoyan/SellOutCheckBill.vue
+++ b/pages/xiaoshouchukujiaoyan/SellOutCheckBill.vue
@@ -20,21 +20,20 @@
<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>
@@ -254,6 +253,16 @@
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
@@ -268,6 +277,73 @@
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(() => {
@@ -433,15 +509,14 @@
// 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"])
+ }
}
}
},
diff --git a/utils/BasicInfo.js b/utils/BasicInfo.js
new file mode 100644
index 0000000..1d6863b
--- /dev/null
+++ b/utils/BasicInfo.js
@@ -0,0 +1,37 @@
+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()
+ }
+ })
+}
\ No newline at end of file
diff --git a/utils/WebSocketServices.js b/utils/WebSocketServices.js
new file mode 100644
index 0000000..b7838a9
--- /dev/null
+++ b/utils/WebSocketServices.js
@@ -0,0 +1,228 @@
+import {
+ CommonUtils
+} from "@/utils/common.js";
+
+class WebSocketServices {
+ constructor() {
+ this.wsInstance = null; // WebSocket 瀹炰緥
+ this.isConnecting = false; // 杩炴帴涓姸鎬侊紙閬垮厤骞跺彂閲嶈繛锛�
+ this.isConnected = false; // 宸茶繛鎺ョ姸鎬�
+ this.isReconnectStopped = false; // 鍋滄閲嶈繛鏍囪
+ this.wsUrl = CommonUtils.httpFormatWs(); // WebSocket 鍩虹鍦板潃
+
+ // 瓒呮椂鏍¢獙閰嶇疆
+ this.noMessageTimeout = 45000; // 45绉掑唴娌℃敹鍒颁换浣曚笟鍔℃秷鎭� 鈫� 鍒ゅ畾杩炴帴澶辨晥锛堟湇鍔$30绉掑彂涓�娆ing锛岀暀15绉掑閿欙級
+ this.noMessageTimer = null; // 鏃犳秷鎭秴鏃跺畾鏃跺櫒
+
+ // 鐩戝惉鍑芥暟寮曠敤
+ this.openListener = null;
+ this.messageListener = null;
+ this.closeListener = null;
+ this.errorListener = null;
+
+ // 缂撳瓨鐢ㄦ埛淇℃伅
+ this.currentUserId = "";
+ this.currentUserName = "";
+ }
+
+ /**
+ * 寤虹珛 WebSocket 杩炴帴
+ * @param {string/number} userId - 鐢ㄦ埛ID锛堝繀濉級
+ * @param {string} userName - 鐢ㄦ埛鍚嶏紙蹇呭~锛�
+ * @param {number} count - 褰撳墠閲嶈繛娆℃暟
+ * @param {number} limit - 鏈�澶ч噸杩炴鏁帮紙榛樿3娆★級
+ */
+ createConnect(userId, userName, count = 0, limit = 3) {
+ // 缂撳瓨鐢ㄦ埛淇℃伅锛堢敤浜庨噸杩烇級
+ this.currentUserId = userId;
+ this.currentUserName = userName;
+
+ // 鍓嶇疆鏍¢獙锛氶伩鍏嶆棤鏁堣繛鎺ュ拰骞跺彂閲嶈繛
+ if (this.isConnecting || this.isConnected) return;
+ if (!userId && userId !== 0) { // 鍏煎 userId 涓� 0 鐨勫悎娉曞満鏅�
+ CommonUtils.showTips({ message: "鐢ㄦ埛鏍囪瘑涓嶈兘涓虹┖锛屾棤娉曞缓绔媁ebSocket杩炴帴" });
+ return;
+ }
+ if (count > limit) {
+ CommonUtils.showTips({
+ message: `WebSocket 閲嶈繛娆℃暟瓒呭嚭鏈�澶ч檺鍒讹紙${limit}娆★級锛屽凡鍋滄閲嶈繛`,
+ });
+ this.isReconnectStopped = true;
+ return;
+ }
+
+ console.log(`[WebSocket] 寮�濮嬪缓绔嬭繛鎺ワ紙绗� ${count || 0} 娆★級`, {
+ wsUrl: this.wsUrl,
+ userId,
+ userName,
+ });
+
+ // 娓呴櫎鍘嗗彶娈嬬暀锛氱洃鍚�+瀹氭椂鍣�
+ this.clearAllListeners();
+ this.clearNoMessageTimer();
+
+ // 鍙戣捣杩炴帴
+ this.isConnecting = true;
+ this.wsInstance = uni.connectSocket({
+ url: `${this.wsUrl}?userId=${encodeURIComponent(userId)}&userName=${encodeURIComponent(userName)}`,
+ fail: (error) => {
+ console.error("[WebSocket] 杩炴帴鍙戣捣澶辫触", error);
+ this.isConnecting = false;
+ this.triggerReconnect(count);
+ },
+ });
+
+ // 鐩戝惉杩炴帴鎴愬姛锛氬惎鍔ㄦ棤娑堟伅瓒呮椂鏍¢獙
+ this.openListener = uni.onSocketOpen((res) => {
+ console.log("[WebSocket] 杩炴帴寤虹珛鎴愬姛", res);
+ this.isConnecting = false;
+ this.isConnected = true;
+ this.isReconnectStopped = false;
+ this.startNoMessageCheck();
+ count = 0;
+ });
+
+ this.messageListener = uni.onSocketMessage((res) => {
+ try {
+ const message = JSON.parse(res.data);
+ console.log("[WebSocket] 鏀跺埌涓氬姟娑堟伅", message);
+
+ // 閲嶇疆鏃犳秷鎭畾鏃跺櫒锛堟湁涓氬姟娑堟伅=杩炴帴姝e父锛�
+ this.resetNoMessageTimer();
+
+ // 澶勭悊涓氬姟娑堟伅
+ if (message.Type === "Message") {
+ const content = JSON.parse(message.Content);
+ this.showTaskTip(`鎮ㄦ湁${content.length}鏉℃秷鎭渶瑕佸鐞�!`);
+ // this.emit("message", content); // 鏀寔澶栭儴鐩戝惉
+ }
+ } catch (error) {
+ console.error("[WebSocket] 娑堟伅瑙f瀽澶辫触", error, res.data);
+ }
+ });
+
+ // 鐩戝惉杩炴帴鍏抽棴锛氫粎寮傚父鍏抽棴瑙﹀彂閲嶈繛
+ this.closeListener = uni.onSocketClose((res) => {
+ console.log("[WebSocket] 杩炴帴鍏抽棴", res);
+ this.isConnecting = false;
+ this.isConnected = false;
+ this.clearNoMessageTimer();
+
+ // 姝e父鍏抽棴锛坈ode=1000锛夋垨涓诲姩鍋滄閲嶈繛鏃讹紝涓嶉噸杩�
+ if (!this.isReconnectStopped && res.code !== 1000) {
+ this.triggerReconnect(count);
+ }
+ });
+
+ // 鐩戝惉杩炴帴閿欒锛氳Е鍙戦噸杩�
+ this.errorListener = uni.onSocketError((error) => {
+ console.error("[WebSocket] 杩炴帴閿欒", error);
+ this.isConnecting = false;
+ this.clearNoMessageTimer();
+ if (!this.isReconnectStopped) {
+ this.triggerReconnect(count);
+ }
+ });
+ }
+
+ /**
+ * 缁熶竴瑙﹀彂閲嶈繛锛堝欢杩�3绉掞級
+ * @param {number} count - 褰撳墠閲嶈繛娆℃暟
+ */
+ triggerReconnect(count) {
+ console.log(`[WebSocket] 鍑嗗绗� ${count + 1} 娆¢噸杩瀈);
+ setTimeout(() => {
+ this.createConnect(this.currentUserId, this.currentUserName, count + 1);
+ }, 3000);
+ }
+
+ /**
+ * 鍚姩鈥滄棤涓氬姟娑堟伅鈥濊秴鏃舵牎楠�
+ * 閫昏緫锛�45绉掑唴娌℃敹鍒颁换浣曚笟鍔℃秷鎭� 鈫� 鍒ゅ畾杩炴帴澶辨晥锛堟湇鍔$30绉掑彂Ping锛屽簳灞傚凡澶勭悊锛屾澶勪粎鏍¢獙涓氬姟閫氶亾锛�
+ */
+ startNoMessageCheck() {
+ this.clearNoMessageTimer();
+ this.noMessageTimer = setTimeout(() => {
+ console.warn("[WebSocket] 45绉掓湭鏀跺埌涓氬姟娑堟伅锛屽垽瀹氳繛鎺ュけ鏁堬紝涓诲姩閲嶈繛");
+ this.closeSocket();
+ this.createConnect(this.currentUserId, this.currentUserName);
+ }, this.noMessageTimeout);
+ }
+
+ /**
+ * 鏀跺埌涓氬姟娑堟伅鍚庯紝閲嶇疆鏃犳秷鎭畾鏃跺櫒
+ */
+ resetNoMessageTimer() {
+ this.startNoMessageCheck();
+ }
+
+ /**
+ * 娓呴櫎鏃犳秷鎭畾鏃跺櫒
+ */
+ clearNoMessageTimer() {
+ if (this.noMessageTimer) {
+ clearTimeout(this.noMessageTimer);
+ this.noMessageTimer = null;
+ }
+ }
+
+ /**
+ * 娓呴櫎鎵�鏈� Socket 鐩戝惉
+ */
+ clearAllListeners() {
+ if (this.openListener) {
+ uni.offSocketOpen(this.openListener);
+ this.openListener = null;
+ }
+ if (this.messageListener) {
+ uni.offSocketMessage(this.messageListener);
+ this.messageListener = null;
+ }
+ if (this.closeListener) {
+ uni.offSocketClose(this.closeListener);
+ this.closeListener = null;
+ }
+ if (this.errorListener) {
+ uni.offSocketError(this.errorListener);
+ this.errorListener = null;
+ }
+ }
+
+ /**
+ * 涓诲姩鍏抽棴 WebSocket 杩炴帴 (鐧诲嚭鏃跺叧闂璚ebSocket杩炴帴)
+ */
+ closeSocket() {
+ this.isReconnectStopped = true;
+ this.clearAllListeners();
+ this.clearNoMessageTimer();
+
+ if (this.wsInstance) {
+ uni.closeSocket({
+ success: () => console.log("[WebSocket] 涓诲姩鍏抽棴杩炴帴鎴愬姛"),
+ fail: (error) => console.error("[WebSocket] 涓诲姩鍏抽棴杩炴帴澶辫触", error),
+ });
+ this.wsInstance = null;
+ }
+
+ this.isConnected = false;
+ this.isConnecting = false;
+ }
+
+
+ showTaskTip(Content) {
+ // #ifdef APP-PLUS || APP
+ 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()
\ No newline at end of file
diff --git a/utils/common.js b/utils/common.js
index 2002e39..4c609a4 100644
--- a/utils/common.js
+++ b/utils/common.js
@@ -494,6 +494,21 @@
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()
\ No newline at end of file
--
Gitblit v1.9.1