From 04b8cce533af3e8626148d315dc44f561ac5496f Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期二, 20 一月 2026 18:03:23 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day.vue | 203 +++
pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai.vue | 87
pages/index/tab3.vue | 7
pages.json | 214 ++-
pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill.vue | 475 +++++++
pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess.vue | 220 +++
pages/MJGL/Sb_EquipStop/Sb_EquipStopBill.vue | 480 +++++++
pages/shebeiyunxingzhuangtai/detail.vue | 1011 ++++++++-------
pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery.vue | 213 +++
pages/shebeilvli/EquipFileBillResume.vue | 856 ++++++------
pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue | 47
11 files changed, 2,805 insertions(+), 1,008 deletions(-)
diff --git a/pages.json b/pages.json
index 18b91df..3f5f238 100644
--- a/pages.json
+++ b/pages.json
@@ -1512,91 +1512,139 @@
"style": {
"navigationBarTitleText": "璁惧缁翠慨楠屾敹鍗曠紦瀛�"
}
- },
- {
- "path": "pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill",
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill",
"style": {
- "navigationBarTitleText": "璁惧缁翠慨娲惧伐鍗�"
- }
- },
- {
- "path": "pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBillList",
- "style": {
- "navigationBarTitleText": "璁惧缁翠慨娲惧伐鍗曠紦瀛�"
- }
- },
- {
- "path": "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill",
- "style": {
- "navigationBarTitleText": "鍣ㄥ叿缁翠慨娲惧伐鍗�"
- }
- },
- {
- "path": "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBillList",
- "style": {
- "navigationBarTitleText": "鍣ㄥ叿缁翠慨娲惧伐鍗曠紦瀛�"
- }
- },
- {
- "path": "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill",
- "style": {
- "navigationBarTitleText": "鍣ㄥ叿缁翠慨楠屾敹鍗�"
- }
- },
- {
- "path": "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBillList",
- "style": {
- "navigationBarTitleText": "鍣ㄥ叿缁翠慨楠屾敹鍗曠紦瀛�"
- }
- },
- {
- "path": "pages/ZLGL/OA_WorkLink/OA_WorkLinkBill",
- "style": {
- "navigationBarTitleText": "宸ヤ綔鑱旂郴鍗�"
- }
- },
- {
- "path": "pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList",
- "style": {
- "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": "鍛樺伐绛惧埌璁板綍琛ㄥ垪琛�"
- }
- },
- {
- "path": "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill",
- "style": {
- "navigationBarTitleText": "璁惧鏁呴殰鐧昏鍗�"
- }
- }, {
- "path": "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBillList",
- "style": {
- "navigationBarTitleText": "璁惧鏁呴殰鐧昏鍗曞垪琛�"
- }
- }
+ "navigationBarTitleText" : "璁惧缁翠慨娲惧伐鍗�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBillList",
+ "style": {
+ "navigationBarTitleText" : "璁惧缁翠慨娲惧伐鍗曠紦瀛�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBill",
+
+ "style": {
+ "navigationBarTitleText" : "鍣ㄥ叿缁翠慨娲惧伐鍗�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sc_MouldRepairSendWork/Sc_MouldRepairSendWorkBillList",
+
+ "style": {
+ "navigationBarTitleText" : "鍣ㄥ叿缁翠慨娲惧伐鍗曠紦瀛�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBill",
+
+ "style": {
+ "navigationBarTitleText" : "鍣ㄥ叿缁翠慨楠屾敹鍗�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/SC_MouldRepairCheck/Sc_MouldRepairCheckBillList",
+
+ "style": {
+ "navigationBarTitleText" : "鍣ㄥ叿缁翠慨楠屾敹鍗曠紦瀛�"
+ }
+ },
+ {
+ "path" : "pages/ZLGL/OA_WorkLink/OA_WorkLinkBill",
+
+ "style": {
+ "navigationBarTitleText" : "宸ヤ綔鑱旂郴鍗�"
+ }
+ },
+ {
+ "path" : "pages/ZLGL/OA_WorkLink/OA_WorkLinkBillList",
+
+ "style": {
+ "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" : "鍛樺伐绛惧埌璁板綍琛ㄥ垪琛�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill",
+
+ "style": {
+ "navigationBarTitleText" : "璁惧鏁呴殰鐧昏鍗�"
+ }
+ },{
+ "path" : "pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBillList",
+
+ "style": {
+ "navigationBarTitleText" : "璁惧鏁呴殰鐧昏鍗曞垪琛�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill",
+ "style" :
+ {
+ "navigationBarTitleText" : "璁惧寮�鏈哄崟"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipStop/Sb_EquipStopBill",
+ "style" :
+ {
+ "navigationBarTitleText" : ""
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day",
+ "style" :
+ {
+ "navigationBarTitleText" : "鐐规娓呭崟"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery",
+ "style" :
+ {
+ "navigationBarTitleText" : "璁惧灞ュ巻"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess",
+ "style" :
+ {
+ "navigationBarTitleText" : "璁惧宸ヨ壓璺嚎"
+ }
+ }
+
],
"tabBar": {
diff --git a/pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill.vue b/pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill.vue
new file mode 100644
index 0000000..bbdae80
--- /dev/null
+++ b/pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill.vue
@@ -0,0 +1,475 @@
+<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="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 required">璁惧:</view>
+ <!-- <zxz-uni-data-select required class="right" :localdata="HDeptList" dataKey="閮ㄩ棬鍚嶇О"
+ dataValue="HItemID" v-model="hform.HEquipName">
+
+ </zxz-uni-data-select> -->
+ <view class="righton">
+ <input disabled v-model="hform.HEquipName" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title required">鍏宠仈涓昏澶�:</view>
+ <!-- <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
+ dataValue="HItemID" v-model="hform.HEquipRelationName">
+
+ </zxz-uni-data-select> -->
+ <view class="righton">
+ <input disabled v-model="hform.HEquipRelationName" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title required">寮�鏈轰汉:</view>
+ <!-- <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
+ dataValue="HItemID" v-model="hform.HBeginEmpName">
+
+ </zxz-uni-data-select> -->
+ <view class="righton">
+ <input disabled v-model="hform.HBeginEmpName" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">寮�鏈烘椂闂�:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HBeginTime" />
+ </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>
+ <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> -->
+ </view>
+</template>
+
+<script>
+ import dayjs from "dayjs";
+ import {
+ CommonUtils
+ } from "@/utils/common";
+ import {
+ MpaasScan
+ } from "@/utils/mpaasScan.js"
+ import {
+ getUserInfo
+ } from "../../../utils/auth";
+ export default {
+ // 璁惧寮�鏈哄崟
+ name: 'Sb_EquipBeginBill',
+ data() {
+ return {
+ tabs: 0,
+ HMainSourceBillType: "",
+ btnTop: 0,
+ tabsBottom: 0,
+ HModName: "Sb_EquipBeginBill",
+ HBillType: '3917',
+ operationType: 1,
+ uploadOptions: {},
+ enableEdit: true,
+
+ HDeptList: [],
+ HRepairCheckList: [],
+ HEmpList: [],
+ HRepairList: [],
+
+ hform: {
+ "HBillNo": "",
+ "HInterID": "0",
+ "HDate": dayjs(new Date()).format("YYYY-MM-DD"),
+ "HEquipName": "",
+ "HEquipID": "0",
+ "HEquipRelationName": "",
+ "HEquipRelationID": "0",
+ "HBeginEmpName": getUserInfo()["HEmpName"],
+ "HBeginEmpID": getUserInfo()["HEmpID"],
+ "HBeginTime": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
+ "HRemark": "",
+ HMaker: getUserInfo()["Czymc"],
+ HChecker: '',
+ HCloseMan: '',
+ HUpDater: '',
+ HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ HCheckDate: '',
+ HCloseDate: '',
+ HUpDateDate: '',
+ HDeleteMan: '',
+ HDeleteDate: ''
+ },
+ };
+ },
+ computed: {
+ containerHeight: {
+ get() {
+ return this.btnTop - this.tabsBottom - 5
+ }
+ },
+ },
+ methods: {
+ // 缁翠慨椤圭洰
+ async getRepairList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Repair/GetRepairList',
+ data: {
+ sWhere: '',
+ user: getUserInfo()["Czymc"]
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HRepairList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇妫�楠岄」鐩け璐�: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇妫�楠岄」鐩け璐�: ${err}`
+ })
+ }
+ },
+ // 鍒犻櫎鏄庣粏
+ delDetail(item) {
+
+ },
+ // 鎻愪氦鏁版嵁鏈夋晥鎬ф牎楠�
+ ValidCheck() {
+ if (this.hform.HEquipID == 0) {
+ return {
+ Message: "鏈綍鍏ヨ澶囦俊鎭紝璇峰厛褰曞叆璁惧淇℃伅!",
+ state: false
+ }
+ }
+
+ if (this.hform.HEmpID == 0) {
+ return {
+ Message: "楠屾敹浜轰笉寰椾负绌�!",
+ state: false
+ }
+ }
+
+ return {
+ Message: "",
+ state: true
+ }
+ },
+ addNew() {
+ uni.redirectTo({
+ url: './Sb_EquipRepairSendWorkBill?operationType=1'
+ })
+ },
+ goBack() {
+ uni.navigateBack()
+ },
+ checkBoxChangeHandler(index, e) {
+ let cr = e.detail.value
+ if (cr.length == 0) {
+ this.HCheckFileList[index]["HDotCheckResult"] = false
+ } else {
+ this.HCheckFileList[index]["HDotCheckResult"] = true
+ }
+ },
+ radioChange({
+ detail: {
+ value
+ }
+ }) {
+ this.hform.HCheckResult = value
+ },
+ 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 = data[0]["HInterID"]
+ this.hform.HBillNo = data[0]["HBillNo"]
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇鍗曟嵁淇℃伅寮傚父: " + err
+ })
+ }
+ },
+ async set_CheckBill(HInterID, num) {
+ try{
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Sb_EquipBeginBill/AuditSb_EquipBeginBill",
+ data: {
+ HInterID: HInterID,
+ type: num,
+ user: getUserInfo()['Czymc']
+ }
+ })
+
+ if(res.count == 1) {
+ return
+ }else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "璁惧寮�鏈哄崟瀹℃牳澶辫触: " + res.Message
+ })
+ }
+ }catch(err){
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "璁惧寮�鏈哄崟瀹℃牳澶辫触: " + err
+ })
+ }
+ },
+ async submit() {
+ let valid = this.ValidCheck()
+ if (!valid.state) {
+ CommonUtils.showTips({
+ message: valid.Message
+ })
+ return
+ }
+
+ try {
+ let oMain = JSON.stringify(this.hform);
+ let sMainSub = oMain + ';Add' + `;${getUserInfo()['Czymc']}`;
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Sb_EquipBeginBill/Save锘縎b_EquipBeginBillMain",
+ data: {
+ "sMainSub": sMainSub
+ },
+ method: "POST"
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ if (data.Verify == "Y") { //鑷姩瀹℃牳
+ set_checkBill(data.HInterID, 1)
+ }
+
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '杩斿洖涓婄骇椤甸潰',
+ showCancel: false,
+ success: (res) => {
+ if (res.confirm) {
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ } else if (res.cancel) {
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + Message
+ })
+ }
+
+
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + err
+ })
+ }
+ },
+ async getEquipInfo() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Gy_EquipFileMain/getSb_EquipList",
+ data: {
+ HInterID: this.hform.HEquipID,
+ user: getUserInfo()['Czymc']
+ }
+ })
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+
+ if (count == 1) {
+ console.log('data: ', data);
+
+ this.hform.HEquipID = data[0].hmainid
+ this.hform.HEquipName = data[0].璁惧鍚嶇О
+ this.hform.HEquipRelationID = data[0].HMainSourceID
+ this.hform.HEquipRelationName = data[0].鎵�灞炰富鐢熶骇璁惧
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇璁惧淇℃伅澶辫触: " + Message
+ })
+ }
+
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇璁惧淇℃伅澶辫触: " + err
+ })
+ }
+ }
+ },
+ onLoad(e) {
+ console.log('e: ', e);
+ if (!e.operationType) {
+ this.operationType = 1
+ } else {
+ this.operationType = e.operationType
+ }
+
+ if (this.operationType == 1) {
+ this.hform.HEquipID = e.HEquipID
+ // 鏂板
+ this.getMaxNum()
+ this.getEquipInfo()
+ } else if (this.operationType == 2) {
+ // 澶嶅埗
+ } else if (this.operationType == 3) {
+ // 缂栬緫
+
+ } else if (this.operationType == 4) {
+ // 娴忚
+
+ }
+ },
+ 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/MJGL/style/MJBillStyle.scss"
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue b/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue
index bfaeae4..3fc78e3 100644
--- a/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue
+++ b/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill.vue
@@ -752,7 +752,7 @@
if (code == 1) {
data = data.h_v_Sb_EquipConkBookBillList_Edit[0]
-
+
this.enableEdit = false
} else {
CommonUtils.showTips({
@@ -765,6 +765,46 @@
CommonUtils.showTips({
title: '娓╅Θ鎻愮ず',
message: `鑾峰彇鏁呴殰鐧昏鍗曞け璐�: ${err}`
+ })
+ }
+ },
+ async GetEquipInfo(HEquipID) {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Gy_EquipFileMain/getSb_EquipList",
+ data: {
+ HInterID: HEquipID,
+ user: getUserInfo()["Czymc"]
+ }
+ })
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ console.log('data: ',data);
+ Object.assign(this.hform, {
+ HDeptID: data[0]["HDeptID"],
+ HDeptName: data[0]["浣跨敤閮ㄩ棬"],
+ HEquipID: data[0]["hmainid"],
+ HBarName: data[0]["璁惧鍚嶇О"],
+ HBarModel: data[0]["璁惧瑙勬牸"],
+ HBarSpec: data[0]["璁惧鍨嬪彿"],
+ HEmpID: getUserInfo()["HEmpID"],
+ HManagerID: data[0]["HRepairEmpID"]
+ })
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧鏁版嵁澶辫触: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧鏁版嵁澶辫触: ${err}`
})
}
}
@@ -788,7 +828,10 @@
this.getEditData(hmainid)
} else if (this.operationType == 4) {
- // 娴忚
+ // 鎶ュ伐骞冲彴涓嬫帹
+ let HEquipID = e.HEquipID
+ this.getMaxNum()
+ this.GetEquipInfo(HEquipID)
}
diff --git a/pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery.vue b/pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery.vue
new file mode 100644
index 0000000..e91db0f
--- /dev/null
+++ b/pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery.vue
@@ -0,0 +1,213 @@
+<template>
+ <view class="content">
+ <view id="divide" style="width: 100%;height: 0rpx;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.鍗曟嵁鍙�" style="margin: 10px;">
+ <view class="card-detail">
+ <template v-for="(field, index) in CommonUtils.emptyValueFilter(item, HFieldList)">
+ <view v-if="field.ColmType == 'DateTime'" class="detail">
+ <text>{{field.ColmCols}}锛�</text>{{dayjs(item[field.ColmCols]).format("YYYY-MM-DD HH:mm:ss")}}
+ </view>
+ <view v-else class="detail">
+ <text>{{field.ColmCols}}锛�</text>{{item[field.ColmCols]}}
+ </view>
+ </template>
+ </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,
+ CommonUtils,
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ tabs: 0,
+ urls: '/Gy_EquipFileMain/GetResumeList',
+ MvarReportTitle: '璁惧灞ュ巻',
+ hform: {
+ HInterID: 0,
+ HBillNo: '',
+ HSourceBillNo: '',
+ user: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ operationType: "4",
+ sWhere: "",
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ HFieldList: [], // 瀛楁鍒楄〃
+ 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.changeTab(0)
+ console.log(this.userInfo, uni.getStorageSync('HUserName'))
+ },
+ components: {
+ BarCodePopupVue
+ },
+ 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()
+ },
+ onPaginationChangeHandler({
+ current
+ }) {
+ this.page = current
+ this.showList = this.getPage(current, this.size, this.listData)
+ },
+ 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 = '/Gy_EquipFileMain/GetResumeList'
+ }
+ // 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: this.hform
+ })
+
+ let {
+ count,
+ data,
+ Message,
+ list
+ } = res.data
+
+ if (count == 1) {
+ if (data == null) {
+ data = []
+ }
+ this.listData = data
+ console.log('data: ', data);
+ this.showList = this.getPage(this.page, this.size, data)
+ this.dataLength = data.length
+ this.HFieldList = CommonUtils.fieldListFilterRole({
+ FieldList: list,
+ ExcludeKeys: ["鍗曟嵁鍙�"]
+ }).data
+
+ console.log('this.HFieldList: ', this.HFieldList);
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧灞ュ巻澶辫触: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧灞ュ巻澶辫触: ${err}`
+ })
+ }
+
+ },
+ search() {
+ this.hform.sWhere = ''
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ this.hform.sWhere = {
+ Type: this.hform.Type,
+ HInterId: this.hform.HInterId
+ }
+
+ this.getList()
+ },
+ },
+ onLoad(e) {
+ let {
+ operationType,
+ HEquipID
+ } = e
+
+ if (operationType == 4) {
+ this.HInterID = HEquipID
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ @import "@/pages/MJGL/style/MJListStyle.scss"
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/Sb_EquipStop/Sb_EquipStopBill.vue b/pages/MJGL/Sb_EquipStop/Sb_EquipStopBill.vue
new file mode 100644
index 0000000..c19cc6b
--- /dev/null
+++ b/pages/MJGL/Sb_EquipStop/Sb_EquipStopBill.vue
@@ -0,0 +1,480 @@
+<template>
+ <view>
+ <view class="tabs" id="tabs">
+ <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">鍩烘湰淇℃伅</view>
+ <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">鍏朵粬淇℃伅</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="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 required">璁惧:</view>
+ <!-- <zxz-uni-data-select required class="right" :localdata="HDeptList" dataKey="閮ㄩ棬鍚嶇О"
+ dataValue="HItemID" v-model="hform.HEquipName">
+
+ </zxz-uni-data-select> -->
+ <view class="righton">
+ <input disabled v-model="hform.HEquipName" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title required">鍏宠仈涓昏澶�:</view>
+ <!-- <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
+ dataValue="HItemID" v-model="hform.HEquipRelationName">
+
+ </zxz-uni-data-select> -->
+ <view class="righton">
+ <input disabled v-model="hform.HEquipRelationName" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title required">鍋滄満浜�:</view>
+ <!-- <zxz-uni-data-select required class="right" :localdata="HEmpList" dataKey="HName"
+ dataValue="HItemID" v-model="hform.HBeginEmpName">
+
+ </zxz-uni-data-select> -->
+ <view class="righton">
+ <input disabled v-model="hform.HStopEmpName" placeholder="" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍋滄満鏃堕棿:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HStopTime" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍋滄満鍘熷洜:</view>
+ <view class="right">
+ <textarea v-model="hform.HStopReason" 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>
+ <!-- <xe-upload ref="XeUpload" :options="uploadOptions" @callback="handleUploadCallback"></xe-upload> -->
+ </view>
+</template>
+
+<script>
+ import dayjs from "dayjs";
+ import {
+ CommonUtils
+ } from "@/utils/common";
+ import {
+ MpaasScan
+ } from "@/utils/mpaasScan.js"
+ import {
+ getUserInfo
+ } from "../../../utils/auth";
+ export default {
+ // 璁惧鍋滄満鍗�
+ name: 'Sb_EquipBeginBill',
+ data() {
+ return {
+ tabs: 0,
+ HMainSourceBillType: "",
+ btnTop: 0,
+ tabsBottom: 0,
+ HModName: "Sb_EquipStopBillMain",
+ HBillType: '3918',
+ operationType: 1,
+ uploadOptions: {},
+ enableEdit: true,
+
+ HDeptList: [],
+ HRepairCheckList: [],
+ HEmpList: [],
+ HRepairList: [],
+
+ hform: {
+ "HBillNo": "",
+ "HInterID": "0",
+ "HDate": dayjs(new Date()).format("YYYY-MM-DD"),
+ "HEquipName": "",
+ "HEquipID": "0",
+ "HEquipRelationName": "",
+ "HEquipRelationID": "0",
+ "HStopEmpName": getUserInfo()["HEmpName"],
+ "HStopEmpID": getUserInfo()["HEmpID"],
+ "HStopTime": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
+ "HRemark": "",
+ "HStopReason": "",
+ HMaker: getUserInfo()["Czymc"],
+ HChecker: '',
+ HCloseMan: '',
+ HUpDater: '',
+ HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ HCheckDate: '',
+ HCloseDate: '',
+ HUpDateDate: '',
+ HDeleteMan: '',
+ HDeleteDate: ''
+ },
+ };
+ },
+ computed: {
+ containerHeight: {
+ get() {
+ return this.btnTop - this.tabsBottom - 5
+ }
+ },
+ },
+ methods: {
+ // 缁翠慨椤圭洰
+ async getRepairList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Repair/GetRepairList',
+ data: {
+ sWhere: '',
+ user: getUserInfo()["Czymc"]
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HRepairList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇妫�楠岄」鐩け璐�: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇妫�楠岄」鐩け璐�: ${err}`
+ })
+ }
+ },
+ // 鍒犻櫎鏄庣粏
+ delDetail(item) {
+
+ },
+ // 鎻愪氦鏁版嵁鏈夋晥鎬ф牎楠�
+ ValidCheck() {
+ if (this.hform.HEquipID == 0) {
+ return {
+ Message: "鏈綍鍏ヨ澶囦俊鎭紝璇峰厛褰曞叆璁惧淇℃伅!",
+ state: false
+ }
+ }
+
+ if (this.hform.HEmpID == 0) {
+ return {
+ Message: "楠屾敹浜轰笉寰椾负绌�!",
+ state: false
+ }
+ }
+
+ return {
+ Message: "",
+ state: true
+ }
+ },
+ addNew() {
+ uni.redirectTo({
+ url: './Sb_EquipRepairSendWorkBill?operationType=1'
+ })
+ },
+ goBack() {
+ uni.navigateBack()
+ },
+ checkBoxChangeHandler(index, e) {
+ let cr = e.detail.value
+ if (cr.length == 0) {
+ this.HCheckFileList[index]["HDotCheckResult"] = false
+ } else {
+ this.HCheckFileList[index]["HDotCheckResult"] = true
+ }
+ },
+ radioChange({
+ detail: {
+ value
+ }
+ }) {
+ this.hform.HCheckResult = value
+ },
+ 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 = data[0]["HInterID"]
+ this.hform.HBillNo = data[0]["HBillNo"]
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇鍗曟嵁淇℃伅寮傚父: " + err
+ })
+ }
+ },
+ async set_CheckBill(HInterID, num) {
+ try{
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Sb_EquipStopBill/AuditSb_EquipStopBill",
+ data: {
+ HInterID: HInterID,
+ type: num,
+ user: getUserInfo()['Czymc']
+ }
+ })
+
+ if(res.count == 1) {
+ return
+ }else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "璁惧寮�鏈哄崟瀹℃牳澶辫触: " + res.Message
+ })
+ }
+ }catch(err){
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "璁惧寮�鏈哄崟瀹℃牳澶辫触: " + err
+ })
+ }
+ },
+ async submit() {
+ let valid = this.ValidCheck()
+ if (!valid.state) {
+ CommonUtils.showTips({
+ message: valid.Message
+ })
+ return
+ }
+
+ try {
+ let oMain = JSON.stringify(this.hform);
+ let sMainSub = oMain + ';Add' + `;${getUserInfo()['Czymc']}`;
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Sb_EquipStopBill/Save锘縎b_EquipStopBillMain",
+ data: {
+ "sMainSub": sMainSub
+ },
+ method: "POST"
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ if (data.Verify == "Y") { //鑷姩瀹℃牳
+ set_checkBill(data.HInterID, 1)
+ }
+
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '杩斿洖涓婄骇椤甸潰',
+ showCancel: false,
+ success: (res) => {
+ if (res.confirm) {
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ } else if (res.cancel) {
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + Message
+ })
+ }
+
+
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + err
+ })
+ }
+ },
+ async getEquipInfo() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Gy_EquipFileMain/getSb_EquipList",
+ data: {
+ HInterID: this.hform.HEquipID,
+ user: getUserInfo()['Czymc']
+ }
+ })
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+
+ if (count == 1) {
+ console.log('data: ', data);
+
+ this.hform.HEquipID = data[0].hmainid
+ this.hform.HEquipName = data[0].璁惧鍚嶇О
+ this.hform.HEquipRelationID = data[0].HMainSourceID
+ this.hform.HEquipRelationName = data[0].鎵�灞炰富鐢熶骇璁惧
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇璁惧淇℃伅澶辫触: " + Message
+ })
+ }
+
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇璁惧淇℃伅澶辫触: " + err
+ })
+ }
+ }
+ },
+ onLoad(e) {
+ console.log('e: ', e);
+ if (!e.operationType) {
+ this.operationType = 1
+ } else {
+ this.operationType = e.operationType
+ }
+
+ if (this.operationType == 1) {
+ this.hform.HEquipID = e.HEquipID
+ // 鏂板
+ this.getMaxNum()
+ this.getEquipInfo()
+ } else if (this.operationType == 2) {
+ // 澶嶅埗
+ } else if (this.operationType == 3) {
+ // 缂栬緫
+
+ } else if (this.operationType == 4) {
+ // 娴忚
+
+ }
+ },
+ 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/MJGL/style/MJBillStyle.scss"
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess.vue b/pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess.vue
new file mode 100644
index 0000000..73abd63
--- /dev/null
+++ b/pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess.vue
@@ -0,0 +1,220 @@
+<template>
+ <view class="content">
+ <view id="divide" style="width: 100%;height: 0rpx;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.鍗曟嵁鍙�" style="margin: 10px;">
+ <view class="card-detail">
+ <template v-for="(field, index) in CommonUtils.emptyValueFilter(item, HFieldList)">
+ <view v-if="field.ColmType == 'DateTime'" class="detail">
+ <text>{{field.ColmCols}}锛�</text>{{dayjs(item[field.ColmCols]).format("YYYY-MM-DD HH:mm:ss")}}
+ </view>
+ <view v-else class="detail">
+ <text>{{field.ColmCols}}锛�</text>{{item[field.ColmCols]}}
+ </view>
+ </template>
+ </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,
+ CommonUtils,
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ tabs: 0,
+ urls: '/Sc_HEquipStateDistribution/Get_EquipICMOTechParamList_Json',
+ MvarReportTitle: '璁惧宸ヨ壓',
+ hform: {
+ HInterID: 0,
+ HICMOInterID: 0,
+ HICMOEntryID: 0,
+ HBillNo: '',
+ HSourceBillNo: '',
+ user: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ operationType: "4",
+ sWhere: "",
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ HFieldList: [], // 瀛楁鍒楄〃
+ 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.changeTab(0)
+ console.log(this.userInfo, uni.getStorageSync('HUserName'))
+ },
+ components: {
+ BarCodePopupVue
+ },
+ 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()
+ },
+ onPaginationChangeHandler({
+ current
+ }) {
+ this.page = current
+ this.showList = this.getPage(current, this.size, this.listData)
+ },
+ 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_HEquipStateDistribution/Get_EquipICMOTechParamList_Json'
+ }
+ // 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: this.hform
+ })
+
+ let {
+ count,
+ data,
+ Message,
+ list
+ } = res.data
+
+ if (count == 1) {
+ if (data == null) {
+ data = []
+ }
+ this.listData = data
+ console.log('data: ', data);
+ this.showList = this.getPage(this.page, this.size, data)
+ this.dataLength = data.length
+ this.HFieldList = CommonUtils.fieldListFilterRole({
+ FieldList: list,
+ ExcludeKeys: ["鍗曟嵁鍙�"]
+ }).data
+
+ console.log('this.HFieldList: ', this.HFieldList);
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧灞ュ巻澶辫触: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧灞ュ巻澶辫触: ${err}`
+ })
+ }
+
+ },
+ search() {
+ this.hform.sWhere = ''
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ this.hform.sWhere = {
+ HEquipID: this.hform.HInterID,
+ HICMOInterID: this.hform.HICMOInterID,
+ HICMOEntryID: this.hform.HICMOEntryID,
+ }
+
+ this.getList()
+ },
+ },
+ onLoad(e) {
+ let {
+ operationType,
+ HEquipID,
+ HICMOInterID,
+ HICMOEntryID
+ } = e
+
+ if (operationType == 4) {
+ this.HInterID = HEquipID
+ this.HICMOInterID = HICMOInterID
+ this.HICMOEntryID = HICMOEntryID
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ @import "@/pages/MJGL/style/MJListStyle.scss"
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day.vue b/pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day.vue
new file mode 100644
index 0000000..1163308
--- /dev/null
+++ b/pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day.vue
@@ -0,0 +1,203 @@
+<template>
+ <view class="content">
+ <view id="divide" style="width: 100%;height: 0rpx;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.妫�鏌ラ」鐩�" style="margin: 10px;">
+ <view class="card-detail">
+ <view class="detail" style="width: 25%; justify-content: left;" v-for="(field, index) in HFieldList" :key="index">
+ <text>{{field.ColmCols}}锛�</text>{{item[field.ColmCols]}}
+ </view>
+ </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_WorkBeginDotCheckBill/get锘縎c_WorkDotCheckList_Day',
+ MvarReportTitle: '璁惧鏈堢偣妫�璁板綍',
+ hform: {
+ HInterId: 0,
+ HBillNo: '',
+ HSourceBillNo: '',
+ user: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ Type: "璁惧",
+ sWhere: "",
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ HFieldList: [], // 瀛楁鍒楄〃
+ 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.changeTab(0)
+ console.log(this.userInfo, uni.getStorageSync('HUserName'))
+ },
+ components: {
+ BarCodePopupVue
+ },
+ 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()
+ },
+ onPaginationChangeHandler({
+ current
+ }) {
+ this.page = current
+ this.showList = this.getPage(current, this.size, this.listData)
+ },
+ 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_WorkBeginDotCheckBill/get锘縎c_WorkDotCheckList_Day'
+ }
+ // 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: this.hform
+ })
+
+ let {
+ count,
+ data,
+ Message,
+ list
+ } = res.data
+
+ if (count == 1) {
+ if (data == null) {
+ data = []
+ }
+ this.listData = data
+ console.log('data: ', data);
+ this.showList = this.getPage(this.page, this.size, data)
+ this.dataLength = data.length
+ this.HFieldList = CommonUtils.fieldListFilterRole({
+ FieldList: list,
+ ExcludeKeys: ["妫�鏌ラ」鐩�"]
+ }).data
+
+ console.log('this.HFieldList: ',this.HFieldList);
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鐐规璁板綍澶辫触: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇鐐规璁板綍澶辫触: ${err}`
+ })
+ }
+
+ },
+ search() {
+ this.hform.sWhere = ''
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ this.hform.sWhere = {
+ Type: this.hform.Type,
+ HInterId: this.hform.HInterId
+ }
+
+ this.getList()
+ },
+ },
+ onLoad(e) {
+ let {operationType, HEquipID} = e
+
+ this.hform.Type = operationType
+ this.hform.HInterId = HEquipID
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ @import "@/pages/MJGL/style/MJListStyle.scss"
+</style>
\ No newline at end of file
diff --git a/pages/index/tab3.vue b/pages/index/tab3.vue
index 94bb921..05ea8d3 100644
--- a/pages/index/tab3.vue
+++ b/pages/index/tab3.vue
@@ -238,6 +238,13 @@
"id": 27,
"hidden": false
},
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "璁惧鐘舵�佹煡璇�",
+ "url": "/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai",
+ "id": 28,
+ "hidden": false
+ }
]
}
},
diff --git a/pages/shebeilvli/EquipFileBillResume.vue b/pages/shebeilvli/EquipFileBillResume.vue
index 7d4d291..5aef2bc 100644
--- a/pages/shebeilvli/EquipFileBillResume.vue
+++ b/pages/shebeilvli/EquipFileBillResume.vue
@@ -1,449 +1,469 @@
<template>
- <view class="content">
- <view class="form">
- <view class="form-item">
- <view class="title">鍗曟嵁鍙�:</view>
- <view class="right">
- <input v-model="hform.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">璁惧鍒嗙被:</view>
- <view class="right">
- <input v-model="hform.HEquipType" placeholder="璇疯緭鍏ヨ澶囧垎绫�" />
- </view>
- </view>
- <view class="form-item">
- <view class="title">寮�濮嬫椂闂�:</view>
- <view class="right">
- <picker mode="date" :value="hform.BenginHCreateDate" @change="BenginHCreateDateChange">
- <input name="BenginHCreateDate" disabled :value="hform.BenginHCreateDate" placeholder="璇烽�夋嫨" />
- </picker>
- </view>
- </view>
- <view class="form-item">
- <view class="title">缁撴潫鏃堕棿:</view>
- <view class="right">
- <picker mode="date" :value="hform.EndHCreateDate" @change="EndHCreateDateChange">
- <input name="EndHCreateDate" disabled :value="hform.EndHCreateDate" placeholder="璇烽�夋嫨" />
- </picker>
- </view>
- </view>
-
- <view class="buttons">
- <button class="btn-a" size="mini" type="default" @tap="clear">閲嶇疆</button>
- <!-- <button class="btn-b" size="mini" type="default">鏂板</button> -->
- <button class="btn-c" size="mini" type="default" @tap="search">鏌ヨ</button>
- </view>
- </view>
-
- <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
-
- <view class="list" v-for="(item,index) in showList" :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.璁惧浠g爜">
- <text>璁惧浠g爜锛�</text>{{item.璁惧浠g爜}}
- </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.璁惧绫诲瀷}}
- </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.鏃ユ湡.substr(0,10)}}
- </view>
- </view>
- <view class="card-detail" v-if="showDetail == index">
-<!-- <view class="detail" v-if="item.hmainid">
+ <view class="content">
+ <view class="form">
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right">
+ <input v-model="hform.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁惧鍒嗙被:</view>
+ <view class="right">
+ <input v-model="hform.HEquipType" placeholder="璇疯緭鍏ヨ澶囧垎绫�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">寮�濮嬫椂闂�:</view>
+ <view class="right">
+ <picker mode="date" :value="hform.BenginHCreateDate" @change="BenginHCreateDateChange">
+ <input name="BenginHCreateDate" disabled :value="hform.BenginHCreateDate" placeholder="璇烽�夋嫨" />
+ </picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁撴潫鏃堕棿:</view>
+ <view class="right">
+ <picker mode="date" :value="hform.EndHCreateDate" @change="EndHCreateDateChange">
+ <input name="EndHCreateDate" disabled :value="hform.EndHCreateDate" placeholder="璇烽�夋嫨" />
+ </picker>
+ </view>
+ </view>
+
+ <view class="buttons">
+ <button class="btn-a" size="mini" type="default" @tap="clear">閲嶇疆</button>
+ <!-- <button class="btn-b" size="mini" type="default">鏂板</button> -->
+ <button class="btn-c" size="mini" type="default" @tap="search">鏌ヨ</button>
+ </view>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+
+ <view class="list" v-for="(item,index) in showList" :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.璁惧浠g爜">
+ <text>璁惧浠g爜锛�</text>{{item.璁惧浠g爜}}
+ </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.璁惧绫诲瀷}}
+ </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.鏃ユ湡.substr(0,10)}}
+ </view>
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+ <!-- <view class="detail" v-if="item.hmainid">
<text>hmainid锛�</text>{{item.hmainid}}
</view> -->
- <view class="detail" v-if="item.鏉″舰鐮�">
- <text>鏉$爜缂栧彿锛�</text>{{item.鏉″舰鐮亇}
- </view>
-<!-- <view class="detail" v-if="item.HMaterID">
+ <view class="detail" v-if="item.鏉″舰鐮�">
+ <text>鏉$爜缂栧彿锛�</text>{{item.鏉″舰鐮亇}
+ </view>
+ <!-- <view class="detail" v-if="item.HMaterID">
<text>HMaterID锛�</text>{{item.HMaterID}}
</view> -->
- <view class="detail" v-if="item.鐗╂枡鍚嶇О">
- <text>鐗╂枡鍚嶇О锛�</text>{{item.鐗╂枡鍚嶇О}}
- </view>
-<!-- <view class="detail" v-if="item.HUnitID">
+ <view class="detail" v-if="item.鐗╂枡鍚嶇О">
+ <text>鐗╂枡鍚嶇О锛�</text>{{item.鐗╂枡鍚嶇О}}
+ </view>
+ <!-- <view class="detail" v-if="item.HUnitID">
<text>HUnitID锛�</text>{{item.HUnitID}}
</view> -->
- <view class="detail" v-if="item.鍗曚綅">
- <text>鍗曚綅锛�</text>{{item.鍗曚綅}}
- </view>
-<!-- <view class="detail" v-if="item.HDeptID">
+ <view class="detail" v-if="item.鍗曚綅">
+ <text>鍗曚綅锛�</text>{{item.鍗曚綅}}
+ </view>
+ <!-- <view class="detail" v-if="item.HDeptID">
<text>HDeptID锛�</text>{{item.HDeptID}}
</view> -->
- <view class="detail" v-if="item.浣跨敤閮ㄩ棬">
- <text>浣跨敤閮ㄩ棬锛�</text>{{item.浣跨敤閮ㄩ棬}}
- </view>
- <view class="detail" v-if="item.HUseEmpID">
- <text>HUseEmpID锛�</text>{{item.HUseEmpID}}
- </view>
- <view class="detail" v-if="item.浣跨敤璐熻矗浜�">
- <text>浣跨敤璐熻矗浜猴細</text>{{item.浣跨敤璐熻矗浜簘}
- </view>
-<!-- <view class="detail" v-if="item.HRepairEmpID">
+ <view class="detail" v-if="item.浣跨敤閮ㄩ棬">
+ <text>浣跨敤閮ㄩ棬锛�</text>{{item.浣跨敤閮ㄩ棬}}
+ </view>
+ <view class="detail" v-if="item.HUseEmpID">
+ <text>HUseEmpID锛�</text>{{item.HUseEmpID}}
+ </view>
+ <view class="detail" v-if="item.浣跨敤璐熻矗浜�">
+ <text>浣跨敤璐熻矗浜猴細</text>{{item.浣跨敤璐熻矗浜簘}
+ </view>
+ <!-- <view class="detail" v-if="item.HRepairEmpID">
<text>HRepairEmpID锛�</text>{{item.HRepairEmpID}}
</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.瀹夎鏃ユ湡.substr(0,10)}}
- </view>
- <view class="detail" v-if="item.杩愯寮�濮嬫棩鏈�">
- <text>杩愯寮�濮嬫棩鏈燂細</text>{{item.杩愯寮�濮嬫棩鏈�.substr(0,10)}}
- </view>
-<!-- <view class="detail" v-if="item.HEquipFileTypeID">
+ <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.瀹夎鏃ユ湡.substr(0,10)}}
+ </view>
+ <view class="detail" v-if="item.杩愯寮�濮嬫棩鏈�">
+ <text>杩愯寮�濮嬫棩鏈燂細</text>{{item.杩愯寮�濮嬫棩鏈�.substr(0,10)}}
+ </view>
+ <!-- <view class="detail" v-if="item.HEquipFileTypeID">
<text>HEquipFileTypeID锛�</text>{{item.HEquipFileTypeID}}
</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.HSellSupID">
+ <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.HSellSupID">
<text>HSellSupID锛�</text>{{item.HSellSupID}}
</view> -->
- <view class="detail" v-if="item.渚涘簲鍟�">
- <text>渚涘簲鍟嗭細</text>{{item.渚涘簲鍟唥}
- </view>
-<!-- <view class="detail" v-if="item.HMakeSupID">
+ <view class="detail" v-if="item.渚涘簲鍟�">
+ <text>渚涘簲鍟嗭細</text>{{item.渚涘簲鍟唥}
+ </view>
+ <!-- <view class="detail" v-if="item.HMakeSupID">
<text>HMakeSupID锛�</text>{{item.HMakeSupID}}
</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.鍒跺崟鏃ユ湡.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.hbilltype">
+ <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.鍒跺崟鏃ユ湡.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.hbilltype">
<text>hbilltype锛�</text>{{item.hbilltype}}
</view> -->
- <view class="detail" v-if="item.鍗曟嵁绫诲瀷">
- <text>鍗曟嵁绫诲瀷锛�</text>{{item.鍗曟嵁绫诲瀷}}
- </view>
-<!-- <view class="detail" v-if="item.HMoudType">
+ <view class="detail" v-if="item.鍗曟嵁绫诲瀷">
+ <text>鍗曟嵁绫诲瀷锛�</text>{{item.鍗曟嵁绫诲瀷}}
+ </view>
+ <!-- <view class="detail" v-if="item.HMoudType">
<text>HMoudType锛�</text>{{item.HMoudType}}
</view>
<view class="detail" v-if="item.hsubid">
<text>hsubid锛�</text>{{item.hsubid}}
</view> -->
- </view>
-
- <view class="more" v-if="showDetail == 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="toSon(item)">
- <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏌ョ湅瀛愯〃
- </view>
- </view>
- <view class="more" v-if="showDetail != 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="toSon(item)">
- <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏌ョ湅瀛愯〃
- </view>
- </view>
- </uni-card>
- </view>
-
- <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>
- </view>
+ </view>
+
+ <view class="more" v-if="showDetail == 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="toSon(item)">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鏌ョ湅瀛愯〃
+ </view>
+ </view>
+ <view class="more" v-if="showDetail != 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="toSon(item)">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鏌ョ湅瀛愯〃
+ </view>
+ </view>
+ </uni-card>
+ </view>
+
+ <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>
+ </view>
</template>
<script>
- import { getUserInfo } from "@/utils/auth.js";
- export default {
- data() {
- return {
- userInfo:getUserInfo(),
- serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
- hform:{
- HBillNo:'',
- HEquipType:'',
- BenginHCreateDate:'',
- EndHCreateDate:'',
- },
- sWhere:'',
- listData:[],
- showList:[],
- showDetail:-1,
-
- page:1,
- }
- },
- onLoad() {
- this.getList()
- console.log(this.userInfo,uni.getStorageSync('HUserName'))
- },
- onReachBottom: function() {
- this.page++
- setTimeout(() => {
- this.showList = this.showList.concat(this.getPage(this.page,this.listData))
- }, 100)
- },
- onPullDownRefresh: function() {
- this.clear()
- setTimeout(()=>{
- uni.stopPullDownRefresh();
- }, 1000);
- },
- methods: {
- getPage(page,list){
- let sindex = (parseInt(page) - 1) * 20
- let eindex = parseInt(page) * 20
- let newList = list.slice(sindex,eindex)
- return newList
- },
- getList(){
- console.log(this.sWhere)
- uni.showLoading({
- title:'鍔犺浇涓�...'
- })
- uni.request({
- url: this.serverUrl + '/Gy_EquipFileMain/GetList',
- data:{
- sWhere: this.sWhere,
- user: uni.getStorageSync('HUserName')
- },
- success: (res) => {
- console.log(1,res);
- if(res.data.count == 1){
- this.listData = res.data.data
- this.showList = this.getPage(this.page,this.listData)
- setTimeout(()=>{
- uni.hideLoading()
- }, 1000)
- }else{
- uni.hideLoading()
- uni.showToast({
- title:res.data.Message,
- icon:'none'
- })
- }
- },
- fail: (res) => {
- console.log(res);
- uni.hideLoading()
- uni.showToast({
- title:'鎺ュ彛璇锋眰澶辫触',
- icon:'none'
- })
- },
- });
-
- // uni.request({
- // url: this.serverUrl + '/Gy_EquipFileMain/Sb_EquipFileBillResumeDate',
- // data: { "HInterID": 2 },
- // success: (res) => {
- // console.log(2,res);
-
- // }
- // });
- },
- //閫夋嫨鍗曟嵁鏃ユ湡
- BenginHCreateDateChange(e){
- console.log(e.detail.value)
- this.hform.BenginHCreateDate = e.detail.value
- },
- //閫夋嫨鍗曟嵁鏃ユ湡
- EndHCreateDateChange(e){
- console.log(e.detail.value)
- this.hform.EndHCreateDate = e.detail.value
- },
- search(){
- this.sWhere = ''
- this.listData = []
- this.page = 1
- this.showList = []
-
- console.log(this.hform)
- if (this.hform.HBillNo) {
- this.sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'";
- }
- if (this.hform.HEquipType) {
- this.sWhere += " and 璁惧绫诲瀷 like '%" + this.hform.HEquipType + "%'";
- }
- if (this.hform.BenginHCreateDate) {
- this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.hform.BenginHCreateDate + "'";
- }
- if (this.hform.EndHCreateDate) {
- this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.hform.EndHCreateDate + "'";
- }
-
- this.getList()
- },
- clear(){
- this.listData = []
- this.page = 1
- this.showList = []
-
- this.sWhere = ''
- this.hform = {
- HBillNo:'',
- HEquipType:'',
- BenginHCreateDate:'',
- EndHCreateDate:'',
- }
- this.getList()
- },
- toSon(item){
- uni.navigateTo({
- url:'/pages/shebeilvli/EquipFileBillResume_son?HInterID=' + item.hmainid
- + '&璁惧鍚嶇О=' + item.璁惧鍚嶇О
- + '&璁惧浠g爜=' + item.璁惧浠g爜
- + '&璁惧鍑哄巶鏃ユ湡=' + item.璁惧鍑哄巶鏃ユ湡
- + '&璁惧鍑哄巶缂栧彿=' + item.璁惧鍑哄巶缂栧彿
- + '&璁惧鍨嬪彿=' + item.璁惧鍨嬪彿
- + '&璁惧绫诲瀷=' + item.璁惧绫诲瀷
- + '&璁惧缂栫爜=' + item.璁惧缂栫爜
- + '&璁惧瑙勬牸=' + item.璁惧瑙勬牸,
- })
- }
- }
- }
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ export default {
+ data() {
+ return {
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ hform: {
+ HBillNo: '',
+ HEquipType: '',
+ BenginHCreateDate: '',
+ EndHCreateDate: '',
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ showDetail: -1,
+
+ page: 1,
+ }
+ },
+ onLoad(e) {
+ this.getList()
+ console.log(this.userInfo, uni.getStorageSync('HUserName'))
+ },
+ onReachBottom: function() {
+ this.page++
+ setTimeout(() => {
+ this.showList = this.showList.concat(this.getPage(this.page, this.listData))
+ }, 100)
+ },
+ onPullDownRefresh: function() {
+ this.clear()
+ setTimeout(() => {
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
+ methods: {
+ getPage(page, list) {
+ let sindex = (parseInt(page) - 1) * 20
+ let eindex = parseInt(page) * 20
+ let newList = list.slice(sindex, eindex)
+ return newList
+ },
+ getList() {
+ console.log(this.sWhere)
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ })
+ uni.request({
+ url: this.serverUrl + '/Gy_EquipFileMain/GetList',
+ data: {
+ sWhere: this.sWhere,
+ user: uni.getStorageSync('HUserName')
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ this.listData = res.data.data
+ this.showList = this.getPage(this.page, this.listData)
+ setTimeout(() => {
+ uni.hideLoading()
+ }, 1000)
+ } else {
+ uni.hideLoading()
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+
+ // uni.request({
+ // url: this.serverUrl + '/Gy_EquipFileMain/Sb_EquipFileBillResumeDate',
+ // data: { "HInterID": 2 },
+ // success: (res) => {
+ // console.log(2,res);
+
+ // }
+ // });
+ },
+ //閫夋嫨鍗曟嵁鏃ユ湡
+ BenginHCreateDateChange(e) {
+ console.log(e.detail.value)
+ this.hform.BenginHCreateDate = e.detail.value
+ },
+ //閫夋嫨鍗曟嵁鏃ユ湡
+ EndHCreateDateChange(e) {
+ console.log(e.detail.value)
+ this.hform.EndHCreateDate = e.detail.value
+ },
+ search() {
+ this.sWhere = ''
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ console.log(this.hform)
+ if (this.hform.HBillNo) {
+ this.sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'";
+ }
+ if (this.hform.HEquipType) {
+ this.sWhere += " and 璁惧绫诲瀷 like '%" + this.hform.HEquipType + "%'";
+ }
+ if (this.hform.BenginHCreateDate) {
+ this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.hform.BenginHCreateDate + "'";
+ }
+ if (this.hform.EndHCreateDate) {
+ this.sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + this.hform.EndHCreateDate + "'";
+ }
+
+ this.getList()
+ },
+ clear() {
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ this.sWhere = ''
+ this.hform = {
+ HBillNo: '',
+ HEquipType: '',
+ BenginHCreateDate: '',
+ EndHCreateDate: '',
+ }
+ this.getList()
+ },
+ toSon(item) {
+ uni.navigateTo({
+ url: '/pages/shebeilvli/EquipFileBillResume_son?HInterID=' + item.hmainid +
+ '&璁惧鍚嶇О=' + item.璁惧鍚嶇О +
+ '&璁惧浠g爜=' + item.璁惧浠g爜 +
+ '&璁惧鍑哄巶鏃ユ湡=' + item.璁惧鍑哄巶鏃ユ湡 +
+ '&璁惧鍑哄巶缂栧彿=' + item.璁惧鍑哄巶缂栧彿 +
+ '&璁惧鍨嬪彿=' + item.璁惧鍨嬪彿 +
+ '&璁惧绫诲瀷=' + item.璁惧绫诲瀷 +
+ '&璁惧缂栫爜=' + item.璁惧缂栫爜 +
+ '&璁惧瑙勬牸=' + item.璁惧瑙勬牸,
+ })
+ }
+ }
+ }
</script>
<style lang="scss" scoped>
- .form{
- width: 640rpx;
- margin: 20rpx auto;
- }
- .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;
- }
- }
- .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;
- }
- }
-
- .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;
- }
- }
- }
+ .form {
+ width: 640rpx;
+ margin: 20rpx auto;
+ }
-</style>
+ .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;
+ }
+ }
+
+ .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;
+ }
+ }
+
+ .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;
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/shebeiyunxingzhuangtai/detail.vue b/pages/shebeiyunxingzhuangtai/detail.vue
index 71511dc..9f2e41c 100644
--- a/pages/shebeiyunxingzhuangtai/detail.vue
+++ b/pages/shebeiyunxingzhuangtai/detail.vue
@@ -1,509 +1,584 @@
<template>
- <view class="container">
- <view class="graph-container">
- <view class="graph"><l-echart ref="chartRef1" @finished="initHistogram1"></l-echart></view>
- <view class="graph"><l-echart ref="chartRef2" @finished="initLineChart"></l-echart></view>
- <view class="graph"><l-echart ref="chartRef3" @finished="initStatistics"></l-echart></view>
- <view class="graph"><l-echart ref="chartRef4" @finished="initHistogram4"></l-echart></view>
- </view>
+ <view class="container">
+ <view class="graph-container">
+ <view class="graph"><l-echart ref="chartRef1" @finished="initHistogram1"></l-echart></view>
+ <view class="graph"><l-echart ref="chartRef2" @finished="initLineChart"></l-echart></view>
+ <view class="graph"><l-echart ref="chartRef3" @finished="initStatistics"></l-echart></view>
+ <view class="graph"><l-echart ref="chartRef4" @finished="initHistogram4"></l-echart></view>
+ </view>
- <view class="operation-zone">
- <button size="mini" plain>寮�鏈�</button>
- <button size="mini" plain>鍋滄満</button>
- <button size="mini" plain>鐐规璁板綍</button>
- <button size="mini" plain>鏁呴殰鐧昏</button>
- <button size="mini" plain>缁翠慨</button>
- <button size="mini" plain>灞ュ巻</button>
- <button size="mini" plain>宸ヨ壓</button>
- <button size="mini" plain>鐘舵��</button>
- </view>
+ <view class="operation-zone" @click="doOperation">
+ <button size="mini" data-type="equipBegin" plain>寮�鏈�</button>
+ <button size="mini" data-type="equipStop" plain>鍋滄満</button>
+ <button size="mini" data-type="workDotCheck" plain>鐐规璁板綍</button>
+ <button size="mini" data-type="equipConkBook" plain>鏁呴殰鐧昏</button>
+ <button size="mini" plain>缁翠慨</button>
+ <button size="mini" data-type="equipResume" plain>灞ュ巻</button>
+ <button size="mini" data-type="equipmentProcess" plain>宸ヨ壓</button>
+ <button size="mini" plain>鐘舵��</button>
+ </view>
- </view>
+ </view>
</template>
<script>
- import {
- getUserInfo
- } from "@/utils/auth.js";
- import * as echarts from "echarts"
- export default {
- data() {
- return {
- userInfo: getUserInfo(),
- organInfo: {
- id: uni.getStorageSync("OrganizationID") || "",
- name: uni.getStorageSync("Organization") || ""
- },
- serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
-
- }
- },
- methods: {
- doRequest(url, data, resFunction, errFunction, method) {
- uni.showLoading({
- title: '鍔犺浇涓�...'
- })
- uni.request({
- method: method || "GET",
- url: this.serverUrl + url,
- data: data || "",
- success: (res) => {
- if (typeof resFunction === 'function') {
- resFunction.call(this, res)
- } else if (typeof errFunction === 'undefined') {
- return
- } else {
- throw new TypeError("璁块棶鎴愬姛鍥炶皟鍑芥暟绫诲瀷寮傚父!")
- }
- },
- fail: (err) => {
+ import {
+ CommonUtils
+ } from "../../utils/common";
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import * as echarts from "echarts"
+ export default {
+ data() {
+ return {
+ HEquipID: 0,
+ HICMOInterID: 0,
+ HICMOEntryID: 0,
+ userInfo: getUserInfo(),
+ organInfo: {
+ id: uni.getStorageSync("OrganizationID") || "",
+ name: uni.getStorageSync("Organization") || ""
+ },
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
- if (typeof errFunction === 'function') {
- errFunction.call(this, err)
- } else if (typeof errFunction === 'undefined') {
- return
- } else {
- throw new TypeError("璁块棶澶辫触鍥炶皟鍑芥暟绫诲瀷寮傚父!")
- }
- }
- })
- uni.hideLoading()
- },
+ }
+ },
+ methods: {
+ doRequest(url, data, resFunction, errFunction, method) {
+ uni.showLoading({
+ title: '鍔犺浇涓�...'
+ })
+ uni.request({
+ method: method || "GET",
+ url: this.serverUrl + url,
+ data: data || "",
+ success: (res) => {
+ if (typeof resFunction === 'function') {
+ resFunction.call(this, res)
+ } else if (typeof errFunction === 'undefined') {
+ return
+ } else {
+ throw new TypeError("璁块棶鎴愬姛鍥炶皟鍑芥暟绫诲瀷寮傚父!")
+ }
+ },
+ fail: (err) => {
- //鏌辩姸鍥�
- async get_Histogram1(mychart11, chartData) {
- console.log("鍒濆鍖栨煴鐘跺浘")
- // 榛樿鐨刼ption缁撴瀯
- var option = {
- title: {
- text: '杩戜竷澶╀骇鑳�', // 榛樿鏍囬涓虹┖
- left: 'center',
- top: '10%', // 璋冩暣鏍囬浣嶇疆锛屾斁鍒版渶涓婇潰
- textStyle: {
- fontSize: 18,
- color: '#ff0000'
- }
- },
- grid: {
- top: '25%', // 璋冩暣grid鐨則op鍊硷紝缁欐爣棰樼暀鍑虹┖闂�
- bottom: '20%',
- left: '10%',
- right: '10%'
- },
- xAxis: {
- type: 'category',
- data: [] // 榛樿x杞存暟鎹负绌�
- },
- yAxis: {
- type: 'value'
- },
- series: [{
- data: [], // 榛樿series鏁版嵁涓虹┖
- type: 'bar'
- }]
- };
+ if (typeof errFunction === 'function') {
+ errFunction.call(this, err)
+ } else if (typeof errFunction === 'undefined') {
+ return
+ } else {
+ throw new TypeError("璁块棶澶辫触鍥炶皟鍑芥暟绫诲瀷寮傚父!")
+ }
+ }
+ })
+ uni.hideLoading()
+ },
- // 濡傛灉鏈夋暟鎹紝鏇存柊option鐨勫唴瀹�
- if (chartData && chartData.length > 0) {
- option.title.text = '杩戜竷澶╀骇鑳�'; // 姝e父鏁版嵁鏃舵病鏈夋爣棰�
- option.xAxis.data = chartData.map(item => item.鏃ユ湡); // 璁剧疆x杞存暟鎹�
- option.series[0].data = chartData.map(item => item['鐢熶骇鎬绘暟']); // 璁剧疆y杞存暟鎹�
+ //鏌辩姸鍥�
+ async get_Histogram1(mychart11, chartData) {
+ console.log("鍒濆鍖栨煴鐘跺浘")
+ // 榛樿鐨刼ption缁撴瀯
+ var option = {
+ title: {
+ text: '杩戜竷澶╀骇鑳�', // 榛樿鏍囬涓虹┖
+ left: 'center',
+ top: '10%', // 璋冩暣鏍囬浣嶇疆锛屾斁鍒版渶涓婇潰
+ textStyle: {
+ fontSize: 18,
+ color: '#ff0000'
+ }
+ },
+ grid: {
+ top: '25%', // 璋冩暣grid鐨則op鍊硷紝缁欐爣棰樼暀鍑虹┖闂�
+ bottom: '20%',
+ left: '10%',
+ right: '10%'
+ },
+ xAxis: {
+ type: 'category',
+ data: [] // 榛樿x杞存暟鎹负绌�
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [{
+ data: [], // 榛樿series鏁版嵁涓虹┖
+ type: 'bar'
+ }],
+ animation: false
+ };
- option.series[0].label = {
- normal: {
- show: true,
- position: 'top',
- formatter: function(params) {
- return echarts.format.addCommas(params.value);
- }
- }
- };
+ // 濡傛灉鏈夋暟鎹紝鏇存柊option鐨勫唴瀹�
+ if (chartData && chartData.length > 0) {
+ option.title.text = '杩戜竷澶╀骇鑳�'; // 姝e父鏁版嵁鏃舵病鏈夋爣棰�
+ option.xAxis.data = chartData.map(item => item.鏃ユ湡); // 璁剧疆x杞存暟鎹�
+ option.series[0].data = chartData.map(item => item['鐢熶骇鎬绘暟']); // 璁剧疆y杞存暟鎹�
- option.series[0].itemStyle = {
- normal: {
- color: '#15b1fa',
- label: {
- show: true // 鍦ㄦ煴鐘跺浘涓婃樉绀烘暟鎹�
- }
- }
- };
- } else {
- // 娌℃湁鏁版嵁鏃讹紝鏄剧ず"鏆傛棤鏁版嵁"鎻愮ず
- option.title.text = '鏆傛棤鏁版嵁';
- }
+ option.series[0].label = {
+ normal: {
+ show: true,
+ position: 'top',
+ formatter: function(params) {
+ return echarts.format.addCommas(params.value);
+ }
+ }
+ };
- // 鏇存柊鍥捐〃
- mychart11.setOption(option);
- },
+ option.series[0].itemStyle = {
+ normal: {
+ color: '#15b1fa',
+ label: {
+ show: true // 鍦ㄦ煴鐘跺浘涓婃樉绀烘暟鎹�
+ }
+ }
+ };
+ } else {
+ // 娌℃湁鏁版嵁鏃讹紝鏄剧ず"鏆傛棤鏁版嵁"鎻愮ず
+ option.title.text = '鏆傛棤鏁版嵁';
+ }
- //鏌辩姸鍥�2
- async get_LineChart(mychart22, chartData1) {
- // 榛樿鐨刼ption缁撴瀯
- var option = {
- title: {
- text: '缁翠慨', // 榛樿鏍囬涓虹┖
- left: 'center',
- top: '10%', // 璋冩暣鏍囬浣嶇疆锛屾斁鍒版渶涓婇潰
- textStyle: {
- fontSize: 18,
- color: '#ff0000'
- }
- },
- axisLabel: {
- show: true,
- interval: 0,
- color: '#15b1fa',
- formatter: function(value) {
- var ret = ""; //鎷兼帴鍔燶n杩斿洖鐨勭被鐩」
- var maxLength = 1; //姣忛」鏄剧ず鏂囧瓧涓暟
- var valLength = value.length; //X杞寸被鐩」鐨勬枃瀛椾釜鏁�
- var rowN = Math.ceil(valLength / maxLength); //绫荤洰椤归渶瑕佹崲琛岀殑琛屾暟
- if (rowN > 1) //濡傛灉绫荤洰椤圭殑鏂囧瓧澶т簬3,
- {
- for (var i = 0; i < rowN; i++) {
- var temp = ""; //姣忔鎴彇鐨勫瓧绗︿覆
- var start = i * maxLength; //寮�濮嬫埅鍙栫殑浣嶇疆
- var end = start + maxLength; //缁撴潫鎴彇鐨勪綅缃�
- //杩欓噷涔熷彲浠ュ姞涓�涓槸鍚︽槸鏈�鍚庝竴琛岀殑鍒ゆ柇锛屼絾鏄笉鍔犱篃娌℃湁褰卞搷锛岄偅灏变笉鍔犲惂
- temp = value.substring(start, end) + "\n";
- ret += temp; //鍑�熸渶缁堢殑瀛楃涓�
- }
- return ret;
- } else {
- return value;
- }
- }
- },
- grid: {
- top: '25%', // 璋冩暣grid鐨則op鍊硷紝缁欐爣棰樼暀鍑虹┖闂�
- bottom: '20%',
- left: '10%',
- right: '10%'
- },
- xAxis: {
- type: 'category',
- data: [] // 榛樿x杞存暟鎹负绌�
- },
- yAxis: {
- type: 'value'
- },
- series: [{
- data: [], // 榛樿series鏁版嵁涓虹┖
- type: 'bar'
- }]
- };
+ // 鏇存柊鍥捐〃
+ mychart11.setOption(option);
+ },
+
+ //鏌辩姸鍥�2
+ async get_LineChart(mychart22, chartData1) {
+ // 榛樿鐨刼ption缁撴瀯
+ var option = {
+ title: {
+ text: '缁翠慨', // 榛樿鏍囬涓虹┖
+ left: 'center',
+ top: '10%', // 璋冩暣鏍囬浣嶇疆锛屾斁鍒版渶涓婇潰
+ textStyle: {
+ fontSize: 18,
+ color: '#ff0000'
+ }
+ },
+ axisLabel: {
+ show: true,
+ interval: 0,
+ color: '#15b1fa',
+ formatter: function(value) {
+ var ret = ""; //鎷兼帴鍔燶n杩斿洖鐨勭被鐩」
+ var maxLength = 1; //姣忛」鏄剧ず鏂囧瓧涓暟
+ var valLength = value.length; //X杞寸被鐩」鐨勬枃瀛椾釜鏁�
+ var rowN = Math.ceil(valLength / maxLength); //绫荤洰椤归渶瑕佹崲琛岀殑琛屾暟
+ if (rowN > 1) //濡傛灉绫荤洰椤圭殑鏂囧瓧澶т簬3,
+ {
+ for (var i = 0; i < rowN; i++) {
+ var temp = ""; //姣忔鎴彇鐨勫瓧绗︿覆
+ var start = i * maxLength; //寮�濮嬫埅鍙栫殑浣嶇疆
+ var end = start + maxLength; //缁撴潫鎴彇鐨勪綅缃�
+ //杩欓噷涔熷彲浠ュ姞涓�涓槸鍚︽槸鏈�鍚庝竴琛岀殑鍒ゆ柇锛屼絾鏄笉鍔犱篃娌℃湁褰卞搷锛岄偅灏变笉鍔犲惂
+ temp = value.substring(start, end) + "\n";
+ ret += temp; //鍑�熸渶缁堢殑瀛楃涓�
+ }
+ return ret;
+ } else {
+ return value;
+ }
+ }
+ },
+ grid: {
+ top: '25%', // 璋冩暣grid鐨則op鍊硷紝缁欐爣棰樼暀鍑虹┖闂�
+ bottom: '20%',
+ left: '10%',
+ right: '10%'
+ },
+ xAxis: {
+ type: 'category',
+ data: [] // 榛樿x杞存暟鎹负绌�
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [{
+ data: [], // 榛樿series鏁版嵁涓虹┖
+ type: 'bar'
+ }],
+ animation: false
+ };
- // 濡傛灉鏈夋暟鎹紝鏇存柊option鐨勫唴瀹�
- if (chartData1 && chartData1.length > 0) {
- option.title.text = '涓嶈壇鍘熷洜'; // 姝e父鏁版嵁鏃舵病鏈夋爣棰�
- option.xAxis.data = chartData1.map(item => item.涓嶈壇鍘熷洜); // 璁剧疆x杞存暟鎹�
- option.series[0].data = chartData1.map(item => item['鏁伴噺']); // 璁剧疆y杞存暟鎹�
+ // 濡傛灉鏈夋暟鎹紝鏇存柊option鐨勫唴瀹�
+ if (chartData1 && chartData1.length > 0) {
+ option.title.text = '涓嶈壇鍘熷洜'; // 姝e父鏁版嵁鏃舵病鏈夋爣棰�
+ option.xAxis.data = chartData1.map(item => item.涓嶈壇鍘熷洜); // 璁剧疆x杞存暟鎹�
+ option.series[0].data = chartData1.map(item => item['鏁伴噺']); // 璁剧疆y杞存暟鎹�
- option.series[0].label = {
- normal: {
- show: true,
- position: 'top',
- formatter: function(params) {
- return echarts.format.addCommas(params.value);
- }
- }
- };
+ option.series[0].label = {
+ normal: {
+ show: true,
+ position: 'top',
+ formatter: function(params) {
+ return echarts.format.addCommas(params.value);
+ }
+ }
+ };
- option.series[0].itemStyle = {
- normal: {
- color: '#15b1fa',
- label: {
- show: true // 鍦ㄦ煴鐘跺浘涓婃樉绀烘暟鎹�
- }
- }
- };
- } else {
- // 娌℃湁鏁版嵁鏃讹紝鏄剧ず"鏆傛棤鏁版嵁"鎻愮ず
- option.title.text = '鏆傛棤鏁版嵁';
- }
+ option.series[0].itemStyle = {
+ normal: {
+ color: '#15b1fa',
+ label: {
+ show: true // 鍦ㄦ煴鐘跺浘涓婃樉绀烘暟鎹�
+ }
+ }
+ };
+ } else {
+ // 娌℃湁鏁版嵁鏃讹紝鏄剧ず"鏆傛棤鏁版嵁"鎻愮ず
+ option.title.text = '鏆傛棤鏁版嵁';
+ }
- // 鏇存柊鍥捐〃
- mychart22.setOption(option);
- },
+ // 鏇存柊鍥捐〃
+ mychart22.setOption(option);
+ },
- //楗煎浘
- async get_Statistics(mychart3, chartData2) {
- // 濡傛灉 chartData2 涓虹┖锛屾彁渚涗竴涓�滄棤鏁版嵁鈥濇彁绀�
- if (chartData2.length === 0) {
- mychart3.setOption({
- title: {
- text: '鏆傛棤鏁版嵁',
- left: 'center',
- top: '10%',
- textStyle: {
- color: 'red', // 璁剧疆鏍囬棰滆壊涓虹孩鑹�
- fontSize: 18,
- fontWeight: 'bold'
- }
- },
- series: [], // 娓呯┖鏁版嵁
- graphic: [] // 娓呯┖鍥惧舰涓殑鏂囨湰
- });
- return;
- }
+ //楗煎浘
+ async get_Statistics(mychart3, chartData2) {
+ // 濡傛灉 chartData2 涓虹┖锛屾彁渚涗竴涓�滄棤鏁版嵁鈥濇彁绀�
+ if (!chartData2 || chartData2.length == 0) {
+ mychart3.setOption({
+ title: {
+ text: '鏆傛棤鏁版嵁',
+ left: 'center',
+ top: '10%',
+ textStyle: {
+ color: 'red', // 璁剧疆鏍囬棰滆壊涓虹孩鑹�
+ fontSize: 18,
+ fontWeight: 'bold'
+ }
+ },
+ series: [], // 娓呯┖鏁版嵁
+ graphic: [], // 娓呯┖鍥惧舰涓殑鏂囨湰
+ animation: false
+ });
+ } else {
+ // 鐘舵�侀鑹叉槧灏�
+ const statusColorMap = {
+ '寮�鏈�': '#28a745', // 缁胯壊
+ '鏁呴殰': '#ff63a5', // 妗冪孩鑹�
+ '鍋滄満': '#f0ad4e', // 榛勮壊
+ '鏈煡': '#6c757d' // 鐏拌壊
+ };
- // 鐘舵�侀鑹叉槧灏�
- const statusColorMap = {
- '寮�鏈�': '#28a745', // 缁胯壊
- '鏁呴殰': '#ff63a5', // 妗冪孩鑹�
- '鍋滄満': '#f0ad4e', // 榛勮壊
- '鏈煡': '#6c757d' // 鐏拌壊
- };
+ // 璁$畻寮�鏈虹巼
+ chartData2 = Array.from(chartData2)
+ const totalDevices = chartData2.reduce((sum, item) => sum + item.鏁伴噺, 0);
+ const onlineDevices = chartData2.find(item => item.鐘舵�� === '寮�鏈�')?.鏁伴噺 || 0;
+ const onlineRate = totalDevices === 0 ? 0 : (onlineDevices / totalDevices * 100).toFixed(2);
- // 璁$畻寮�鏈虹巼
- const totalDevices = chartData2.reduce((sum, item) => sum + item.鏁伴噺, 0);
- const onlineDevices = chartData2.find(item => item.鐘舵�� === '寮�鏈�')?.鏁伴噺 || 0;
- const onlineRate = totalDevices === 0 ? 0 : (onlineDevices / totalDevices * 100).toFixed(2);
+ // 鍔ㄦ�佺敓鎴愰ゼ鍥炬暟鎹紝骞舵牴鎹姸鎬佽缃鑹�
+ var data = chartData2.map(function(item) {
+ // 鑾峰彇褰撳墠鐘舵�佺殑棰滆壊锛岄粯璁や负鐏拌壊
+ var color = statusColorMap[item.鐘舵�乚 || statusColorMap['鏈煡'];
- // 鍔ㄦ�佺敓鎴愰ゼ鍥炬暟鎹紝骞舵牴鎹姸鎬佽缃鑹�
- var data = chartData2.map(function(item) {
- // 鑾峰彇褰撳墠鐘舵�佺殑棰滆壊锛岄粯璁や负鐏拌壊
- var color = statusColorMap[item.鐘舵�乚 || statusColorMap['鏈煡'];
+ return {
+ value: item.鏁伴噺,
+ name: item.鐘舵��,
+ itemStyle: {
+ color: color // 涓烘瘡涓姸鎬佽缃搴旂殑棰滆壊
+ }
+ };
+ });
- return {
- value: item.鏁伴噺,
- name: item.鐘舵��,
- itemStyle: {
- color: color // 涓烘瘡涓姸鎬佽缃搴旂殑棰滆壊
- }
- };
- });
+ // 鍥捐〃鐨勯厤缃」
+ var option = {
+ title: {
+ text: '璁惧鐘舵�佸垎鏋愬姣�',
+ left: 'center',
+ top: '10%', // 灏嗘爣棰樻斁缃埌椤堕儴
+ textStyle: {
+ color: 'red', // 璁剧疆鏍囬瀛椾綋棰滆壊涓虹孩鑹�
+ fontSize: 18,
+ fontWeight: 'bold'
+ }
+ },
+ tooltip: {
+ trigger: 'item'
+ },
+ legend: {
+ orient: 'vertical',
+ left: 'left'
+ },
+ series: [{
+ name: '璁惧鐘舵��',
+ type: 'pie',
+ radius: '50%',
+ data: data, // 浣跨敤鍔ㄦ�佺敓鎴愮殑鏁版嵁
+ emphasis: {
+ itemStyle: {
+ shadowBlur: 10,
+ shadowOffsetX: 0,
+ shadowColor: 'rgba(0, 0, 0, 0.5)'
+ }
+ }
+ }],
+ graphic: [{
+ type: 'text',
+ left: 'center',
+ top: '85%', // 璋冩暣鏂囨湰浣嶇疆锛岃鍏剁◢寰洿寰�涓�
+ style: {
+ text: `寮�鏈虹巼: ${onlineRate}%`, // 鏄剧ず寮�鏈虹巼
+ font: '16px Arial',
+ fill: '#00aaff' // 浣跨敤娴呰摑鑹叉樉绀哄紑鏈虹巼
+ }
+ }]
+ };
- // 鍥捐〃鐨勯厤缃」
- var option = {
- title: {
- text: '璁惧鐘舵�佸垎鏋愬姣�',
- left: 'center',
- top: '10%', // 灏嗘爣棰樻斁缃埌椤堕儴
- textStyle: {
- color: 'red', // 璁剧疆鏍囬瀛椾綋棰滆壊涓虹孩鑹�
- fontSize: 18,
- fontWeight: 'bold'
- }
- },
- tooltip: {
- trigger: 'item'
- },
- legend: {
- orient: 'vertical',
- left: 'left'
- },
- series: [{
- name: '璁惧鐘舵��',
- type: 'pie',
- radius: '50%',
- data: data, // 浣跨敤鍔ㄦ�佺敓鎴愮殑鏁版嵁
- emphasis: {
- itemStyle: {
- shadowBlur: 10,
- shadowOffsetX: 0,
- shadowColor: 'rgba(0, 0, 0, 0.5)'
- }
- }
- }],
- graphic: [{
- type: 'text',
- left: 'center',
- top: '85%', // 璋冩暣鏂囨湰浣嶇疆锛岃鍏剁◢寰洿寰�涓�
- style: {
- text: `寮�鏈虹巼: ${onlineRate}%`, // 鏄剧ず寮�鏈虹巼
- font: '16px Arial',
- fill: '#00aaff' // 浣跨敤娴呰摑鑹叉樉绀哄紑鏈虹巼
- }
- }]
- };
+ // 璁剧疆鍥捐〃鐨勯厤缃」
+ mychart3.setOption(option);
+ }
- // 璁剧疆鍥捐〃鐨勯厤缃」
- mychart3.setOption(option);
- },
- //鏌辩姸鍥�4
- async get_Histogram4(mychart4, chartData3) {
- // 榛樿鐨刼ption缁撴瀯
- var option = {
- title: {
- text: '缁翠慨', // 榛樿鏍囬涓虹┖
- left: 'center',
- top: '10%', // 璋冩暣鏍囬浣嶇疆锛屾斁鍒版渶涓婇潰
- textStyle: {
- fontSize: 18,
- color: '#ff0000'
- }
- },
- axisLabel: {
- show: true,
- interval: 0,
- color: '#15b1fa',
- formatter: function(value) {
- var ret = ""; //鎷兼帴鍔燶n杩斿洖鐨勭被鐩」
- var maxLength = 1; //姣忛」鏄剧ず鏂囧瓧涓暟
- var valLength = value.length; //X杞寸被鐩」鐨勬枃瀛椾釜鏁�
- var rowN = Math.ceil(valLength / maxLength); //绫荤洰椤归渶瑕佹崲琛岀殑琛屾暟
- if (rowN > 1) //濡傛灉绫荤洰椤圭殑鏂囧瓧澶т簬3,
- {
- for (var i = 0; i < rowN; i++) {
- var temp = ""; //姣忔鎴彇鐨勫瓧绗︿覆
- var start = i * maxLength; //寮�濮嬫埅鍙栫殑浣嶇疆
- var end = start + maxLength; //缁撴潫鎴彇鐨勪綅缃�
- //杩欓噷涔熷彲浠ュ姞涓�涓槸鍚︽槸鏈�鍚庝竴琛岀殑鍒ゆ柇锛屼絾鏄笉鍔犱篃娌℃湁褰卞搷锛岄偅灏变笉鍔犲惂
- temp = value.substring(start, end) + "\n";
- ret += temp; //鍑�熸渶缁堢殑瀛楃涓�
- }
- return ret;
- } else {
- return value;
- }
- }
- },
- grid: {
- top: '25%', // 璋冩暣grid鐨則op鍊硷紝缁欐爣棰樼暀鍑虹┖闂�
- bottom: '20%',
- left: '10%',
- right: '10%'
- },
- xAxis: {
- type: 'category',
- data: [] // 榛樿x杞存暟鎹负绌�
- },
- yAxis: {
- type: 'value'
- },
- series: [{
- data: [], // 榛樿series鏁版嵁涓虹┖
- type: 'bar'
- }]
- };
+ },
- // 濡傛灉鏈夋暟鎹紝鏇存柊option鐨勫唴瀹�
- if (chartData3 && chartData3.length > 0) {
- option.title.text = '缁翠慨'; // 姝e父鏁版嵁鏃舵病鏈夋爣棰�
- option.xAxis.data = chartData3.map(item => item.缁翠慨椤圭洰); // 璁剧疆x杞存暟鎹�
- option.series[0].data = chartData3.map(item => item['缁翠慨娆℃暟']); // 璁剧疆y杞存暟鎹�
+ //鏌辩姸鍥�4
+ async get_Histogram4(mychart4, chartData3) {
+ // 榛樿鐨刼ption缁撴瀯
+ var option = {
+ title: {
+ text: '缁翠慨', // 榛樿鏍囬涓虹┖
+ left: 'center',
+ top: '10%', // 璋冩暣鏍囬浣嶇疆锛屾斁鍒版渶涓婇潰
+ textStyle: {
+ fontSize: 18,
+ color: '#ff0000'
+ }
+ },
+ axisLabel: {
+ show: true,
+ interval: 0,
+ color: '#15b1fa',
+ formatter: function(value) {
+ var ret = ""; //鎷兼帴鍔燶n杩斿洖鐨勭被鐩」
+ var maxLength = 1; //姣忛」鏄剧ず鏂囧瓧涓暟
+ var valLength = value.length; //X杞寸被鐩」鐨勬枃瀛椾釜鏁�
+ var rowN = Math.ceil(valLength / maxLength); //绫荤洰椤归渶瑕佹崲琛岀殑琛屾暟
+ if (rowN > 1) //濡傛灉绫荤洰椤圭殑鏂囧瓧澶т簬3,
+ {
+ for (var i = 0; i < rowN; i++) {
+ var temp = ""; //姣忔鎴彇鐨勫瓧绗︿覆
+ var start = i * maxLength; //寮�濮嬫埅鍙栫殑浣嶇疆
+ var end = start + maxLength; //缁撴潫鎴彇鐨勪綅缃�
+ //杩欓噷涔熷彲浠ュ姞涓�涓槸鍚︽槸鏈�鍚庝竴琛岀殑鍒ゆ柇锛屼絾鏄笉鍔犱篃娌℃湁褰卞搷锛岄偅灏变笉鍔犲惂
+ temp = value.substring(start, end) + "\n";
+ ret += temp; //鍑�熸渶缁堢殑瀛楃涓�
+ }
+ return ret;
+ } else {
+ return value;
+ }
+ }
+ },
+ grid: {
+ top: '25%', // 璋冩暣grid鐨則op鍊硷紝缁欐爣棰樼暀鍑虹┖闂�
+ bottom: '20%',
+ left: '10%',
+ right: '10%'
+ },
+ xAxis: {
+ type: 'category',
+ data: [] // 榛樿x杞存暟鎹负绌�
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [{
+ data: [], // 榛樿series鏁版嵁涓虹┖
+ type: 'bar'
+ }],
+ animation: false
+ };
- option.series[0].label = {
- normal: {
- show: true,
- position: 'top',
- formatter: function(params) {
- return echarts.format.addCommas(params.value);
- }
- }
- };
+ // 濡傛灉鏈夋暟鎹紝鏇存柊option鐨勫唴瀹�
+ if (chartData3 && chartData3.length > 0) {
+ option.title.text = '缁翠慨'; // 姝e父鏁版嵁鏃舵病鏈夋爣棰�
+ option.xAxis.data = chartData3.map(item => item.缁翠慨椤圭洰); // 璁剧疆x杞存暟鎹�
+ option.series[0].data = chartData3.map(item => item['缁翠慨娆℃暟']); // 璁剧疆y杞存暟鎹�
- option.series[0].itemStyle = {
- normal: {
- color: '#15b1fa',
- label: {
- show: true // 鍦ㄦ煴鐘跺浘涓婃樉绀烘暟鎹�
- }
- }
- };
- } else {
- // 娌℃湁鏁版嵁鏃讹紝鏄剧ず"鏆傛棤鏁版嵁"鎻愮ず
- option.title.text = '鏆傛棤鏁版嵁';
- }
+ option.series[0].label = {
+ normal: {
+ show: true,
+ position: 'top',
+ formatter: function(params) {
+ return echarts.format.addCommas(params.value);
+ }
+ }
+ };
- // 鏇存柊鍥捐〃
- mychart4.setOption(option);
- },
- initCharts(data) {
- try {
- let {
- h_p_Sc_FourStateDistributionReport,
- h_p_Sc_FourStateDistributionReport1,
- h_p_Sc_FourStateDistributionReport2,
- h_p_Sc_FourStateDistributionReport3
- } = data
-
- // 鑳芥樉绀烘殏鏃犳暟鎹紝浣嗘槸闇�瑕佹覆鏌撲袱娆″浘琛�
- this.initHistogram1 = this.initHistogram1(h_p_Sc_FourStateDistributionReport);
- this.initLineChart = this.initLineChart(h_p_Sc_FourStateDistributionReport1);
- this.initStatistics = this.initStatistics(h_p_Sc_FourStateDistributionReport2);
- this.initHistogram4 = this.initHistogram4(h_p_Sc_FourStateDistributionReport3);
- } catch (e) {
- console.error(e)
- }
- },
- async initHistogram1(data) {
- const chart = await this.$refs.chartRef1.init(echarts)
- this.get_Histogram1(chart, data)
- },
- async initLineChart(data) {
- const chart = await this.$refs.chartRef2.init(echarts)
- this.get_LineChart(chart, data)
- },
- async initStatistics(data) {
- const chart = await this.$refs.chartRef3.init(echarts)
- this.get_Statistics(chart, data)
- },
- async initHistogram4(data) {
- const chart = await this.$refs.chartRef4.init(echarts)
- this.get_Histogram4(chart, data)
- }
- },
- onLoad(options) {
- let {
- HDeptID,
- HSourceID
- } = options
- this.doRequest(
- "/Sc_HEquipStateDistribution/Get_EquipStateDistribution_FourReport", {
- sWhere: {
- "HDeptID": HDeptID,
- "HSourceID": HSourceID
- },
- user: this.userInfo.HEmpName,
- OrganizationID: this.organInfo.id
- },
- function(res) {
- let res1 = res.data
- this.initCharts(res1.data)
- },
- function(err) {
- uni.showToast({
- icon: "fail",
- title: '鎺ュ彛璇锋眰澶辫触!'
- })
- }
- )
- },
- }
+ option.series[0].itemStyle = {
+ normal: {
+ color: '#15b1fa',
+ label: {
+ show: true // 鍦ㄦ煴鐘跺浘涓婃樉绀烘暟鎹�
+ }
+ }
+ };
+ } else {
+ // 娌℃湁鏁版嵁鏃讹紝鏄剧ず"鏆傛棤鏁版嵁"鎻愮ず
+ option.title.text = '鏆傛棤鏁版嵁';
+ }
+
+ // 鏇存柊鍥捐〃
+ mychart4.setOption(option);
+ },
+ initCharts(data) {
+ try {
+ let {
+ h_p_Sc_FourStateDistributionReport,
+ h_p_Sc_FourStateDistributionReport1,
+ h_p_Sc_FourStateDistributionReport2,
+ h_p_Sc_FourStateDistributionReport3
+ } = data
+
+ // 鑳芥樉绀烘殏鏃犳暟鎹紝浣嗘槸闇�瑕佹覆鏌撲袱娆″浘琛�
+ this.initHistogram1 = this.initHistogram1(h_p_Sc_FourStateDistributionReport);
+ this.initLineChart = this.initLineChart(h_p_Sc_FourStateDistributionReport1);
+ this.initStatistics = this.initStatistics(h_p_Sc_FourStateDistributionReport2);
+ this.initHistogram4 = this.initHistogram4(h_p_Sc_FourStateDistributionReport3);
+ } catch (e) {
+ console.error(e)
+ }
+ },
+ async initHistogram1(data) {
+ const chart = await this.$refs.chartRef1.init(echarts)
+ this.get_Histogram1(chart, data)
+ },
+ async initLineChart(data) {
+ const chart = await this.$refs.chartRef2.init(echarts)
+ this.get_LineChart(chart, data)
+ },
+ async initStatistics(data) {
+ const chart = await this.$refs.chartRef3.init(echarts)
+ this.get_Statistics(chart, data)
+ },
+ async initHistogram4(data) {
+ const chart = await this.$refs.chartRef4.init(echarts)
+ this.get_Histogram4(chart, data)
+ },
+ doOperation(e) {
+ let ds = e.target
+ let type = ds.dataset.type
+ if (type) {
+ switch (type) {
+ case "equipBegin":
+ // 瀵艰埅鍒� 璁惧寮�鏈哄崟
+ uni.navigateTo({
+ url: "/pages/MJGL/Sb_EquipBegin/Sb_EquipBeginBill?HEquipID=" + this.HEquipID
+ });
+ break;
+ case "equipStop":
+ // 瀵艰埅鍒� 璁惧鍋滄満鍗�
+ uni.navigateTo({
+ url: "/pages/MJGL/Sb_EquipStop/Sb_EquipStopBill?HEquipID=" + this.HEquipID
+ });
+ break;
+ case "workDotCheck":
+ // 瀵艰埅鍒扮偣妫�璁板綍
+ uni.navigateTo({
+ url: "/pages/MJGL/Sc_WorkDotCheck/Sc_WorkDotCheckBillList_Day?operationType=璁惧&HEquipID=" + this.HEquipID
+ });
+ ;break;
+ case "equipConkBook":
+ // 瀵艰埅鍒拌澶囨晠闅滅櫥璁板崟
+ uni.navigateTo({
+ url: "/pages/MJGL/Sb_EquipConkBook/Sb_EquipConkBookBill?operationType=4&HEquipID=" + this.HEquipID
+ })
+ ;break;
+ case "equipResume":
+ // 瀵艰埅鍒拌澶囧饱鍘�
+ uni.navigateTo({
+ url: "/pages/MJGL/Sb_EquipResumeCheckQuery/Sb_EquipResumeCheckQuery?operationType=4&HEquipID=" + this.HEquipID
+ })
+ ;break;
+ case "equipmentProcess":
+ // 瀵艰埅鍒拌澶囧伐鑹�
+ if(!this.HICMOInterID && !this.HICMOEntryID) {
+ CommonUtils.showTips({
+ message: "褰撳墠璁惧鏃犵敓浜ц鍗曪紝鏃犳硶鏌ョ湅宸ヨ壓"
+ })
+ }
+ uni.navigateTo({
+ url: "/pages/MJGL/Sc_EquipmentProcessList/Sc_EquipmentProcess?operationType=4&HEquipID=" + this.HEquipID
+ + `&HICMOInterID=${this.HICMOInterID}&HICMOEntryID=${this.HICMOEntryID}`
+ })
+ ;break;
+ default:
+ return;
+ }
+ }
+ },
+ async getDiagram(HDeptID, HSourceID) {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Sc_HEquipStateDistribution/Get_EquipStateDistribution_FourReport",
+ data: {
+ sWhere: {
+ "HDeptID": HDeptID,
+ "HSourceID": HSourceID
+ },
+ user: getUserInfo()["Czymc"],
+ OrganizationID: this.organInfo.id
+ }
+ })
+
+ let res1 = res.data
+ this.initCharts(res1.data)
+ } catch (err) {
+ uni.showToast({
+ icon: "fail",
+ title: '鎺ュ彛璇锋眰澶辫触!'
+ })
+ }
+ }
+ },
+ onLoad(options) {
+ let {
+ HDeptID,
+ HSourceID,
+ HEquipID,
+ HICMOInterID,
+ HICMOEntryID
+ } = options
+ this.HEquipID = HEquipID
+ this.HICMOInterID = HICMOInterID
+ this.HICMOEntryID = HICMOEntryID
+
+ this.getDiagram(HDeptID, HSourceID)
+ },
+ }
</script>
<style lang="scss">
- * {
- box-sizing: border-box;
- }
+ * {
+ box-sizing: border-box;
+ }
- .container {
- padding: 20rpx 40rpx;
- display: flex;
- flex-direction: column;
- gap: 20rpx;
+ .container {
+ padding: 20rpx 40rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
- >div {
- padding: 10rpx;
- }
+ >div {
+ padding: 10rpx;
+ }
- .operation-zone {
+ .operation-zone {
- >button {
- margin-right: 10rpx;
- margin-top: 10rpx;
- width: auto;
- }
+ >button {
+ margin-right: 10rpx;
+ margin-top: 10rpx;
+ width: auto;
+ }
- >button:last-child {
- margin-right: 0;
- }
+ >button:last-child {
+ margin-right: 0;
+ }
- }
- }
+ }
+ }
</style>
\ No newline at end of file
diff --git a/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai.vue b/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai.vue
index 39e278f..b9c29c0 100644
--- a/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai.vue
+++ b/pages/shebeiyunxingzhuangtai/shebeiyunxingzhuangtai.vue
@@ -53,6 +53,10 @@
<uni-icons type="smallcircle-filled" size="14"
color=""></uni-icons><text>{{item["璁惧鐘舵��"]}}</text>
</view>
+ <view class="op2" v-if="item['璁惧鐘舵��']=='鏁呴殰'">
+ <uni-icons type="smallcircle-filled" size="14"
+ color=""></uni-icons><text>{{item["璁惧鐘舵��"]}}</text>
+ </view>
<view class="op1" v-if="item['璁惧鐘舵��']=='鐢熶骇'">
<uni-icons type="smallcircle-filled" size="14"
color=""></uni-icons><text>{{item["璁惧鐘舵��"]}}</text>
@@ -91,7 +95,8 @@
departmentsTitles: [],
departmentsIdArray: [],
devices: [],
- selectedDepartment: ""
+ selectedDepartment: "",
+ HDeptID: 0
};
},
methods: {
@@ -99,7 +104,7 @@
let index = e.detail.value
this.selectedDepartment = this.departmentsTitles[index]
let id = this.departmentsIdArray[index]
-
+ this.HDeptID = id
// 鍚堝苟绋煎姩鐜囧拰OEE => Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce_MergeOEEReport
this.doRequest(
"/Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce_MergeOEEReport",
@@ -159,9 +164,11 @@
uni.hideLoading()
},
ToDetail(item) {
+ console.log('item: ',item);
uni.navigateTo({
- url: "./detail?HDeptID=" + (item['璁惧id'] || 0) + "&HSourceID=" + (item['HSourceID'] || 0)
- })
+ url: "./detail?HDeptID=" + (this.HDeptID || 0) + "&HSourceID=" + (item['HSourceID'] || 0) + `&HEquipID=${item['璁惧id'] || 0}`
+ + `&HICMOInterID=${item["鐢熶骇璁㈠崟涓诲唴鐮�"] || 0}&HICMOEntryID=${item["鐢熶骇璁㈠崟瀛愬唴鐮�"] || 0}`
+ })
},
async initDepartment() {
this.doRequest(
@@ -192,44 +199,50 @@
}) // 鑷姩瑙﹀彂棣栨潯鏁版嵁鐨勬洿鏂拌鍙�
},
)
- }
+ },
+ refreshEquipList() {
+ let departIndex = this.departmentsTitles.indexOf(this.selectedDepartment)
+ if (departIndex != -1) {
+ let departId = this.departmentsIdArray[departIndex]
+ // 鍚堝苟绋煎姩鐜囧拰OEE => Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce_MergeOEEReport
+ this.doRequest(
+ "/Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce_MergeOEEReport",
+ // "/Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce",
+ {
+ HDeptID: departId,
+ user: this.userInfo.Czymc,
+ OrganizationID: this.organInfo.id
+ },
+ function(res) {
+ let res1 = res.data
+ let {
+ count,
+ data
+ } = res1
+ if (count > 0) {
+ console.log(data)
+ this.devices = data["h_p_sc_HDeptSouceMOList_MergeOEEReport"].map(item => {
+ return Object.assign(item, {
+ imgSrc: "../../static/sb.png"
+ })
+ })
+ }
+ },
+ function(err) {
+ console.error(err)
+ }
+ )
+ }
+ }
},
async onLoad() {
await this.initDepartment()
},
+ async onShow() {
+ this.refreshEquipList()
+ },
onPullDownRefresh() {
- let departIndex = this.departmentsTitles.indexOf(this.selectedDepartment)
- if (departIndex != -1) {
- let departId = this.departmentsIdArray[departIndex]
- // 鍚堝苟绋煎姩鐜囧拰OEE => Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce_MergeOEEReport
- this.doRequest(
- "/Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce_MergeOEEReport",
- // "/Sc_HEquipStateDistribution/Sc_HEquipStateDistribution_Souce",
- {
- HDeptID: departId,
- user: this.userInfo.Czymc,
- OrganizationID: this.organInfo.id
- },
- function(res) {
- let res1 = res.data
- let {
- count,
- data
- } = res1
- if (count > 0) {
- console.log(data)
- this.devices = data["h_p_sc_HDeptSouceMOList_MergeOEEReport"].map(item => {
- return Object.assign(item, {
- imgSrc: "../../static/sb.png"
- })
- })
- }
- },
- function(err) {
- console.error(err)
- }
- )
- }
+ this.refreshEquipList()
uni.stopPullDownRefresh()
}
--
Gitblit v1.9.1