From c076dc095b915c1936eff1c853188cb21274ce09 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期四, 08 一月 2026 16:15:22 +0800
Subject: [PATCH] Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
---
pages/MJGL/style/MJListStyle.scss | 193 +++
pages/MJGL/MouldScrapOutBill/MouldScrapOutBill.vue | 43
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue | 92 +
pages.json | 28
pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBillList.vue | 472 +++++++
pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue | 736 +++++++++++
pages/MJGL/style/MJBillStyle.scss | 9
pages/zutuo_xiaowei/form_xiaowei.vue | 2
pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBillList.vue | 472 +++++++
pages/index/tab3.vue | 30
pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue | 805 ++++++++++++
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBillList.vue | 476 +++++++
components/MJGL/BillSelectorPopup.vue | 315 +++++
13 files changed, 3,635 insertions(+), 38 deletions(-)
diff --git a/components/MJGL/BillSelectorPopup.vue b/components/MJGL/BillSelectorPopup.vue
new file mode 100644
index 0000000..68053ed
--- /dev/null
+++ b/components/MJGL/BillSelectorPopup.vue
@@ -0,0 +1,315 @@
+<template>
+ <view>
+ <uni-popup ref="popup" type="bottom" @change="popupChangeHandler">
+ <view class="content">
+ <view class="search-condition">
+ <view class="title"><text>鍗曟嵁鍙�: </text></view>
+ <view class="right"><input type="text" v-model="HBillNo" @confirm="getBillList" /></view>
+ </view>
+ <view class="buttons">
+ <view style="flex: 1;"></view>
+ <button size="mini" type="primary" @click="search">鏌ヨ</button>
+ <button size="mini" type="primary" @click="exit">閫�鍑�</button>
+ </view>
+ <scroll-view id="#BillListPanel" scroll-y="true" style="height: 55vh;">
+ <view class="card-item" v-show="HBillList.length != 0">
+ <uni-card
+ v-for="(bill, index) in HBillList[curPage-1]" :key="index" @tap="clickCard(bill, index)">
+ <view class="card-detail" v-for="(HBillField, index) in emptyValueFilter(bill,HBillFieldsList).slice(0,10)" :key="index">
+ <template v-if="HBillField.ColmType == 'DateTime'"><text>{{ HBillField.ColmCols }}锛�</text>{{ bill[HBillField.ColmCols] ? dayjs(bill[HBillField.ColmCols]).format("YYYY-MM-DD HH:mm:ss") : "" }} </template>
+ <template v-else><text>{{ HBillField.ColmCols }}锛�</text>{{ bill[HBillField.ColmCols] }}</template>
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+ <view class="card-detail" v-for="(HBillField, index) in emptyValueFilter(bill,HBillFieldsList).slice(10,-1)" :key="index">
+ <template v-if="HBillField.ColmType == 'DateTime'"><text>{{ HBillField.ColmCols }}锛�</text>{{ bill[HBillField.ColmCols] ? dayjs(bill[HBillField.ColmCols]).format("YYYY-MM-DD HH:mm:ss") : "" }} </template>
+ <template v-else><text>{{ HBillField.ColmCols }}锛�</text>{{ bill[HBillField.ColmCols] }}</template>
+ </view>
+ </view>
+ <view class="more" v-if="showDetail == index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;" @tap.stop="showDetail = -1">
+ <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14" ></uni-icons>鏀惰捣
+ </view>
+ <!-- <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view> -->
+ </view>
+ <view class="more" v-if="showDetail != index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;" @tap.stop="showDetail = index">
+ <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+ </view>
+ <!-- <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view> -->
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-show="HBillList.length == 0">鏆傛棤鏁版嵁</view>
+ </scroll-view>
+ <uni-pagination id="#pagination" title="鏍囬鏂囧瓧" v-model="curPage" :pageSize="size"
+ :total="length"></uni-pagination>
+ </view>
+ </uni-popup>
+ </view>
+</template>
+
+<script>
+ import dayjs from 'dayjs';
+ import {
+ CommonUtils
+ } from '@/utils/common';
+ import {
+ getUserInfo
+ } from '@/utils/auth';
+ export default {
+ name: "billSelectorPopup",
+ emits: ["update:modelValue"],
+ data() {
+ return {
+ showDetail: -1,
+ operations: -1,
+ dayjs: dayjs,
+ enablefocus: false,
+ size: 20,
+ curPage: 1,
+ length: 0,
+ page: 0,
+ HName: '',
+ HCode: '',
+ HBillNo: '',
+ HBillList: [], // 琛ㄥ崟鏁版嵁闆嗗悎
+ HBillFieldsList: [], // 琛ㄥ崟瀛楁闆嗗悎
+ panelHeight: 0,
+
+ refTargetKey: 0,
+ multiSouceBillList: [],
+
+ };
+ },
+ props: {
+ HStockOrgID: {
+ type: [String, Number],
+ },
+ },
+ mounted() {},
+ methods: {
+ popupChangeHandler(e) {
+ if (e.show === true) {
+
+ }
+ },
+ async exit() {
+ this.size = 20
+ this.curPage = 1
+ this.length = 0
+ this.page = 0
+ this.HSourceBillNo = ''
+ this.HMater = ''
+ this.HCustom = ''
+ this.HBillList = []
+ this.enablefocus = false
+ this.multiSouceBillList = []
+ // 闇�瑕佺瓑寰呴〉闈㈠唴鐨勬暟鎹祴鍊煎畬姣�
+ await this.$nextTick()
+ this.$refs.popup.close();
+ },
+ search() {
+ this.getBillList()
+ },
+ async showPopup(index) {
+ this.$refs.popup.open();
+ this.refTargetKey = index
+ this.getBillList()
+ },
+ clickCard(bill, index) {
+ console.log('this.HBillList: ',this.HBillList);
+ let retVal = {}
+ retVal[this.refTargetKey] = this.HBillList[0].filter(item => item.hmainid == bill.hmainid)
+ this.$emit("update", {
+ retVal: retVal,
+ index: this.refTargetKey
+ })
+ },
+ getsWhere() {
+ let sWhere =
+ ``
+
+ // if (this.HCode) {
+ // swhere += ` and 涓嶈壇鍘熷洜浠g爜 like '%${this.HCode}%'`
+ // }
+ if (this.HBillNo) {
+ sWhere += ` and 鍗曟嵁鍙� like '%${this.HBillNo}%'`
+ }
+
+ if(this.refTargetKey) {
+ sWhere += ` and 璁惧ID = ${this.refTargetKey}`
+ }
+ return sWhere
+ },
+ getBillList() {
+ let sWhere = this.getsWhere()
+ console.log('sWhere: ',sWhere);
+ this.HBillList = []
+ this.length = 0
+ this.page = 0
+ this.curPage = 1
+ CommonUtils.doRequest(
+ "/Web/GetEquipmentBillsList", {
+ sWhere: sWhere,
+ user: getUserInfo()['Czymc'],
+ Type: "BY"
+ },
+ (res) => {
+ let {
+ data,
+ count,
+ list,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.length = Array.from(data).length
+ const result = [];
+ for (let i = 0; i < data.length; i += this.size) {
+ result.push(data.slice(i, i + this.size));
+ }
+ this.HBillList = result
+ // 杩囨护涓嶉渶瑕佹樉绀虹殑瀛楁
+ this.HBillFieldsList = Array.from(list)
+ .filter(e => this.shouldShowField(e.ColmCols) == true)
+ this.page = result.length
+ setTimeout(() => {
+ this.enablefocus = true
+ }, 500)
+ } else {
+ setTimeout(() => {
+ this.enablefocus = true
+ }, 500)
+ uni.showModal({
+ title: '娓╅Θ鎻愮ず',
+ content: Message
+ })
+ }
+ }
+ )
+ },
+ // 鍒ゆ柇鍝簺瀛楁闇�瑕佹樉绀�
+ shouldShowField(key) {
+ // 鎺掗櫎涓嶉渶瑕佹樉绀虹殑瀛楁
+ const excludeKeys = []; // 杩欎簺瀛楁宸茬粡鍦ㄥ叾浠栧湴鏂规樉绀轰簡
+
+ // 鍒ゆ柇key鏄惁鍏ㄨ嫳鏂囷紙涓嶅寘鍚腑鏂囷級
+ const isAllEnglish = /^[a-zA-Z]+$/.test(key);
+
+ // 鍒ゆ柇key鏄惁鍖呭惈"ID"锛堜笉鍖哄垎澶у皬鍐欙級
+ const containsID = key.toUpperCase().includes('ID');
+
+ return !excludeKeys.includes(key) &&
+ !isAllEnglish && // 鎺掗櫎鍏ㄨ嫳鏂囩殑key
+ !containsID // 鎺掗櫎鍖呭惈ID鐨刱ey
+ },
+ emptyValueFilter(item, fieldList){
+ return fieldList.filter(e => item[e.ColmCols])
+ }
+ },
+ }
+</script>
+
+<style lang="scss" scoped>
+ .content {
+ box-sizing: border-box;
+ border-radius: 15rpx 15rpx 0 0;
+ padding: 20rpx 20rpx 40rpx 20rpx;
+ background-color: #fff;
+ display: flex;
+ flex-direction: column;
+ gap: 10rpx;
+
+ .search-condition {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ gap: 20rpx;
+ font-size: 30rpx;
+
+ .title {
+ width: 5rem;
+ text-align: right;
+ }
+
+ .right {
+ flex: 1;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ height: auto;
+ padding: 8rpx 16rpx;
+
+ input {
+ width: 100%;
+ font-size: 30rpx;
+ }
+ }
+ }
+
+ .buttons {
+ display: flex;
+ flex-direction: row;
+ gap: 20rpx;
+ justify-content: flex-end;
+
+ >button {
+ display: inline-flex;
+ width: 4rem;
+ }
+ }
+
+ .card-item {
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-start;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ margin-bottom: 12rpx;
+ color: #555;
+ margin-right: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+ }
+
+ .uni-card--is-active {
+ background-color: rgba(0, 122, 255, 0.2);
+ }
+
+ .daterange {
+ display: flex;
+ flex-direction: row;
+ gap: 10rpx;
+ justify-content: center;
+ align-items: center;
+
+ }
+ }
+
+ .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.json b/pages.json
index 4a631ba..04d884f 100644
--- a/pages.json
+++ b/pages.json
@@ -1435,6 +1435,34 @@
{
"navigationBarTitleText" : "鍦ㄥ簱妫�楠屽崟鍒楄〃"
}
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBillList",
+ "style" :
+ {
+ "navigationBarTitleText" : "璁惧鐐规璁板綍鍗曠紦瀛�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBillList",
+ "style" :
+ {
+ "navigationBarTitleText" : "璁惧淇濆吇璁板綍鍗曠紦瀛�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill",
+ "style" :
+ {
+ "navigationBarTitleText" : "璁惧缁翠慨楠屾敹鍗�"
+ }
+ },
+ {
+ "path" : "pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBillList",
+ "style" :
+ {
+ "navigationBarTitleText" : "璁惧缁翠慨楠屾敹鍗曠紦瀛�"
+ }
}
],
diff --git a/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill.vue b/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill.vue
index cee2d24..37289d2 100644
--- a/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill.vue
+++ b/pages/MJGL/MouldScrapOutBill/MouldScrapOutBill.vue
@@ -72,7 +72,7 @@
</picker>
</view>
</view>
- <view class="form-item">
+ <!-- <view class="form-item">
<view class="title">婧愬崟绫诲瀷:</view>
<view class="right" :class="showHMainSourceBillType?'':'disabled'">
<zxz-uni-data-select
@@ -86,7 +86,22 @@
@change="HSourceBillTypeNameChange"
></zxz-uni-data-select>
</view>
- </view>
+ </view> -->
+ <view class="form-item">
+ <view class="title">婧愬崟绫诲瀷:</view>
+ <view class="right" v-show="showHMainSourceBillType">
+ <picker :range="arrayHMainSourceBillType"
+ @change="HMainSourceBillTypeChange">
+ <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ <view class="picker-overlay"></view>
+ </picker>
+ </view>
+ <view class="righton" v-show="!showHMainSourceBillType">
+ <input name="HMainSourceBillType" disabled v-model="HMainSourceBillType"
+ placeholder="璇烽�夋嫨婧愬崟绫诲瀷" />
+ </view>
+ </view>
<view class="form-item">
<view class="title">婧愬崟鍗曞彿:</view>
<view class="right" v-show="showHSourceBillNo">
@@ -200,12 +215,14 @@
showHStockPlaceName: true,
HMouldList:[],
isEdit: false,
-
+ arrayHMainSourceBillType: ['鍣ㄥ叿鎶ュ簾鐢宠鍗�', '鎵嬪伐褰曞叆'],
+ HMainSourceBillType: '鍣ㄥ叿鎶ュ簾鐢宠鍗�',
+ arrayHMainSourceBillValue: ['3823', '-1'],
showHMainSourceBillType: true,
showHSourceBillNo: true,
//婧愬崟绫诲瀷
- HSourceBillTypeList:[{typeID:"-1",typeName:"鎵嬪伐褰曞叆"}],
+ HSourceBillTypeList:[{typeID:"-1",typeName:"鎵嬪伐褰曞叆"},{typeID:"3823",typeName:"鍣ㄥ叿鎶ュ簾鐢宠鍗�"}],
hform: {
HBarCode: '',
HInterID: '',
@@ -221,7 +238,7 @@
HDeptName: getUserInfo().HDept,
HDeptID: getUserInfo().HDeptID,
//婧愬崟淇℃伅
- HMainSourceBillType: "-1",
+ HMainSourceBillType:uni.getStorageSync('billTypeName_3832') ? uni.getStorageSync('billTypeName_3832'):'鍣ㄥ叿鎶ュ簾鐢宠鍗�',
HSourceBillNo: '', //CGDD000200
HDate: getDateTime.dateTimeStr('y-m-d'),
HMaker: uni.getStorageSync('HUserName'),
@@ -783,6 +800,19 @@
showBillList() {
this.$refs.billList.showPopup()
},
+
+ HMainSourceBillTypeChange(e) {
+ this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value]
+
+ let index = this.arrayHMainSourceBillType.findIndex(e => e == this.HMainSourceBillType)
+ if (index != -1) {
+ this.hform.HMainSourceBillType = this.arrayHMainSourceBillValue[index]
+ // this.getHYDList()
+ }
+ console.log(this.hform.HMainSourceBillType)
+ uni.setStorageSync("billType_3823",this.hform.HMainSourceBillType);
+ uni.setStorageSync("billTypeName_3823",this.HMainSourceBillType);
+ },
HSourceBillTypeNameChange(e) {
const pages = getCurrentPages()
@@ -795,8 +825,9 @@
},
//閫変腑婧愬崟
getHBarCodeData(HBarCode) {
+ console.log("HInterID",this.hform.HInterID,"HBillNo",this.hform.HBillNo,"HBillType",this.hform.HBillType)
uni.request({
- url: this.serverUrl + '/MouldController/Get_SourceBarCode_ProdOut_Json',
+ url: this.serverUrl + '/MouldController/Get_SourceBarCode_ScrapRequest_Json',
data: {
HInterID: this.hform.HInterID,
HBillNo: this.hform.HBillNo,
diff --git a/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue b/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
index 1aef13a..c4a1998 100644
--- a/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
+++ b/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
@@ -50,13 +50,13 @@
<radio-group @change="radioChange" class="radio_Container">
<label>
<view>
- <radio value="OK" :checked="hform.HLastResult == 'OK'" />
+ <radio value="OK" :checked="calcHLastResult == 'OK'" />
<text>OK</text>
</view>
</label>
</label>
<view>
- <radio value="NG" :checked="hform.HLastResult == 'NG'" />
+ <radio value="NG" :checked="calcHLastResult == 'NG'" />
<text>NG</text>
</view>
</label>
@@ -141,7 +141,10 @@
</template>
<!-- 鏄庣粏淇℃伅 -->
<template v-if="tabs == 1">
- <view class="form">
+ <view class="form" :style="{
+ height: containerHeight + 'px',
+ overflow: 'auto'
+ }">
<view class="form-item">
<view class="left">
璁惧鐐规瑙勭▼
@@ -289,7 +292,6 @@
import {
MpaasScan
} from "@/utils/mpaasScan.js"
- import "@/pages/MJGL/style/MJBillStyle.scss"
import {
getUserInfo
} from "../../../utils/auth";
@@ -358,9 +360,36 @@
get() {
return this.btnTop - this.tabsBottom - 5
}
+ },
+ calcHLastResult: {
+ get() {
+ if (this.HCheckFileList.length == 0) {
+ return 'OK'
+ } else {
+ let okCount = this.HCheckFileList.reduce((acc, item) => {
+ if (item.HDotCheckResult) {
+ return acc + 1
+ }
+ return acc
+ }, 0)
+ if (okCount == this.HCheckFileList.length) {
+ return 'OK'
+ }
+ return 'NG'
+ }
+ }
}
+
},
methods: {
+ addNew() {
+ uni.redirectTo({
+ url: './Sb_EquipDotCheckBill?operationType=1'
+ })
+ },
+ goBack() {
+ uni.navigateBack()
+ },
checkBoxChangeHandler(index, e) {
let cr = e.detail.value
if (cr.length == 0) {
@@ -511,17 +540,28 @@
Message
} = res.data
- console.log('data: ', data);
- this.hform.HEquipID = data[0].HInterID
- this.hform.HBarName = data[0].璁惧鍚嶇О
- this.hform.HBarSpec = data[0].璁惧瑙勬牸
- this.hform.HBarModel = data[0].璁惧鍨嬪彿
- this.hform.HQty = 1
+ if (count == 1) {
+ console.log('data: ', data);
+ this.hform.HEquipID = data[0].HInterID
+ this.hform.HBarName = data[0].璁惧鍚嶇О
+ this.hform.HBarSpec = data[0].璁惧瑙勬牸
+ this.hform.HBarModel = data[0].璁惧鍨嬪彿
+ this.hform.HQty = 1
- // 鑾峰彇妫�楠岃绋�
- this.GetItemByEquipFile()
+ // 鑾峰彇妫�楠岃绋�
+ this.GetItemByEquipFile()
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: Message
+ })
+ }
+
} catch (err) {
-
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: err
+ })
}
},
async GetItemByEquipFile() {
@@ -626,13 +666,16 @@
},
method: "POST"
})
-
- if(!res) {
- return
+
+ if (!res) {
+ return
}
-
- let {count, Message} = res.data
- if(count == 1){
+
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
uni.showModal({
title: '鎻愮ず',
content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
@@ -640,7 +683,7 @@
if (res.confirm) {
console.log('鐢ㄦ埛鐐瑰嚮纭畾');
uni.redirectTo({
- url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill?operationType=1'
+ url: '/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill?operationType=1'
})
} else if (res.cancel) {
console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
@@ -650,14 +693,14 @@
}
}
});
- }else {
+ } else {
CommonUtils.showTips({
title: "娓╅Θ鎻愮ず",
message: "鎻愪氦鍗曟嵁澶辫触: " + Message
})
}
-
-
+
+
} catch (err) {
CommonUtils.showTips({
title: "娓╅Θ鎻愮ず",
@@ -704,5 +747,6 @@
}
</script>
-<style lang="scss">
+<style lang="scss" scoped>
+ @import "@/pages/MJGL/style/MJBillStyle.scss"
</style>
\ No newline at end of file
diff --git a/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBillList.vue b/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBillList.vue
new file mode 100644
index 0000000..ba9e5cc
--- /dev/null
+++ b/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBillList.vue
@@ -0,0 +1,476 @@
+<template>
+ <view class="content">
+ <view class="form">
+ <view class="form-item">
+ <view class="title">寮�濮嬫椂闂�:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate">
+ <input :value="hform.HBeginDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁撴潫鏃堕棿:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate">
+ <input :value="hform.HEndDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view v-if="showmore">
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right">
+ <input v-model="hform.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" />
+ </view>
+ </view>
+
+ </view>
+ <view class="other">
+ <view v-if="!showmore" @tap="changeShowMore">
+ 灞曞紑鍏朵粬鏉′欢<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons>
+ </view>
+ <view v-if="showmore" @tap="changeShowMore">
+ 鎶樺彔鍏朵粬鏉′欢<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons>
+ </view>
+ </view>
+
+ <view class="buttons">
+ <button class="btn-a" size="mini" type="default" @tap="clear">閲嶇疆</button>
+ <button class="btn-b" size="mini" type="default" @tap="creat">鏂板</button>
+ <button class="btn-c" size="mini" type="default" @tap="search">鏌ヨ</button>
+ </view>
+ </view>
+
+ <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;" id="divide"></view>
+
+ <view :style="{
+ height: calcContentHeight + 'px',
+ overflowY: 'auto'
+ }">
+
+ <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0">
+ <uni-card :title="item.鍒跺崟鏃ユ湡.substr(0,10)" :extra="item.鍗曟嵁鍙�" style="margin: 10px;"
+ @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <view class="detail" v-if="item.鍒跺崟浜�">
+ <text>鍒跺崟浜猴細</text>{{item.鍒跺崟浜簘}
+ </view>
+ <view class="detail" v-if="item.璁惧浠g爜">
+ <text>璁惧浠g爜锛�</text>{{item.璁惧浠g爜}}
+ </view>
+ <view class="detail" v-if="item.璁惧鍚嶇О">
+ <text>璁惧鍚嶇О锛�</text>{{item.璁惧鍚嶇О}}
+ </view>
+ <view class="detail" v-if="item.鏈�缁堢粨璁�">
+ <text>鏈�缁堢粨璁猴細</text>{{item.鏈�缁堢粨璁簘}
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+ <view class="detail" v-if="item.琛ㄥご澶囨敞">
+ <text>琛ㄥご澶囨敞锛�</text>{{item.琛ㄥご澶囨敞}}
+ </view>
+ <view class="detail" v-if="item.寮�濮嬫棩鏈�">
+ <text>寮�濮嬫棩鏈燂細</text>{{dayjs(item.寮�濮嬫棩鏈�).format("YYYY-MM-DD HH:mm:DD")}}
+ </view>
+ <view class="detail" v-if="item.缁撴潫鏃ユ湡">
+ <text>缁撴潫鏃ユ湡锛�</text>{{dayjs(item.缁撴潫鏃ユ湡).format("YYYY-MM-DD HH:mm:DD")}}
+ </view>
+ <view class="detail" v-if="item.鐐规璁″垝缂栧彿">
+ <text>鐐规璁″垝缂栧彿锛�</text>{{item.鐐规璁″垝缂栧彿}}
+ </view>
+ <view class="detail" v-if="item.鐐规璁″垝">
+ <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.hmainid">
+ <text>鍐呴儴鍗曟嵁鍙凤細</text>{{item.hmainid}}
+ </view>
+ </view>
+
+ </view>
+
+ <view class="more" v-if="showDetail == index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="more" v-if="showDetail != index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="op" v-if="operations == index">
+ <!-- <button class="op3" size="mini" plain @tap.stop="edit(item)">缂栬緫</button> -->
+ <button class="op4" size="mini" plain @tap.stop="del(item)">鍒犻櫎</button>
+ <button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+ </view>
+ </uni-card>
+ </view>
+ </view>
+ <view class="pagination-zone" id="pagination-zone">
+ <uni-pagination show-icon :page-size="size" :total="dataLength" :current="page"
+ @change="onPaginationChangeHandler"></uni-pagination>
+ </view>
+ <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
+ </view>
+</template>
+
+<script>
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import BarCodePopupVue from "@/components/BarCodePopup/BarCodePopup.vue";
+ import {
+ CommonUtils
+ } from "../../../utils/common";
+ import dayjs from "dayjs";
+ export default {
+ data() {
+ return {
+ dayjs,
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ tabs: 0,
+ urls: '/Web/GetEquipmentBillsList',
+ MvarReportTitle: '璁惧鐐规璁板綍鍗曠紦瀛�',
+ showmore: false,
+ hform: {
+ HBillNo: '',
+ HSourceBillNo: '',
+ HBillType: 3903,
+ user: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ Type: "DJ",
+ sWhere: "",
+ HBeginDate: dayjs(new Date()).subtract(30, 'day').format("YYYY-MM-DD"),
+ HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ showDetail: -1,
+ operations: -1,
+
+ page: 1,
+ size: 50,
+ dataLength: 0,
+ divideBottom: 0,
+ paginationTop: 0,
+ }
+ },
+ onShow() {
+ //鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+ this.CheckModRight()
+ this.changeTab(0)
+ console.log(this.userInfo, uni.getStorageSync('HUserName'))
+ },
+ components: {
+ BarCodePopupVue
+ },
+ computed: {
+ calcContentHeight: {
+ get() {
+ return this.paginationTop - this.divideBottom
+ }
+
+ }
+ },
+ // onPullDownRefresh: function() {
+ // this.clear()
+ // setTimeout(() => {
+ // uni.stopPullDownRefresh();
+ // }, 1000);
+ // },
+ onReady() {
+ this.getCalcHeight()
+ },
+ methods: {
+
+ changeShowMore() {
+ this.showmore = !this.showmore
+ this.$nextTick(() => {
+ // 閲嶆柊璁$畻鍐呭瑙嗗彛楂樺害
+ this.getCalcHeight()
+ })
+ },
+ getCalcHeight() {
+ let query = uni.createSelectorQuery().in(this)
+ query
+ .select("#divide")
+ .boundingClientRect()
+ .select("#pagination-zone")
+ .boundingClientRect()
+ .exec(res => {
+ this.divideBottom = Math.ceil(res[0].bottom)
+ this.paginationTop = Math.floor(res[1].top)
+ })
+
+ },
+ async qrCodeDisplay(item) {
+ this.$refs.barcodePopup.setCodeInfo(item.HBillNo)
+ await this.$nextTick()
+ this.$refs.barcodePopup.open()
+ },
+ CheckModRight() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/CheckModRight_Json',
+ data: {
+ ModRightName: 'CE_OtherOut',
+ HUserName: uni.getStorageSync('HUserName')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {} else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ onPaginationChangeHandler({
+ current
+ }) {
+ this.page = current
+ this.showList = this.getPage(current, this.size, this.listData)
+ },
+ 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 = '/Web/GetEquipmentBillsList'
+ }
+ // if (this.tabs == 1) {
+ // this.urls = '/WEBSController/GetKf_ICStockBillQueryList_User_Json'
+ // }
+ this.search()
+ },
+ async getList() {
+ console.log('this.hform: ', this.hform);
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: this.urls,
+ data: this.hform
+ })
+
+ let {
+ count,
+ data,
+ Message
+ } = res.data
+
+ if (count == 1) {
+ if(data == null) {
+ data = []
+ }
+ this.listData = data
+ this.showList = this.getPage(this.page, this.size, data)
+ this.dataLength = data.length
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧鐐规璁板綍鍗曞け璐�: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧鐐规璁板綍鍗曞け璐�: ${err}`
+ })
+ }
+
+ },
+ search() {
+ this.hform.sWhere = ''
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ console.log(this.hform)
+ if (this.hform.HBillNo) {
+ this.hform.sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'";
+ }
+ if (this.hform.HBeginDate && this.hform.HEndDate) {
+ this.hform.sWhere +=
+ ` and 鏃ユ湡 between convert(date, '${this.hform.HBeginDate}') and convert(date, '${this.hform.HEndDate}')`;
+ }
+ this.getList()
+ },
+ clear() {
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ this.sWhere = ''
+ this.hform = {
+ HBillNo: '',
+ HSourceBillNo: '',
+ HBillType: 3903,
+ user: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ sWhere: '',
+ Type: "DJ",
+ HBeginDate: dayjs(new Date()).subtract(30, 'd').format("YYYY-MM-DD"),
+ HEndDate: dayjs(new Date()).format("YYYY-MM-DD")
+ }
+ this.search()
+ },
+ add() {
+ uni.navigateTo({
+ url: '/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill?operationType=1'
+ })
+ },
+ //缂栬緫
+ edit(item) {
+ console.log(item)
+ uni.request({
+ url: this.serverUrl + '/WEBSController/TempList_Modify_Json',
+ data: {
+ "HInterID": item.HInterID,
+ "HBillNo": item.鍗曟嵁鍙�,
+ "HBillType": this.hform.HBillType
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ uni.navigateTo({
+ url: './OtherOutBill?OperationType=2&HInterID=' + item.HInterID
+ })
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ })
+ },
+ //鍒犻櫎
+ del(item) {
+ // console.log(item.hmainid,uni.getStorageSync('HUserName'))
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄よ褰曪紵鍒犻櫎鍚庝笉鑳芥仮澶�',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.request({
+ url: this.serverUrl +
+ '/Sb_EquipDotCheckBill/DeltetEquipDotCheckBillList',
+ data: {
+ HInterID: item.hmainid,
+ user: uni.getStorageSync('HUserName'),
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ this.clear()
+ }
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ //鎾ら攢
+ revoke(item) {
+ // console.log(item.hmainid,uni.getStorageSync('HUserName'))
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '鏄惁纭鎾ら攢',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DeleteICStockBillAndWMS_Json',
+ data: {
+ HInterID: item.HInterID,
+ HBillNo: item.鍗曟嵁鍙�,
+ HBillType: this.hform.HBillType,
+ HMaker: uni.getStorageSync('HUserName'),
+ MvarReportTitle: this.MvarReportTitle,
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ this.clear()
+ }
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ @import "@/pages/MJGL/style/MJListStyle.scss"
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue b/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
index 492629a..b187042 100644
--- a/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
+++ b/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
@@ -1,19 +1,814 @@
<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="enableEdit?'right':'righton'">
+ <input :disabled="!enableEdit" v-model="hform.HBarCode"
+ @confirm="GetMessageByBarCode(hform.HBarCode)" placeholder="璇疯緭鍏�(鎴栨壂鎻�)璁惧鏉$爜" />
+ </view>
+ <view class="icon-wrapper">
+ <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">淇濆吇寮�濮�:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate">
+ <input :value="hform.HBeginDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">淇濆吇缁撴潫:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate">
+ <input :value="hform.HEndDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏈�缁堢粨璁�:</view>
+ <view class="right none-border">
+ <radio-group @change="radioChange" class="radio_Container">
+ <label>
+ <view>
+ <radio value="OK" :checked="calcHLastResult == 'OK'" />
+ <text>OK</text>
+ </view>
+ </label>
+ </label>
+ <view>
+ <radio value="NG" :checked="calcHLastResult == 'NG'" />
+ <text>NG</text>
+ </view>
+ </label>
+ </radio-group>
+ </view>
+ </view>
+
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鏃ユ湡:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HDate" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">閮ㄩ棬:</view>
+ <zxz-uni-data-select class="right" :localdata="HDeptList" dataKey="閮ㄩ棬鍚嶇О" dataValue="HItemID"
+ v-model="hform.HDeptID">
+
+ </zxz-uni-data-select>
+ <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ </view>
+ <view class="form-item">
+ <view class="title">澶囨敞:</view>
+ <view class="right">
+ <input v-model="hform.HRemark" placeholder="璇疯緭鍏ュ娉�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁惧鍚嶇О:</view>
+ <view class="righton">
+ <input v-model="hform.HBarName" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁惧瑙勬牸:</view>
+ <view class="righton">
+ <input v-model="hform.HBarSpec" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁惧鍨嬪彿:</view>
+ <view class="righton">
+ <input v-model="hform.HBarModel" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">淇濆吇璁″垝:</view>
+ <view class="righton">
+ <input v-model="hform.HPlanNo" disabled />
+ </view>
+ </view>
+ </view>
+ </template>
+ <!-- 鏄庣粏淇℃伅 -->
+ <template v-if="tabs == 1">
+ <view :style="{
+ height: containerHeight + 'px',
+ overflow: 'auto'
+ }">
+ <view class="form">
+ <view class="form-item">
+ <view class="left">
+ 璁惧淇濆吇瑙勭▼
+ </view>
+ <view class="right">
+ <input type="text" :value="hform.HEquipMaintainRuleInterNo" />
+ </view>
+ <view class="icon-wrapper">
+ <uni-icons type="search" size="20" @click="toCheckFile"></uni-icons>
+ </view>
+ </view>
+ </view>
+ <view class="list" v-for="(item,index) in HCheckFileList" :key="index">
+ <uni-card style="margin: 10px;">
+ <view class="card-detail">
+ <view class="detail">
+ <text>搴忓彿锛�</text>{{index+1}}
+ </view>
+ <view class="detail">
+ <text>缁撴灉锛�</text>
+ <checkbox-group style="display: inline-block;"
+ @change="checkBoxChangeHandler(index, $event)">
+ <checkbox value="enabled" :checked="item.HMaintainResult" />
+ </checkbox-group>
+ </view>
+ <view class="detail">
+ <text>淇濆吇椤圭洰锛�</text>{{item.HMaintainItem}}
+ </view>
+ <view class="detail" v-if="item.HMaintainPart">
+ <text>淇濆吇閮ㄤ綅锛�</text>{{item.HMaintainPart}}
+ </view>
+ <view class="detail" v-if="item.HClaim">
+ <text>鍏蜂綋瑕佹眰锛�</text>{{item.HClaim}}
+ </view>
+ <view class="detail">
+ <text>璐熻矗浜猴細</text>{{item.HManagerName}}
+ </view>
+ <view class="detail" v-if="item.Remark">
+ <text>澶囨敞锛�</text>{{item.Remark}}
+ </view>
+ </view>
+ </uni-card>
+ </view>
+ <view class="over" v-if="HCheckFileList.length == 0">鏆傛棤鏁版嵁</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>
+ <!-- 闄勪欢淇℃伅 -->
+ <template v-if="tabs == 3">
+ <view class="card-item-wrapper">
+ <view class="attachment-btns">
+ <button type="primary" size="mini" @tap="fileUpload">閫夋嫨鏂囦欢</button>
+ <view style="flex: 1;"></view>
+ </view>
+ <view v-for="(item, index) in attachmentInfo" :key="index">
+ <uni-card :title="item['fileName']" :thumbnail="item.filePath">
+ <view class="card-detail">
+ <view class="detail">
+ <text>澶у皬锛�</text>{{item["size"]}}
+ </view>
+ <view class="detail">
+ <text>鐘舵�侊細</text>{{item["status"]}}
+ </view>
+ <view class="detail operation" v-if="item['status']!='涓婁紶鎴愬姛'">
+ <text>鎿嶄綔锛�</text>
+ <button class="btn-a" size="mini" @tap.stop="uploadFile(index)">涓婁紶</button>
+ <button class="btn-b" size="mini" @tap.stop="delFile(index)">鍒犻櫎</button>
+ </view>
+ </view>
+ </uni-card>
+ </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>
+ <BillSelectorPopupVue @update="billSelectHandler" ref="billSelector"></BillSelectorPopupVue>
</view>
</template>
<script>
+ import dayjs from "dayjs";
+ import {
+ CommonUtils
+ } from "@/utils/common";
+ import {
+ MpaasScan
+ } from "@/utils/mpaasScan.js"
+ import {
+ getUserInfo
+ } from "../../../utils/auth";
+ import BillSelectorPopupVue from "../../../components/MJGL/BillSelectorPopup.vue";
export default {
+ name: 'sb_EquipMaintainBill',
+ components: {
+ BillSelectorPopupVue
+ },
data() {
return {
-
+ tabs: 0,
+ HMainSourceBillType: "",
+ btnTop: 0,
+ tabsBottom: 0,
+ HModName: "sb_EquipMaintainBill",
+ HBillType: '3901',
+ operationType: 1,
+ enableEdit: true,
+ uploadOptions: {},
+
+ HDeptList: [],
+ HShiftsList: [],
+ HCheckFileList: [],
+ attachmentInfo: [],
+
+ hform: {
+ HBarCode: "",
+ HBeginDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
+ HEndDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
+ HQty: 0,
+ HErrNote: "",
+ HBigSafeNote: "",
+ HShiftsName: "",
+ HShiftsID: 0,
+ HBillNo: "",
+ HInterID: 0,
+ HDate: dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
+ HDeptName: "",
+ HDeptID: 0,
+ HRemark: "",
+ HBarName: "",
+ HEquipID: 0,
+ HBarSpec: "",
+ HBarModel: "",
+ HPlanNo: "",
+ HPlanInterID: 0,
+ HPlanEntryID: 0,
+ HEquipMaintainPlanInterID: 0,
+ HEquipMaintainPlanEntryID: "",
+ HMaker: getUserInfo()['Czymc'],
+ HMakeDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ HUpDater: "",
+ HUpDateDate: "",
+ HChecker: "",
+ HCheckDate: "",
+ HDeleteMan: "",
+ HDeleteDate: "",
+ lngBillKey: 0,
+ lngBillSubKey: 0,
+ HLastResult: "OK"
+ }
};
+ },
+ computed: {
+ containerHeight: {
+ get() {
+ return this.btnTop - this.tabsBottom - 5
+ }
+ },
+ calcHLastResult: {
+ get() {
+ if (this.HCheckFileList.length == 0) {
+ return 'OK'
+ } else {
+ let okCount = this.HCheckFileList.reduce((acc, item) => {
+ if (item.HMaintainResult) {
+ return acc + 1
+ }
+ return acc
+ }, 0)
+ if (okCount == this.HCheckFileList.length) {
+ return 'OK'
+ }
+ return 'NG'
+ }
+ }
+ }
+
+ },
+ methods: {
+ billSelectHandler(billData) {
+ console.log('billData: ', billData);
+ let data = billData.retVal[0]
+ this.get_DocCheckItem2(data.hmainid)
+ },
+ // 鑾峰彇淇濆吇瑙勭▼
+ async get_DocCheckItem2(HEquipMaintainRuleInterID) {
+ try{
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Web/GetMaintainItemByMaintainRuleID",
+ data: {
+ "HEquipMaintainRuleInterID": HEquipMaintainRuleInterID
+ },
+ })
+
+ let {data, count, Message} = res.data
+ if(count == 1) {
+ console.log('data: ',data);
+ this.HCheckFileList = Array.from(data).map(item => {
+ return {
+ "HMaintainResult": item.榛樿缁撹 == 1 ? true : false,
+ "HMaintainItemID": item.HMaintainItemID,
+ "HMaintainNumber": item.淇濆吇椤圭洰浠g爜,
+ "HMaintainItem": item.淇濆吇椤圭洰,
+ "HMaintainPart": item.淇濆吇閮ㄤ綅,
+ "HClaim": item.鍏蜂綋瑕佹眰,
+ "HManagerID": item.璐熻矗浜篒D,
+ "HManagerNumber": item.璐熻矗浜轰唬鐮�,
+ "HManagerName": item.璐熻矗浜哄悕绉�,
+ "HRemark": "",
+ "HSourceInterID": item.淇濆吇璁″垝ID || 0,
+ "HSourceEntryID": item.淇濆吇璁″垝瀛怚D || 0,
+ "HSourceBillNo": item.淇濆吇璁″垝鍗� || ""
+ }
+ })
+
+ this.enableEdit = false
+ this.$refs["billSelector"].exit()
+
+ }else {
+ CommonUtils.showTips({
+ message: Message
+ })
+ }
+ }catch(err) {
+ CommonUtils.showTips({
+ message: err
+ })
+ }
+
+
+
+ },
+ toCheckFile() {
+ if(this.hform.HEquipID == 0) {
+ return CommonUtils.showTips({
+ message: '涓嶈兘閫夋嫨淇濆吇瑙勭▼锛岃鍏堟壂鎻忚澶囨潯鐮�!!!'
+ })
+ }
+ console.log('this.$refs: ', this.$refs);
+ this.$refs['billSelector'].showPopup(0)
+ },
+ ValidCheck() {
+ if (this.hform.HEquipID == 0) {
+ return {
+ Message: "鏈綍鍏ヨ澶囦俊鎭紝璇峰厛褰曞叆璁惧淇℃伅!",
+ state: false
+ }
+ }
+
+ return {
+ Message: "",
+ state: true
+ }
+ },
+ addNew() {
+ uni.redirectTo({
+ url: './Sb_EquipMaintainBill?operationType=1'
+ })
+ },
+ goBack() {
+ uni.navigateBack()
+ },
+ checkBoxChangeHandler(index, e) {
+ let cr = e.detail.value
+ if (cr.length == 0) {
+ this.HCheckFileList[index]["HMaintainResult"] = false
+ } else {
+ this.HCheckFileList[index]["HMaintainResult"] = true
+ }
+ },
+ uploadFile(index) {
+ console.log('filePath: ', this.attachmentInfo[index].filePath);
+ // 閫氳繃涓存椂璺緞璇诲彇鏂囦欢
+ uni.uploadFile({
+ url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile",
+ filePath: this.attachmentInfo[index].filePath,
+ name: 'file',
+ formData: {
+ HBillNo: this.hform.HBillNo,
+ HRemark: "",
+ HUserName: getUserInfo()["Czymc"]
+ },
+ success: (uploadRes) => {
+ CommonUtils.showTips({
+ message: "涓婁紶鎴愬姛"
+ })
+ this.attachmentInfo[index].status = "涓婁紶鎴愬姛"
+ },
+ fail: (err) => {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `涓婁紶澶辫触: ${err}`
+ })
+ }
+ })
+ },
+ delFile(index) {
+ console.log('attachmentInfo: ', this.attachmentInfo[index]);
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄� " ' + this.attachmentInfo[index].fileName + ' " 鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
+ success: (res) => {
+ if (res.confirm) {
+ this.attachmentInfo.splice(index, 1)
+ }
+ },
+ })
+
+ },
+ handleUploadCallback(res) { // 鏂囦欢涓婁紶鍥炶皟
+ console.log('file: ', res);
+ let fileInfo = res.data[0]
+ this.attachmentInfo.push({
+ fileName: fileInfo.name,
+ size: fileInfo.size,
+ status: '绛夊緟涓婁紶',
+ filePath: fileInfo.tempFilePath
+ })
+ },
+ // 涓婁紶鏂囦欢
+ fileUpload() {
+ this.$refs.XeUpload.upload('file', {});
+ },
+ //鑾峰彇鐝鏁版嵁
+ async getShiftList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Web/GetGy_ShiftsList_Json',
+ data: {
+ Shifts: "",
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HShiftsList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: err
+ })
+ }
+ },
+ //鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
+ async getHDeptList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Department/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HDeptList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: err
+ })
+ }
+ },
+ toScanCode() {
+ MpaasScan.scanCode(cb => {
+ this.hfrom.HBarCode = cb
+ this.GetMessageByBarCode(cb)
+ })
+ },
+ async GetMessageByBarCode(HBarCode) {
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Gy_EquipFileBill/txtHBarCode_KeyDown",
+ data: {
+ HBarCode: HBarCode,
+ user: getUserInfo()["Czymc"]
+ },
+ })
+
+
+ if (!res) {
+ return
+ }
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+
+ console.log('data: ', data);
+
+ if (count == 1) {
+ this.hform.HEquipID = data[0].HInterID
+ this.hform.HBarName = data[0].璁惧鍚嶇О
+ this.hform.HBarSpec = data[0].璁惧瑙勬牸
+ this.hform.HBarModel = data[0].璁惧鍨嬪彿
+ this.hform.HQty = 1
+
+ // 鑾峰彇妫�楠岃绋�
+ this.GetItemByEquipFile()
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: Message
+ })
+ }
+
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: err
+ })
+ }
+ },
+ async GetItemByEquipFile() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Web/GetItemByEquipFile",
+ data: {
+ "EquipProjectID": this.hform.HEquipID,
+ "Type": "BY",
+ "HDate": this.hform.HBeginDate
+ }
+ })
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ this.hform.HEquipMaintainRuleInterID = data[0].淇濆吇瑙勭▼ID
+ this.hform.HEquipMaintainRuleInterNo = data[0].淇濆吇瑙勭▼鍗曞彿
+ this.hform.HPlanNo = data[0].淇濆吇璁″垝鍗�
+ this.hform.HEquipMaintainPlanInterID = (data[0].淇濆吇璁″垝ID == null ? 0 : data[0].淇濆吇璁″垝ID) == "" ?
+ 0 : data[0].淇濆吇璁″垝ID
+ this.hform.HEquipMaintainPlanEntryID = (data[0].淇濆吇璁″垝瀛怚D == null ? 0 : data[0].淇濆吇璁″垝瀛怚D) ==
+ "" ? 0 : data[0].淇濆吇璁″垝瀛怚D
+ this.hform.HMainSourceBillNo = data[0].淇濆吇璁″垝鍗�
+ this.hform.HMainSourceInterID = (data[0].淇濆吇璁″垝ID == null ? 0 : data[0].淇濆吇璁″垝ID) == "" ? 0 :
+ data[0].淇濆吇璁″垝ID
+ this.hform.HMainSourceEntryID = (data[0].淇濆吇璁″垝瀛怚D == null ? 0 : data[0].淇濆吇璁″垝瀛怚D) == "" ? 0 :
+ data[0].淇濆吇璁″垝瀛怚D
+
+ this.HCheckFileList = Array.from(data).map(item => {
+ return {
+ "HMaintainResult": item.榛樿缁撹 == 1 ? true : false,
+ "HMaintainItemID": item.淇濆吇椤圭洰ID,
+ "HMaintainNumber": item.淇濆吇椤圭洰浠g爜,
+ "HMaintainItem": item.淇濆吇椤圭洰鍚嶇О,
+ "HMaintainPart": item.淇濆吇閮ㄤ綅,
+ "HClaim": item.鍏蜂綋瑕佹眰,
+ "HManagerID": item.璐熻矗浜篒D,
+ "HManagerNumber": item.璐熻矗浜轰唬鐮�,
+ "HManagerName": item.璐熻矗浜哄悕绉�,
+ "HRemark": "",
+ "HSourceInterID": item.淇濆吇璁″垝ID,
+ "HSourceEntryID": item.淇濆吇璁″垝瀛怚D,
+ "HSourceBillNo": item.淇濆吇璁″垝鍗�
+ }
+ })
+
+ this.enableEdit = false
+
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${err}`
+ })
+ }
+ },
+ radioChange({
+ detail: {
+ value
+ }
+ }) {
+ this.HLastResult = 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 = 0
+ this.hform.HBillNo = data[0]["HBillNo"]
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鑾峰彇鍗曟嵁淇℃伅寮傚父: " + err
+ })
+ }
+ },
+ async submit() {
+ let valid = this.ValidCheck()
+ if (!valid.state) {
+ return CommonUtils.showTips({
+ message: valid.Message
+ })
+ }
+
+ try {
+ let oMain = JSON.stringify(this.hform);
+ let sSubStr = JSON.stringify(this.HCheckFileList);
+ let sMainSub = oMain + ';' + sSubStr;
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Sb_PDA_EquipMaintainBill/SaveGetEquipMaintainBillList",
+ data: {
+ "msg": sMainSub
+ },
+ method: "POST"
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill?operationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + Message
+ })
+ }
+
+
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + err
+ })
+ }
+ }
+ },
+ onLoad(e) {
+ console.log('e: ', e);
+ if (!e.operationType) {
+ this.operationType = 1
+ } else {
+ this.operationType = e.operationType
+ }
+
+ if (this.operationType == 1) {
+ // 鏂板
+ this.getMaxNum()
+ } else if (this.operationType == 2) {
+ // 澶嶅埗
+ } else if (this.operationType == 3) {
+ // 缂栬緫
+
+ } else if (this.operationType == 4) {
+ // 娴忚
+
+ }
+
+ this.getHDeptList()
+ this.getShiftList()
+ },
+ 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">
-
-</style>
+<style lang="scss" scoped>
+ @import "@/pages/MJGL/style/MJBillStyle.scss"
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBillList.vue b/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBillList.vue
new file mode 100644
index 0000000..73ade7e
--- /dev/null
+++ b/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBillList.vue
@@ -0,0 +1,472 @@
+<template>
+ <view class="content">
+ <view class="form">
+ <view class="form-item">
+ <view class="title">寮�濮嬫椂闂�:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate">
+ <input :value="hform.HBeginDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁撴潫鏃堕棿:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate">
+ <input :value="hform.HEndDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view v-if="showmore">
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right">
+ <input v-model="hform.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" />
+ </view>
+ </view>
+
+ </view>
+ <view class="other">
+ <view v-if="!showmore" @tap="changeShowMore">
+ 灞曞紑鍏朵粬鏉′欢<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons>
+ </view>
+ <view v-if="showmore" @tap="changeShowMore">
+ 鎶樺彔鍏朵粬鏉′欢<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons>
+ </view>
+ </view>
+
+ <view class="buttons">
+ <button class="btn-a" size="mini" type="default" @tap="clear">閲嶇疆</button>
+ <button class="btn-b" size="mini" type="default" @tap="add">鏂板</button>
+ <button class="btn-c" size="mini" type="default" @tap="search">鏌ヨ</button>
+ </view>
+ </view>
+
+ <view id="divide" style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+ <view :style="{
+ height: calcContentHeight + 'px',
+ overflowY: 'auto'
+ }">
+ <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0">
+ <uni-card :title="item.鍒跺崟鏃ユ湡.substr(0,10)" :extra="item.鍗曟嵁鍙�" style="margin: 10px;"
+ @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <view class="detail" v-if="item.鍒跺崟浜�">
+ <text>鍒跺崟浜猴細</text>{{item.鍒跺崟浜簘}
+ </view>
+ <view class="detail" v-if="item.璁惧浠g爜">
+ <text>璁惧浠g爜锛�</text>{{item.璁惧浠g爜}}
+ </view>
+ <view class="detail" v-if="item.璁惧鍚嶇О">
+ <text>璁惧鍚嶇О锛�</text>{{item.璁惧鍚嶇О}}
+ </view>
+ <view class="detail" v-if="item.鏈�缁堢粨璁�">
+ <text>鏈�缁堢粨璁猴細</text>{{item.鏈�缁堢粨璁簘}
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+
+
+ <view class="detail" v-if="item.琛ㄥご澶囨敞">
+ <text>琛ㄥご澶囨敞锛�</text>{{item.琛ㄥご澶囨敞}}
+ </view>
+ <view class="detail" v-if="item.寮�濮嬫棩鏈�">
+ <text>寮�濮嬫棩鏈燂細</text>{{dayjs(item.寮�濮嬫棩鏈�).format("YYYY-MM-DD HH:mm:DD")}}
+ </view>
+ <view class="detail" v-if="item.缁撴潫鏃ユ湡">
+ <text>缁撴潫鏃ユ湡锛�</text>{{dayjs(item.缁撴潫鏃ユ湡).format("YYYY-MM-DD HH:mm:DD")}}
+ </view>
+ <view class="detail" v-if="item.淇濆吇璁″垝缂栧彿">
+ <text>淇濆吇璁″垝缂栧彿锛�</text>{{item.淇濆吇璁″垝缂栧彿}}
+ </view>
+ <view class="detail" v-if="item.淇濆吇璁″垝">
+ <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.hmainid">
+ <text>鍐呴儴鍗曟嵁鍙凤細</text>{{item.hmainid}}
+ </view>
+ </view>
+ </view>
+
+ <view class="more" v-if="showDetail == index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="more" v-if="showDetail != index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="op" v-if="operations == index">
+ <!-- <button class="op3" size="mini" plain @tap.stop="edit(item)">缂栬緫</button> -->
+ <button class="op4" size="mini" plain @tap.stop="del(item)">鍒犻櫎</button>
+ <button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+ </view>
+ </uni-card>
+ </view>
+ </view>
+ <view class="pagination-zone" id="pagination-zone">
+ <uni-pagination show-icon :page-size="size" :total="dataLength" :current="page"
+ @change="onPaginationChangeHandler"></uni-pagination>
+ </view>
+ <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
+ </view>
+</template>
+
+<script>
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import BarCodePopupVue from "@/components/BarCodePopup/BarCodePopup.vue";
+ import {
+ CommonUtils
+ } from "../../../utils/common";
+ import dayjs from "dayjs";
+ export default {
+ data() {
+ return {
+ dayjs,
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ tabs: 0,
+ urls: '/Web/GetEquipmentBillsList',
+ MvarReportTitle: '璁惧鐐规璁板綍鍗曠紦瀛�',
+ hform: {
+ HBillNo: '',
+ HSourceBillNo: '',
+ HBillType: 3901,
+ user: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ Type: "BY",
+ sWhere: "",
+ HBeginDate: dayjs(new Date()).subtract(30, 'day').format("YYYY-MM-DD"),
+ HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ showDetail: -1,
+ operations: -1,
+
+ page: 1,
+ size: 20,
+ dataLength: 0,
+ divideBottom: 0,
+ paginationTop: 0,
+ showmore: false,
+ }
+ },
+ computed: {
+ calcContentHeight: {
+ get() {
+ return this.paginationTop - this.divideBottom
+ }
+ }
+ },
+ onShow() {
+ //鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+ this.CheckModRight()
+ this.changeTab(0)
+ console.log(this.userInfo, uni.getStorageSync('HUserName'))
+ },
+ components: {
+ BarCodePopupVue
+ },
+ onPullDownRefresh: function() {
+ this.clear()
+ setTimeout(() => {
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
+ onReady() {
+ this.getCalcHeight()
+ },
+ methods: {
+ changeShowMore() {
+ this.showmore = !this.showmore
+ this.$nextTick(() => {
+ // 閲嶆柊璁$畻鍐呭瑙嗗彛楂樺害
+ this.getCalcHeight()
+ })
+ },
+ getCalcHeight() {
+ let query = uni.createSelectorQuery().in(this)
+ query
+ .select("#divide")
+ .boundingClientRect()
+ .select("#pagination-zone")
+ .boundingClientRect()
+ .exec(res => {
+ this.divideBottom = Math.ceil(res[0].bottom)
+ this.paginationTop = Math.floor(res[1].top)
+ })
+ },
+ async qrCodeDisplay(item) {
+ this.$refs.barcodePopup.setCodeInfo(item.HBillNo)
+ await this.$nextTick()
+ this.$refs.barcodePopup.open()
+ },
+ CheckModRight() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/CheckModRight_Json',
+ data: {
+ ModRightName: 'CE_OtherOut',
+ HUserName: uni.getStorageSync('HUserName')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {} else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ onPaginationChangeHandler({
+ current
+ }) {
+ this.page = current
+ this.showList = this.getPage(current, this.size, this.listData)
+ },
+ 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 = '/Web/GetEquipmentBillsList'
+ }
+ // 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
+ } = res.data
+
+ if (count == 1) {
+ if(data == null) {
+ data = []
+ }
+ this.listData = data
+ this.showList = this.getPage(this.page, this.size, data)
+ console.log('this.showList: ', this.showList);
+ this.dataLength = data.length
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧鐐规璁板綍鍗曞け璐�: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧鐐规璁板綍鍗曞け璐�: ${err}`
+ })
+ }
+
+ },
+ search() {
+ this.hform.sWhere = ''
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ console.log(this.hform)
+ if (this.hform.HBillNo) {
+ this.hform.sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'";
+ }
+ if (this.hform.HBeginDate && this.hform.HEndDate) {
+ this.hform.sWhere +=
+ ` and 鏃ユ湡 between convert(date, '${this.hform.HBeginDate}') and convert(date, '${this.hform.HEndDate}')`;
+ }
+ this.getList()
+ },
+ clear() {
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ this.sWhere = ''
+ this.hform = {
+ HBillNo: '',
+ HSourceBillNo: '',
+ HBillType: 3901,
+ user: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ sWhere: '',
+ Type: "BY",
+ HBeginDate: dayjs(new Date()).subtract(30, 'day').format("YYYY-MM-DD"),
+ HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ }
+ this.search()
+ },
+ add() {
+ uni.navigateTo({
+ url: '/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill?operationType=1'
+ })
+ },
+ //缂栬緫
+ edit(item) {
+ console.log(item)
+ uni.request({
+ url: this.serverUrl + '/WEBSController/TempList_Modify_Json',
+ data: {
+ "HInterID": item.HInterID,
+ "HBillNo": item.鍗曟嵁鍙�,
+ "HBillType": this.hform.HBillType
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ uni.navigateTo({
+ url: './OtherOutBill?OperationType=2&HInterID=' + item.HInterID
+ })
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ })
+ },
+ //鍒犻櫎
+ del(item) {
+ // console.log(item.hmainid,uni.getStorageSync('HUserName'))
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄よ褰曪紵鍒犻櫎鍚庝笉鑳芥仮澶�',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.request({
+ url: this.serverUrl +
+ '/Sb_EquipMaintainBill/DeltetEquipMaintainBillList',
+ data: {
+ HInterID: item.hmainid,
+ user: uni.getStorageSync('HUserName'),
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ this.clear()
+ }
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ //鎾ら攢
+ revoke(item) {
+ // console.log(item.hmainid,uni.getStorageSync('HUserName'))
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '鏄惁纭鎾ら攢',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DeleteICStockBillAndWMS_Json',
+ data: {
+ HInterID: item.HInterID,
+ HBillNo: item.鍗曟嵁鍙�,
+ HBillType: this.hform.HBillType,
+ HMaker: uni.getStorageSync('HUserName'),
+ MvarReportTitle: this.MvarReportTitle,
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ this.clear()
+ }
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ @import "@/pages/MJGL/style/MJListStyle.scss"
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue b/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue
new file mode 100644
index 0000000..19c06df
--- /dev/null
+++ b/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill.vue
@@ -0,0 +1,736 @@
+<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="enableEdit?'right':'righton'">
+ <input v-model="hform.HBarCode" :disabled="!enableEdit"
+ @confirm="GetMessageByBarCode(hform.HBarCode)" placeholder="璇疯緭鍏�(鎴栨壂鎻�)璁惧鏉$爜" />
+ </view>
+ <view class="icon-wrapper">
+ <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鏈�缁堢粨璁�:</view>
+ <view class="right none-border">
+ <radio-group @change="radioChange" class="radio_Container">
+ <label>
+ <view>
+ <radio value="OK" :checked="hform.HCheckResult == 'OK'" />
+ <text>OK</text>
+ </view>
+ </label>
+ </label>
+ <view>
+ <radio value="NG" :checked="hform.HCheckResult == 'NG'" />
+ <text>NG</text>
+ </view>
+ </label>
+ </radio-group>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">楠岃瘉鍐呭:</view>
+ <view class="right">
+ <textarea v-model="hform.HRepairCheckMainContent" placeholder="璇疯緭鍏ラ獙璇佸唴瀹�" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HBillNo" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">鍗曟嵁鏃ユ湡:</view>
+ <view class="righton">
+ <input disabled v-model="hform.HDate" />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title required">閮ㄩ棬:</view>
+ <zxz-uni-data-select required class="right" :localdata="HDeptList" dataKey="閮ㄩ棬鍚嶇О"
+ dataValue="HItemID" v-model="hform.HDeptID">
+
+ </zxz-uni-data-select>
+ <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ </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.HEmpID">
+
+ </zxz-uni-data-select>
+ <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ </view>
+ <view class="form-item">
+ <view class="title required">楠岃瘉椤圭洰:</view>
+ <zxz-uni-data-select required class="right" :localdata="HRepairCheckList" dataKey="缁翠慨楠屾敹椤圭洰"
+ dataValue="hitemid" v-model="hform.HRepairCheckMainID">
+
+ </zxz-uni-data-select>
+ <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ </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.HManagerID">
+
+ </zxz-uni-data-select>
+ <!-- <input disabled v-model="hform.HDeptName" placeholder="璇烽�夋嫨閮ㄩ棬" /> -->
+ </view>
+ <view class="form-item">
+ <view class="title">璁惧鍚嶇О:</view>
+ <view class="righton">
+ <input v-model="hform.HBarName" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁惧瑙勬牸:</view>
+ <view class="righton">
+ <input v-model="hform.HBarSpec" disabled />
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">璁惧鍨嬪彿:</view>
+ <view class="righton">
+ <input v-model="hform.HBarModel" disabled />
+ </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_EquipRepairCheckBill',
+ data() {
+ return {
+ tabs: 0,
+ HMainSourceBillType: "",
+ btnTop: 0,
+ tabsBottom: 0,
+ HModName: "sb_EquipRepairCheckBill",
+ HBillType: '3911',
+ operationType: 1,
+ uploadOptions: {},
+ enableEdit: true,
+
+ HDeptList: [],
+ HRepairCheckList: [],
+ HEmpList: [],
+
+ hform: {
+ "HBarCode": "",
+ "HCheckBeginDate": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
+ "HCheckResult": "OK",
+ "HRepairCheckMainContent": "",
+ "HBillNo": "",
+ "HInterID": 0,
+ "HDate": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
+ "HDeptName": "",
+ "HDeptID": 0,
+ "HEmpName": "",
+ "HEmpID": 0,
+ "HRepairCheckMainName": "",
+ "HRepairCheckMainID": 0,
+ "HManagerName": "",
+ "HManagerID": 0,
+ "HBarName": "",
+ "HEquipID": 0,
+ "HBarSpec": "",
+ "HBarModel": "",
+ "HMaker": getUserInfo()["Czymc"],
+ "HMakeDate": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"),
+ "HUpDater": "",
+ "HUpDateDate": "",
+ "HChecker": "",
+ "HCheckDate": "",
+ "HDeleteMan": "",
+ "HDeleteDate": "",
+ "lngBillKey": "",
+ "lngBillSubKey": ""
+ },
+ HBillSub: [{ // 鍚庣鎺ュ彛闇�瑕併�傚惁鍒欐暟鎹笉浼氭樉绀哄湪缂撳瓨涓�
+ "HRepairID": 0,
+ "HRepairCode": "",
+ "HRepairName": "",
+ "HManagerID": 0,
+ "HManagerCode": "",
+ "HManagerName": "",
+ "HRepairExplanation": "",
+ "HRemark": "",
+ "LAY_TABLE_INDEX": 0
+ }]
+ };
+ },
+ computed: {
+ containerHeight: {
+ get() {
+ return this.btnTop - this.tabsBottom - 5
+ }
+ },
+ },
+ methods: {
+ // 鎻愪氦鏁版嵁鏈夋晥鎬ф牎楠�
+ ValidCheck() {
+ if (this.hform.HEquipID == 0) {
+ return {
+ Message: "鏈綍鍏ヨ澶囦俊鎭紝璇峰厛褰曞叆璁惧淇℃伅!",
+ state: false
+ }
+ }
+ if (this.hform.HDeptID == 0) {
+ return {
+ Message: "閮ㄩ棬涓嶅緱涓虹┖!",
+ state: false
+ }
+ }
+ if (this.hform.HEmpID == 0) {
+ return {
+ Message: "楠屾敹浜轰笉寰椾负绌�!",
+ state: false
+ }
+ }
+ if (this.hform.HRepairCheckMainID == 0) {
+ return {
+ Message: "楠岃瘉椤圭洰涓嶅緱涓虹┖!",
+ state: false
+ }
+ }
+ if (this.hform.HManagerID == 0) {
+ return {
+ Message: "璐熻矗浜轰笉寰椾负绌�!",
+ state: false
+ }
+ }
+
+ return {
+ Message: "",
+ state: true
+ }
+ },
+ addNew() {
+ uni.redirectTo({
+ url: './Sb_EquipRepairCheckBill?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
+ }
+ },
+ uploadFile(index) {
+ console.log('filePath: ', this.attachmentInfo[index].filePath);
+ // 閫氳繃涓存椂璺緞璇诲彇鏂囦欢
+ uni.uploadFile({
+ url: CommonUtils.getServerUrl() + "/Sb_EquipDotCheckBill/UploadFile",
+ filePath: this.attachmentInfo[index].filePath,
+ name: 'file',
+ formData: {
+ HBillNo: this.hform.HBillNo,
+ HRemark: "",
+ HUserName: getUserInfo()["Czymc"]
+ },
+ success: (uploadRes) => {
+ CommonUtils.showTips({
+ message: "涓婁紶鎴愬姛"
+ })
+ this.attachmentInfo[index].status = "涓婁紶鎴愬姛"
+ },
+ fail: (err) => {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `涓婁紶澶辫触: ${err}`
+ })
+ }
+ })
+ },
+ delFile(index) {
+ console.log('attachmentInfo: ', this.attachmentInfo[index]);
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄� " ' + this.attachmentInfo[index].fileName + ' " 鍒犻櫎鍚庡皢涓嶅彲鎭㈠锛�',
+ success: (res) => {
+ if (res.confirm) {
+ this.attachmentInfo.splice(index, 1)
+ }
+ },
+ })
+
+ },
+ handleUploadCallback(res) { // 鏂囦欢涓婁紶鍥炶皟
+ console.log('file: ', res);
+ let fileInfo = res.data[0]
+ this.attachmentInfo.push({
+ fileName: fileInfo.name,
+ size: fileInfo.size,
+ status: '绛夊緟涓婁紶',
+ filePath: fileInfo.tempFilePath
+ })
+ },
+ // 涓婁紶鏂囦欢
+ fileUpload() {
+ this.$refs.XeUpload.upload('file', {});
+ },
+ //鑾峰彇鐝鏁版嵁
+ async getShiftList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Web/GetGy_ShiftsList_Json',
+ data: {
+ Shifts: "",
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HShiftsList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: err
+ })
+ }
+ },
+ //鑾峰彇浣跨敤閮ㄩ棬鏁版嵁
+ async getHDeptList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_Department/list',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ Organization: uni.getStorageSync('Organization')
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HDeptList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: err
+ })
+ }
+ },
+ // 鑾峰彇鑱屽憳鏁版嵁
+ async getEmpList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/PublicPageMethod/UserList',
+ data: {
+ sWhere: " where 1=1",
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HEmpList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: err
+ })
+ }
+ },
+ // 鑾峰彇楠岃瘉椤圭洰鏁版嵁
+ async getCheckProjList() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: '/Gy_RepairCheck/GetRepairCheckList',
+ data: {
+ sWhere: "",
+ user: uni.getStorageSync('HUserName'),
+ }
+ })
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ this.HRepairCheckList = data
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: Message
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: err
+ })
+ }
+ },
+ toScanCode() {
+ MpaasScan.scanCode(cb => {
+ this.hfrom.HBarCode = cb
+ this.GetMessageByBarCode(cb)
+ })
+ },
+ async GetMessageByBarCode(HBarCode) {
+ try {
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown_List",
+ data: {
+ HBarCode: HBarCode,
+ },
+ })
+
+
+ if (!res) {
+ return
+ }
+
+ let {
+ data,
+ count,
+ Message
+ } = res.data
+
+ if (count == 1) {
+ console.log('data: ', data);
+ this.hform.HEquipID = data[0].hmainid
+ this.hform.HBarName = data[0].璁惧鍚嶇О
+ this.hform.HBarSpec = data[0].璁惧瑙勬牸
+ this.hform.HBarModel = data[0].璁惧鍨嬪彿
+ this.hform.HQty = 1
+
+ this.enableEdit = false
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: Message
+ })
+ }
+
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: err
+ })
+ }
+ },
+ async GetItemByEquipFile() {
+ try {
+ let res = await CommonUtils.doRequest2Async({
+ url: "/Web/GetItemByEquipFile",
+ data: {
+ "EquipProjectID": this.hform.HEquipID,
+ "Type": "DJ",
+ "HDate": this.hform.HBeginDate
+ }
+ })
+
+ let {
+ data,
+ Message,
+ count
+ } = res.data
+ if (count == 1) {
+ this.hform.HEquipDotCheckRuleInterID = data[0].鐐规瑙勭▼ID
+ this.hform.HEquipDotCheckRuleInterNo = data[0].鐐规瑙勭▼鍗曞彿
+ this.hform.HPlanNo = data[0].鐐规璁″垝鍗�
+ this.hform.HPlanInterID = (data[0].鐐规璁″垝ID == null ? 0 : data[0].鐐规璁″垝ID) == "" ? 0 : data[0]
+ .鐐规璁″垝ID
+ this.hform.HPlanEntryID = (data[0].鐐规璁″垝瀛怚D == null ? 0 : data[0].鐐规璁″垝瀛怚D) == "" ? 0 : data[
+ 0].鐐规璁″垝瀛怚D
+
+ this.HCheckFileList = Array.from(data).map(item => {
+ return {
+ "HDotCheckItemID": item.HDotCheckItemID,
+ "HDotCheckCode": item.鐐规椤圭洰浠g爜,
+ "HDotCheckItem": item.鐐规椤圭洰,
+ "HDotCheckPart": item.鐐规閮ㄤ綅,
+ "HClaim": item.鍏蜂綋瑕佹眰,
+ "HManagerID": item.璐熻矗浜篒D,
+ "HManagerCode": item.璐熻矗浜轰唬鐮�,
+ "HManagerName": item.璐熻矗浜哄悕绉�,
+ "HSourceInterID": item.鐐规璁″垝ID == null ? 0 : item.鐐规璁″垝ID,
+ "HSourceEntryID": item.鐐规璁″垝瀛怚D == null ? 0 : item.鐐规璁″垝瀛怚D,
+ "HSourceBillNo": item.鐐规璁″垝鍗�,
+ "HDotCheckItemClassID": 0,
+ "HDotCheckItemClassName": "",
+ "HDotCheckItemMethodID": 0,
+ "HDotCheckItemMethodName": "",
+ "HDotCheckResult": item.榛樿缁撹 == 1 ? true : false
+ }
+ })
+
+ } else {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: '娓╅Θ鎻愮ず',
+ message: `鑾峰彇鐐规瑙勭▼閿欒锛� ${err}`
+ })
+ }
+ },
+ 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 = 0
+ this.hform.HBillNo = data[0]["HBillNo"]
+ } 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 sSubStr = JSON.stringify(this.HBillSub);
+ let sMainSub = oMain + ';' + sSubStr + ';' + getUserInfo()['Czymc'];
+ let res = await CommonUtils.doRequest2Sync({
+ url: "/Sb_EqpRepairWorkBill/SaveGetEqpRepairCheckBillList",
+ data: {
+ "msg": sMainSub
+ },
+ method: "POST"
+ })
+
+ if (!res) {
+ return
+ }
+
+ let {
+ count,
+ Message
+ } = res.data
+ if (count == 1) {
+ uni.showModal({
+ title: '鎻愮ず',
+ content: res.data.Message + '銆傛槸鍚︾户缁柊澧烇紵(鐐瑰嚮鍙栨秷杩斿洖涓婄骇椤甸潰)',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.redirectTo({
+ url: '/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill?operationType=1'
+ })
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ setTimeout(() => {
+ uni.navigateBack();
+ }, 50)
+ }
+ }
+ });
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + Message
+ })
+ }
+
+
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: "鎻愪氦鍗曟嵁澶辫触: " + err
+ })
+ }
+ }
+ },
+ onLoad(e) {
+ console.log('e: ', e);
+ if (!e.operationType) {
+ this.operationType = 1
+ } else {
+ this.operationType = e.operationType
+ }
+
+ if (this.operationType == 1) {
+ // 鏂板
+ this.getMaxNum()
+ } else if (this.operationType == 2) {
+ // 澶嶅埗
+ } else if (this.operationType == 3) {
+ // 缂栬緫
+
+ } else if (this.operationType == 4) {
+ // 娴忚
+
+ }
+
+ this.getHDeptList()
+ this.getEmpList()
+ this.getCheckProjList()
+ },
+ 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_EquipRepairCheckBill/Sb_EquipRepairCheckBillList.vue b/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBillList.vue
new file mode 100644
index 0000000..1cb0fad
--- /dev/null
+++ b/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBillList.vue
@@ -0,0 +1,472 @@
+<template>
+ <view class="content">
+ <view class="form">
+ <view class="form-item">
+ <view class="title">寮�濮嬫椂闂�:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HBeginDate">
+ <input :value="hform.HBeginDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view class="form-item">
+ <view class="title">缁撴潫鏃堕棿:</view>
+ <view class="right">
+ <uni-datetime-picker type="date" :clear-icon="false" v-model="hform.HEndDate">
+ <input :value="hform.HEndDate" />
+ </uni-datetime-picker>
+ </view>
+ </view>
+ <view v-if="showmore">
+ <view class="form-item">
+ <view class="title">鍗曟嵁鍙�:</view>
+ <view class="right">
+ <input v-model="hform.HBillNo" placeholder="璇疯緭鍏ュ崟鎹彿" />
+ </view>
+ </view>
+
+ </view>
+ <view class="other">
+ <view v-if="!showmore" @tap="changeShowMore">
+ 灞曞紑鍏朵粬鏉′欢<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="bottom"></uni-icons>
+ </view>
+ <view v-if="showmore" @tap="changeShowMore">
+ 鎶樺彔鍏朵粬鏉′欢<uni-icons color="#1890FF" style="margin-left: 8rpx;" type="top"></uni-icons>
+ </view>
+ </view>
+
+ <view class="buttons">
+ <button class="btn-a" size="mini" type="default" @tap="clear">閲嶇疆</button>
+ <button class="btn-b" size="mini" type="default" @tap="add">鏂板</button>
+ <button class="btn-c" size="mini" type="default" @tap="search">鏌ヨ</button>
+ </view>
+ </view>
+
+ <view id="divide" style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
+ <view :style="{
+ height: calcContentHeight + 'px',
+ overflowY: 'auto'
+ }">
+ <view class="list" v-for="(item,index) in showList" :key="index" v-if="tabs==0">
+ <uni-card :title="item.鍒跺崟鏃ユ湡.substr(0,10)" :extra="item.鍗曟嵁鍙�" style="margin: 10px;"
+ @tap="showDetail = showDetail==index?-1:index">
+ <view class="card-detail">
+ <view class="detail" v-if="item.鍒跺崟浜�">
+ <text>鍒跺崟浜猴細</text>{{item.鍒跺崟浜簘}
+ </view>
+ <view class="detail" v-if="item.璁惧浠g爜">
+ <text>璁惧浠g爜锛�</text>{{item.璁惧浠g爜}}
+ </view>
+ <view class="detail" v-if="item.璁惧鍚嶇О">
+ <text>璁惧鍚嶇О锛�</text>{{item.璁惧鍚嶇О}}
+ </view>
+ <view class="detail" v-if="item.璐熻矗浜�">
+ <text>璐熻矗浜猴細</text>{{item.璐熻矗浜簘}
+ </view>
+ <view class="detail" v-if="item.缁翠慨閮ㄩ棬鍚嶇О">
+ <text>缁翠慨閮ㄩ棬锛�</text>{{item.缁翠慨閮ㄩ棬鍚嶇О}}
+ </view>
+ <view class="detail" v-if="item.楠屾敹浜�">
+ <text>楠屾敹浜猴細</text>{{item.楠屾敹浜簘}
+ </view>
+ <view class="card-detail" v-if="showDetail == index">
+
+
+ <view class="detail" v-if="item.琛ㄥご澶囨敞">
+ <text>琛ㄥご澶囨敞锛�</text>{{item.琛ㄥご澶囨敞}}
+ </view>
+ <view class="detail" v-if="item.鍙戠敓鏃ユ湡">
+ <text>寮�濮嬫棩鏈燂細</text>{{dayjs(item.鍙戠敓鏃ユ湡).format("YYYY-MM-DD HH:mm:DD")}}
+ </view>
+ <view class="detail" v-if="item.楠屾敹浜轰唬鐮�">
+ <text>楠屾敹浜轰唬鐮侊細</text>{{item.楠屾敹浜轰唬鐮亇}
+ </view>
+ <view class="detail" v-if="item.缁翠慨閮ㄩ棬浠g爜">
+ <text>缁翠慨閮ㄩ棬浠g爜锛�</text>{{item.缁翠慨閮ㄩ棬浠g爜}}
+ </view>
+ <view class="detail" v-if="item.璐熻矗浜轰唬鐮�">
+ <text>璐熻矗浜轰唬鐮侊細</text>{{item.璐熻矗浜轰唬鐮亇}
+ </view>
+ <view class="detail" v-if="item.hmainid">
+ <text>鍐呴儴鍗曟嵁鍙凤細</text>{{item.hmainid}}
+ </view>
+ </view>
+ </view>
+
+ <view class="more" v-if="showDetail == index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="more" v-if="showDetail != index && operations != index">
+ <view class="part" style="border-right: 1px solid #eee;">
+ <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+ </view>
+ <view class="part" @tap.stop="operations = operations==index?-1:index">
+ <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;"
+ size="14"></uni-icons>鎿嶄綔
+ </view>
+ </view>
+ <view class="op" v-if="operations == index">
+ <!-- <button class="op3" size="mini" plain @tap.stop="edit(item)">缂栬緫</button> -->
+ <button class="op4" size="mini" plain @tap.stop="del(item)">鍒犻櫎</button>
+ <button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+ </view>
+ </uni-card>
+ </view>
+ </view>
+ <view class="pagination-zone" id="pagination-zone">
+ <uni-pagination show-icon :page-size="size" :total="dataLength" :current="page"
+ @change="onPaginationChangeHandler"></uni-pagination>
+ </view>
+ <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue>
+ </view>
+</template>
+
+<script>
+ import {
+ getUserInfo
+ } from "@/utils/auth.js";
+ import BarCodePopupVue from "@/components/BarCodePopup/BarCodePopup.vue";
+ import {
+ CommonUtils
+ } from "../../../utils/common";
+ import dayjs from "dayjs";
+ export default {
+ data() {
+ return {
+ dayjs,
+ userInfo: getUserInfo(),
+ serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
+ tabs: 0,
+ urls: '/Web/GetEquipmentBillsList',
+ MvarReportTitle: '璁惧鐐规璁板綍鍗曠紦瀛�',
+ hform: {
+ HBillNo: '',
+ HSourceBillNo: '',
+ HBillType: 3901,
+ user: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ Type: "YS",
+ sWhere: "",
+ HBeginDate: dayjs(new Date()).subtract(30, 'day').format("YYYY-MM-DD"),
+ HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ },
+ sWhere: '',
+ listData: [],
+ showList: [],
+ showDetail: -1,
+ operations: -1,
+
+ page: 1,
+ size: 20,
+ dataLength: 0,
+ divideBottom: 0,
+ paginationTop: 0,
+ showmore: false,
+ }
+ },
+ computed: {
+ calcContentHeight: {
+ get() {
+ return this.paginationTop - this.divideBottom
+ }
+ }
+ },
+ onShow() {
+ //鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+ this.CheckModRight()
+ this.changeTab(0)
+ console.log(this.userInfo, uni.getStorageSync('HUserName'))
+ },
+ components: {
+ BarCodePopupVue
+ },
+ onPullDownRefresh: function() {
+ this.clear()
+ setTimeout(() => {
+ uni.stopPullDownRefresh();
+ }, 1000);
+ },
+ onReady() {
+ this.getCalcHeight()
+ },
+ methods: {
+ changeShowMore() {
+ this.showmore = !this.showmore
+ this.$nextTick(() => {
+ // 閲嶆柊璁$畻鍐呭瑙嗗彛楂樺害
+ this.getCalcHeight()
+ })
+ },
+ getCalcHeight() {
+ let query = uni.createSelectorQuery().in(this)
+ query
+ .select("#divide")
+ .boundingClientRect()
+ .select("#pagination-zone")
+ .boundingClientRect()
+ .exec(res => {
+ this.divideBottom = Math.ceil(res[0].bottom)
+ this.paginationTop = Math.floor(res[1].top)
+ })
+ },
+ async qrCodeDisplay(item) {
+ this.$refs.barcodePopup.setCodeInfo(item.HBillNo)
+ await this.$nextTick()
+ this.$refs.barcodePopup.open()
+ },
+ CheckModRight() {
+ uni.request({
+ url: this.serverUrl + '/WEBSController/CheckModRight_Json',
+ data: {
+ ModRightName: 'CE_OtherOut',
+ HUserName: uni.getStorageSync('HUserName')
+ },
+ success: (res) => {
+ if (res.data.count == 1) {} else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ },
+ onPaginationChangeHandler({
+ current
+ }) {
+ this.page = current
+ this.showList = this.getPage(current, this.size, this.listData)
+ },
+ 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 = '/Web/GetEquipmentBillsList'
+ }
+ // 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
+ } = 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
+ } else {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧鐐规璁板綍鍗曞け璐�: ${Message}`
+ })
+ }
+ } catch (err) {
+ CommonUtils.showTips({
+ title: "娓╅Θ鎻愮ず",
+ message: `鑾峰彇璁惧鐐规璁板綍鍗曞け璐�: ${err}`
+ })
+ }
+
+ },
+ search() {
+ this.hform.sWhere = ''
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ console.log(this.hform)
+ if (this.hform.HBillNo) {
+ this.hform.sWhere += " and 鍗曟嵁鍙� like '%" + this.hform.HBillNo + "%'";
+ }
+ if (this.hform.HBeginDate && this.hform.HEndDate) {
+ this.hform.sWhere +=
+ ` and convert(date,鏃ユ湡) between convert(date, '${this.hform.HBeginDate}') and convert(date, '${this.hform.HEndDate}')`;
+ }
+ this.getList()
+ },
+ clear() {
+ this.listData = []
+ this.page = 1
+ this.showList = []
+
+ this.sWhere = ''
+ this.hform = {
+ HBillNo: '',
+ HSourceBillNo: '',
+ HBillType: 3911,
+ user: uni.getStorageSync('HUserName'),
+ HStockOrgID: uni.getStorageSync('OrganizationID'),
+ sWhere: '',
+ Type: "YS",
+ HBeginDate: dayjs(new Date()).subtract(30, 'day').format("YYYY-MM-DD"),
+ HEndDate: dayjs(new Date()).format("YYYY-MM-DD"),
+ }
+ this.search()
+ },
+ add() {
+ uni.navigateTo({
+ url: '/pages/MJGL/Sb_EquipRepariCheckBill/Sb_EquipRepariCheckBill?operationType=1'
+ })
+ },
+ //缂栬緫
+ edit(item) {
+ console.log(item)
+ uni.request({
+ url: this.serverUrl + '/WEBSController/TempList_Modify_Json',
+ data: {
+ "HInterID": item.HInterID,
+ "HBillNo": item.鍗曟嵁鍙�,
+ "HBillType": this.hform.HBillType
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ uni.navigateTo({
+ url: './OtherOutBill?OperationType=2&HInterID=' + item.HInterID
+ })
+ } else {
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ }
+
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ })
+ },
+ //鍒犻櫎
+ del(item) {
+ // console.log(item.hmainid,uni.getStorageSync('HUserName'))
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭瑕佸垹闄よ褰曪紵鍒犻櫎鍚庝笉鑳芥仮澶�',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.request({
+ url: this.serverUrl +
+ '/Sb_EquipMaintainBill/DeltetEquipMaintainBillList',
+ data: {
+ HInterID: item.hmainid,
+ user: uni.getStorageSync('HUserName'),
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ this.clear()
+ }
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ //鎾ら攢
+ revoke(item) {
+ // console.log(item.hmainid,uni.getStorageSync('HUserName'))
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '鏄惁纭鎾ら攢',
+ success: (res) => {
+ if (res.confirm) {
+ console.log('鐢ㄦ埛鐐瑰嚮纭畾');
+ uni.request({
+ url: this.serverUrl +
+ '/WEBSController/set_DeleteICStockBillAndWMS_Json',
+ data: {
+ HInterID: item.HInterID,
+ HBillNo: item.鍗曟嵁鍙�,
+ HBillType: this.hform.HBillType,
+ HMaker: uni.getStorageSync('HUserName'),
+ MvarReportTitle: this.MvarReportTitle,
+ },
+ success: (res) => {
+ console.log(1, res);
+ if (res.data.count == 1) {
+ this.clear()
+ }
+ uni.showToast({
+ title: res.data.Message,
+ icon: 'none'
+ })
+ },
+ fail: (res) => {
+ console.log(res);
+ uni.hideLoading()
+ uni.showToast({
+ title: '鎺ュ彛璇锋眰澶辫触',
+ icon: 'none'
+ })
+ },
+ });
+ } else if (res.cancel) {
+ console.log('鐢ㄦ埛鐐瑰嚮鍙栨秷');
+ }
+ }
+ });
+ },
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ @import "@/pages/MJGL/style/MJListStyle.scss"
+</style>
\ No newline at end of file
diff --git a/pages/MJGL/style/MJBillStyle.scss b/pages/MJGL/style/MJBillStyle.scss
index 53775e9..d2bcbda 100644
--- a/pages/MJGL/style/MJBillStyle.scss
+++ b/pages/MJGL/style/MJBillStyle.scss
@@ -86,7 +86,13 @@
}
}
-
+ .required::after{
+ content: "*";
+ color: red;
+ margin-left: 4px;
+ font-weight: bold;
+ }
+
.right {
// width: 450rpx;
flex: 1;
@@ -119,6 +125,7 @@
textarea {
width: 98%;
+ height: 6em;
padding: 8rpx 20rpx;
font-size: 30rpx;
}
diff --git a/pages/MJGL/style/MJListStyle.scss b/pages/MJGL/style/MJListStyle.scss
index e69de29..f27e690 100644
--- a/pages/MJGL/style/MJListStyle.scss
+++ b/pages/MJGL/style/MJListStyle.scss
@@ -0,0 +1,193 @@
+ .form {
+ padding: 20rpx;
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ }
+
+ .other {
+ margin-top: 8rpx;
+ text-align: center;
+ font-size: 28rpx;
+ padding: 4rpx 18rpx;
+ color: #1890FF;
+ }
+
+ .tabs {
+ width: 100%;
+ position: fixed;
+ left: 0;
+ z-index: 9;
+ display: flex;
+ background-color: #e5e5e5;
+
+ view {
+ width: 50%;
+ font-size: 30rpx;
+ color: #333;
+ text-align: center;
+ padding: 16rpx 0;
+ }
+
+ .on {
+ color: #3a78ff;
+ font-weight: bold;
+ border-bottom: 3px solid #3a78ff;
+ }
+ }
+
+ .buttons {
+ width: 100%;
+ display: flex;
+ justify-content: center;
+ margin-top: 20rpx;
+
+ button {
+ border-radius: 50rpx;
+ width: 180rpx;
+ height: 66rpx;
+ line-height: 66rpx;
+ font-size: 28rpx;
+ }
+
+ .btn-a {
+ background-color: #acacac;
+ color: #fff;
+ }
+
+ .btn-b {
+ background-color: #41a863;
+ color: #fff;
+ }
+
+ .btn-c {
+ background-color: #3a78ff;
+ color: #fff;
+ }
+ }
+
+ .form-item {
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+ padding: 6rpx 0;
+
+ .title {
+ width: 180rpx;
+
+ text {
+ color: red;
+ font-weight: bold;
+ }
+ }
+
+ .right {
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #acacac;
+ }
+
+ .righton {
+ width: 450rpx;
+ border-radius: 22rpx;
+ border: 1px solid #e4e4e4;
+ background-color: #e4e4e4;
+ }
+
+ input {
+ width: 100%;
+ padding: 8rpx 20rpx;
+ font-size: 30rpx;
+ }
+ }
+
+ .list {
+ width: 100%;
+
+ .card-detail {
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ line-height: 120%;
+
+ .detail {
+ // width: 50%;
+ font-size: 26rpx;
+ color: #555;
+ padding-bottom: 20rpx;
+
+ text {
+ color: #999;
+ font-size: 26rpx;
+ }
+ }
+ }
+
+ .more {
+ color: #888;
+ font-size: 26rpx;
+ display: flex;
+ border-top: 1px solid #eee;
+ padding-top: 20rpx;
+
+ .part {
+ width: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+
+ .op {
+ display: flex;
+ justify-content: space-around;
+ margin-top: 20rpx;
+
+ button {
+ padding: 0;
+ width: 150rpx;
+ font-size: 25rpx;
+ }
+
+ .op1 {
+ border: 1px solid #41a863;
+ color: #41a863;
+ }
+
+ .op2 {
+ border: 1px solid #d98d00;
+ color: #d98d00;
+ }
+
+ .op3 {
+ border: 1px solid #3a78ff;
+ color: #3a78ff;
+ }
+
+ .op4 {
+ border: 1px solid #da0000;
+ color: #da0000;
+ }
+
+ .op5 {
+ border: 1px solid #888;
+ color: #888;
+ }
+ }
+ }
+
+ .pagination-zone {
+ position: fixed;
+ bottom: 0;
+ box-sizing: border-box;
+ background-color: #fff;
+ box-shadow: 0 2rpx 10rpx 2rpx rgba(0, 0, 0, 0.4);
+ padding: 20rpx 40rpx 20rpx 40rpx;
+ display: flex;
+ flex-direction: column;
+ gap: 20rpx;
+ justify-content: space-between;
+ width: 100%;
+ }
\ No newline at end of file
diff --git a/pages/index/tab3.vue b/pages/index/tab3.vue
index fca1c4b..ab6f59d 100644
--- a/pages/index/tab3.vue
+++ b/pages/index/tab3.vue
@@ -162,7 +162,14 @@
hidden: true,
},
{
- "img":"../../static/icon/icon8.png",
+ "img": "../../static/icon/icon8.png",
+ "text": "璁惧淇濆吇璁板綍鍗曞垪琛�",
+ "url": "/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBillList",
+ "id": 52,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
"text": "璁惧淇濆吇璁板綍鍗�",
"url": "/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill",
"id": 17,
@@ -170,10 +177,31 @@
},
{
"img": "../../static/icon/icon8.png",
+ "text": "璁惧鐐规璁板綍鍗曞垪琛�",
+ "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBillList",
+ "id": 54,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
"text": "璁惧鐐规璁板綍鍗�",
"url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill",
"id": 18,
"hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "璁惧缁翠慨楠屾敹鍗曞垪琛�",
+ "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBillList",
+ "id": 56,
+ "hidden": false
+ },
+ {
+ "img": "../../static/icon/icon8.png",
+ "text": "璁惧缁翠慨楠屾敹鍗�",
+ "url": "/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill",
+ "id": 57,
+ "hidden": false
}
]
}
diff --git a/pages/zutuo_xiaowei/form_xiaowei.vue b/pages/zutuo_xiaowei/form_xiaowei.vue
index f38ed97..512701f 100644
--- a/pages/zutuo_xiaowei/form_xiaowei.vue
+++ b/pages/zutuo_xiaowei/form_xiaowei.vue
@@ -258,7 +258,7 @@
HMaterModel:'',
HCusModel:'',
HCusMaterName:'',
- HEmpID:getUserInfo()['Czybm'],
+ HEmpID:getUserInfo()['HEmpID'],
HEmpNumber:uni.getStorageSync("HEmpNumber"),
HEmpName:getUserInfo()['Czymc'],
HGroupID:0,
--
Gitblit v1.9.1