From 52a132d27e8ff3213d32bd5dd326b59b4b17b2e4 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 19 十月 2023 11:19:52 +0800
Subject: [PATCH] 1.模具维修申请 100% 2.模具维修 100%
---
pages/mjgl/mjwx.vue | 138 +++++++++++++++++++++++----------------------
1 files changed, 71 insertions(+), 67 deletions(-)
diff --git a/pages/mjgl/mjwx.vue b/pages/mjgl/mjwx.vue
index 5359ac2..a29807d 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,7 +81,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="descMessage">
</u--textarea>
</view>
@@ -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>
@@ -135,15 +138,17 @@
</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="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,10 +187,11 @@
<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>
@@ -196,12 +202,10 @@
</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 {
@@ -263,7 +267,7 @@
},
mounted() {
this.init()
- // this.getRepairScanDeviceQrCodeDataList()
+ this.getRepairScanMouldQrCodeDataList()
},
@@ -379,13 +383,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 +409,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 +425,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 ? [{
+ url: this.$baseUrl + '/MouldManager/RepairScanMouldSave',
+ // files: [...this.fileList, ...this.fileList2].length === 0 ? [{
+ // "uri": "/"
+ // }] : [...this.fileList, ...this.fileList2],
+
+ files: this.fileList === 0 ? [{
"uri": "/"
- }] : [...this.fileList, ...this.fileList2],
+ }] : this.fileList,
header: header,
formData: formData,
success: (res) => {
@@ -455,9 +459,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 = []
--
Gitblit v1.9.3