From d07500fef337fc0366d5c51723ddb3ba2071f33d Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期五, 01 八月 2025 10:33:37 +0800
Subject: [PATCH] 1.计时工资功能开发
---
pages/mjgl/mjwx.vue | 165 +++++++++++++++++++++++++++++++------------------------
1 files changed, 93 insertions(+), 72 deletions(-)
diff --git a/pages/mjgl/mjwx.vue b/pages/mjgl/mjwx.vue
index 5359ac2..2084705 100644
--- a/pages/mjgl/mjwx.vue
+++ b/pages/mjgl/mjwx.vue
@@ -12,7 +12,7 @@
<view v-show="topContent.length!==0">
- <view class="mainContent" :style="{maxHeight: '600rpx',overflow: 'scroll'}">
+ <view class="mainContent">
<view>
<u-gap height="10" bgColor="#eff0f1"></u-gap>
<view class="head">
@@ -20,39 +20,39 @@
<view class="head_left">
<view class="head_bar"></view>
<view class="head_title">
- 鎵弿缁翠慨妯″叿
+ 妯″叿淇℃伅
</view>
</view>
<view class="marginRight20">
- <u-icon name="scan" @click="topScanClick" color="red" size="56"></u-icon>
+ <u-icon name="scan" @click="topScanClick" color="red" size="24"></u-icon>
</view>
</view>
- <view class=" marginLeft20 marginRight20 flex_column"
+ <view class="marginLeft20 marginRight20 flex_column"
style="max-height: 420rpx;overflow:scroll;">
<u-radio-group v-model="radioValue" class="flex_column">
<view class="marginBottom20" style="position: relative"
- @click="groupChange(item.docu_code)" v-for="item in topContent"
- :key="item.docu_code">
+ @click="groupChange(item.mouldcode)" v-for="item in topContent"
+ :key="item.mouldcode">
<view style="display: flex;float: left;">
<view class="titleFont">
- <view>缁翠慨鐢宠鍗�:</view>
- <view>妯″叿缂栫爜:</view>
- <view>妯″叿鍚嶇О:</view>
- <view>瑙勬牸鍨嬪彿:</view>
- <view>鐢宠浜哄憳:</view>
- <view>鐢宠鏃堕棿:</view>
- <view>鏁呴殰鏉ユ簮:</view>
- <view>鏁呴殰鎻忚堪:</view>
+ <view>鐢宠鍗曞彿锛�</view>
+ <view>妯″叿缂栫爜锛�</view>
+ <view>妯″叿鍚嶇О锛�</view>
+ <view>瑙勬牸鍨嬪彿锛�</view>
+ <view>鐢宠浜哄憳锛�</view>
+ <view>鐢宠鏃堕棿锛�</view>
+ <view>鏁呴殰鏉ユ簮锛�</view>
+ <view>鏁呴殰鎻忚堪锛�</view>
</view>
<view class="contentFont">
<view>{{item.docu_code}}</view>
- <view>{{item.code}}</view>
- <view>{{item.name}}</view>
+ <view>{{item.mouldcode}}</view>
+ <view>{{item.mouldname}}</view>
<view>{{item.spec?item.spec:'/'}}</view>
- <view>{{item.request_person}}</view>
+ <view>{{item.request_name}}</view>
<view>{{item.request_date}}</view>
<view>{{item.source}}</view>
<view style="width:400rpx;word-wrap:break-word">
@@ -60,16 +60,16 @@
</view>
</view>
</view>
- <u-radio size='40' style='position: absolute;top: 45%;right: 0;'
- :key="item.docu_code" :name="item.docu_code"
- @change="groupChange(item.docu_code)" activeColor="red"></u-radio>
+ <u-radio size='18' style='position: absolute;top: 45%;right: 0;'
+ :key="item.mouldcode" :name="item.mouldcode"
+ @change="groupChange(item.mouldcode)" activeColor="red"></u-radio>
</view>
</u-radio-group>
</view>
</view>
- <u-gap height="20" bgColor="#eff0f1"></u-gap>
+ <u-gap height="10" bgColor="#eff0f1"></u-gap>
<view class="head" style="padding-bottom: 10rpx;">
<view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;">
@@ -81,15 +81,15 @@
</view>
</view>
<view class='inputClass contentFont' style="margin: 0 20rpx; width: 95%;">
- <u--textarea placeholder="璇疯緭鍏�" confirm-type="send" border="surround" height='100'
- v-model="descMessage">
+ <u--textarea placeholder="璇疯緭鍏�" :adjustPosition='false' confirm-type="send" border="surround"
+ height='80' v-model="descMessage">
</u--textarea>
</view>
<view style="display: flex;">
<view v-for="(pic,index) in fileList" :key="pic.name">
<view style="margin: 20rpx 0rpx 20rpx 20rpx;position: relative;">
- <u-icon name="close" color="#fff" size="26"
+ <u-icon name="close" color="#fff" size="16"
style="position: absolute;z-index: 10;right: 0;background-color: black;border-radius:50%;"
@click="deletePic(pic)"></u-icon>
@@ -103,29 +103,32 @@
</view>
- <u-gap height="20" bgColor="#eff0f1"></u-gap>
+ <u-gap height="10" bgColor="#eff0f1"></u-gap>
<view class="head" style="padding-bottom: 10rpx;">
<view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;">
<view class="head_left">
<view class="head_bar"></view>
<view class="head_title">
- 鍋滄満缁翠慨
+ 涓嬫満缁翠慨
</view>
</view>
- <view class="marginRight20" style="width: 200rpx;display: flex;">
- <u-button type="primary" :plain="isStop!=='Y'" text="鏄�" @click="isStopClick('Y')">
+ <view class="marginRight20" style="width: 250rpx;display: flex;">
+ <u-button type="primary" shape='circle' size="small" style='margin-right: 10rpx;'
+ :plain="isStop!=='Y'" text="鏄�" @click="isStopClick('Y')">
</u-button>
- <u-button type="warning" :plain="isStop!=='N'" text="鍚�" @click="isStopClick('N')">
+ <u-button type="warning" shape='circle' size="small" :plain="isStop!=='N'" text="鍚�"
+ @click="isStopClick('N')">
</u-button>
</view>
</view>
</view>
- <u-gap height="20" bgColor="#eff0f1"></u-gap>
+ <u-gap height="10" bgColor="#eff0f1"></u-gap>
- <view v-show="isStop==='N'" class="head" style="padding-bottom: 10rpx;padding-bottom: 20rpx;">
+ <!-- v-show="isStop==='N'" -->
+ <view class="head" style="padding-bottom: 10rpx;padding-bottom: 20rpx;">
<view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;">
<view class="head_left">
<view class="head_bar"></view>
@@ -134,16 +137,18 @@
</view>
</view>
</view>
- <view class='inputClass contentFont' style="margin: 0 20rpx; width: 95%;">
- <u--textarea placeholder="璇疯緭鍏�" confirm-type="send" border="surround" height='100'
- v-model="descMessage2">
+ <view class='inputClass contentFont' style="margin: 0 20rpx; width: 95%;" @click="show=true">
+ <u--textarea placeholder="璇疯緭鍏�" :adjustPosition='false' confirm-type="send" border="surround"
+ height='80' v-model="descMessage2">
</u--textarea>
</view>
</view>
- <u-gap height="20" bgColor="#eff0f1"></u-gap>
- <!-- margin-bottom: 110rpx; -->
+ <!-- <view style="height: 120rpx;"> </view> -->
+
+ <!-- <u-gap height="10" bgColor="#eff0f1"></u-gap>
+
<view v-show="isStop==='N'" class="head" style="padding-bottom: 10rpx;">
<view class="head_block" style="margin-bottom: 10rpx;margin-top:20rpx;">
<view class="head_left">
@@ -154,7 +159,7 @@
</view>
</view>
<view class='inputClass contentFont' style="margin: 0 20rpx; width: 95%;">
- <u--textarea placeholder="璇疯緭鍏�" confirm-type="send" border="surround" height='100'
+ <u--textarea placeholder="璇疯緭鍏�" confirm-type="send" border="surround" height='80'
v-model="descMessage3">
</u--textarea>
</view>
@@ -173,7 +178,7 @@
margin: 20rpx;padding: 30rpx;
" @click="selectPics2">
</view>
- </view>
+ </view> -->
</view>
@@ -182,26 +187,37 @@
<view class="footer" style="min-height:62rpx;">
<u-button size="large" :loading="isDisabledSubmitButton" loadingText="姝e湪鎻愪氦,璇风◢绛�..." type="primary"
- @click="submit"
- :disabled="isStop==='Y'?descMessage.toString().length===0:descMessage.toString().length===0||descMessage2.toString().length===0"
+ @click="submit" :disabled="descMessage.toString().length===0&&descMessage2.toString().length===0"
text="纭鎻愪氦">
</u-button>
+ <!-- :disabled="isStop==='Y'?descMessage.toString().length===0:descMessage.toString().length===0||descMessage2.toString().length===0" -->
+
</view>
</view>
+
+
+ <u-modal :show="show" title="缁翠慨鍐呭" :closeOnClickOverlay="true" @confirm='show=false' @close='show=false'>
+ <view class="slot-content">
+ <view class='inputClass contentFont' style="">
+ <!-- :adjustPosition='false' -->
+ <u--textarea placeholder="璇疯緭鍏�" confirm-type="send" border="surround" height='80'
+ v-model="descMessage2">
+ </u--textarea>
+ </view>
+ </view>
+ </u-modal>
<!-- <scan-code></scan-code> -->
</view>
</template>
<script>
- // import {
- // RepairScanDeviceQrCodeDataList,
- // } from '../../config/api.js'
- // import {
- // data
- // } from '../../uni_modules/uview-ui/libs/mixin/mixin.js';
+ import {
+ RepairScanMouldQrCodeDataList,
+ } from '../../config/api.js'
+
// import scanCode from '@/components/scan-code/scan-code.vue'
export default {
@@ -256,6 +272,9 @@
descMessage3: '', //鏇存崲澶囦欢
fileList2: [], //鏇存崲澶囦欢鍥剧墖
imgPreviewSrcs2: [],
+
+
+ show: false
}
},
created() {
@@ -263,7 +282,7 @@
},
mounted() {
this.init()
- // this.getRepairScanDeviceQrCodeDataList()
+ this.getRepairScanMouldQrCodeDataList()
},
@@ -379,13 +398,13 @@
- let r = that.topContent.find(i => i.docu_code === that.scanContent)
+ let r = that.topContent.find(i => i.mouldcode === that.scanContent)
if (r === undefined) {
uni.$u.toast('鎵�鎵殑浜岀淮鐮佷笉鍦ㄥ垪琛ㄤ腑锛�')
} else {
that.topContent.forEach((item, index) => {
- if (item.docu_code === that.scanContent) {
+ if (item.mouldcode === that.scanContent) {
that.topContent.splice(index, 1)
}
})
@@ -405,12 +424,14 @@
});
},
- // 鑾峰彇缁翠慨宸ヤ綅
- async getRepairScanDeviceQrCodeDataList(val) {
- const res = await RepairScanDeviceQrCodeDataList()
+ // 鑾峰彇缁翠慨妯″叿
+ async getRepairScanMouldQrCodeDataList(val) {
+ const res = await RepairScanMouldQrCodeDataList({
+ mouldcode: val
+ })
if (res.code === '200') {
this.topContent = res.data
- this.radioValue = this.topContent.length > 0 ? this.topContent[0].docu_code : ''
+ this.radioValue = this.topContent.length > 0 ? this.topContent[0].mouldcode : ''
}
},
@@ -419,35 +440,33 @@
const header = {
// 'Content-Type': 'multipart/form-data',
'Content-Type': 'application/x-www-form-urlencoded',
- 'rediskey': uni.getStorageSync('rediskey'),
- 'admin': uni.getStorageSync('usercode'),
- 'username': encodeURIComponent(uni.getStorageSync('username')),
- 'navTabId': uni.getStorageSync('usercode'),
- 'userid': uni.getStorageSync('userid'),
- 'guid': uni.getStorageSync('guid'),
- 'usertype': 'APP'
+ 'Token': uni.getStorageSync('Token'),
+
}
- const result = this.topContent.find(item => item.docu_code === this.radioValue)
+ const result = this.topContent.find(item => item.mouldcode === this.radioValue)
const formData = {
- username: uni.getStorageSync('username'),
+ menucode: '2504',
docu_code: result.docu_code,
- eqpcode: result.eqpcode,
- wkshpcode: result.wksp_code,
+ mouldcode: result.mouldcode,
faultdescr: this.descMessage,
is_stoprepair: this.isStop,
// files1: this.fileList,
repaircontent: this.descMessage2,
- replaceparts: this.descMessage3
+ // replaceparts: this.descMessage3
}
- // console.log(formData)
+ console.log(formData)
// console.log([...this.fileList, ...this.fileList2].length)
this.isDisabledSubmitButton = true
uni.uploadFile({
- url: this.$baseUrl + '/AppDeviceManage/RepairScanDeviceSave',
- files: [...this.fileList, ...this.fileList2].length === 0 ? [{
- "uri": "/"
- }] : [...this.fileList, ...this.fileList2],
+ url: this.$baseUrl + '/MouldManager/RepairScanMouldSave',
+ // files: [...this.fileList, ...this.fileList2].length === 0 ? [{
+ // "uri": "/"
+ // }] : [...this.fileList, ...this.fileList2],
+
+ files: this.fileList.length === 0 ? [{
+ uri: '/'
+ }] : this.fileList,
header: header,
formData: formData,
success: (res) => {
@@ -455,9 +474,9 @@
let result = JSON.parse(res.data)
if (res.statusCode == 200 && result.code == '200') {
uni.$u.toast('鎻愪氦鎴愬姛锛�')
- this.topContent = this.topContent.filter(i => i.docu_code !== this.radioValue)
+ this.topContent = this.topContent.filter(i => i.mouldcode !== this.radioValue)
this.radioValue = this.topContent.length === 0 ? '' : this.topContent[0]
- .docu_code
+ .mouldcode
this.descMessage = ''
this.imgPreviewSrcs = []
this.fileList = []
@@ -511,5 +530,7 @@
width: 160rpx;
height: 160rpx;
border-radius: 20rpx;
+
+ // color: #fff;
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3