Merge branch 'master' of http://192.168.30.2:3000/bonus/bonus-material-app
This commit is contained in:
commit
462b293f49
|
|
@ -413,7 +413,8 @@
|
|||
{
|
||||
"path": "pages/repair/testExamine/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修试审核"
|
||||
// "navigationBarTitleText": "修试审核"
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
//修试审核-详情
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@
|
|||
@clear="clearPro"
|
||||
></eselect>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="制单人员:" name="backPerson">
|
||||
<uni-easyinput v-model="backPerson" maxlength="10" placeholder="请输入制单人" />
|
||||
<uni-forms-item label="退料人员:" name="backPerson">
|
||||
<uni-easyinput v-model="backPerson" maxlength="10" placeholder="请输入退料人" />
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="联系电话:" name="phone">
|
||||
<uni-easyinput v-model="phone" maxlength="11" placeholder="请输入联系电话" />
|
||||
|
|
@ -59,6 +59,8 @@ import {
|
|||
getAgreementInfoById,
|
||||
} from '../../services/back.js'
|
||||
import eselect from '@/components/tree-select/eselect.vue'
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
const treeSelect = ref(null)
|
||||
const treeSelect2 = ref(null)
|
||||
const formData = ref({})
|
||||
|
|
@ -167,7 +169,7 @@ const confirmAdd = () => {
|
|||
if (agreementId.value == '') {
|
||||
uni.showToast({ title: '请确认退料单位,退料工程!', icon: 'none' })
|
||||
} else if (backPerson.value == '') {
|
||||
uni.showToast({ title: '请确认制单人!', icon: 'none' })
|
||||
uni.showToast({ title: '请确认退料人!', icon: 'none' })
|
||||
} else {
|
||||
let obj = {
|
||||
backApplyInfo: {
|
||||
|
|
@ -207,6 +209,7 @@ onLoad((options) => {
|
|||
getUnit()
|
||||
getProject()
|
||||
// formData.value = JSON.parse(options.item)
|
||||
backPerson.value = memberStore.userInfo.nickName
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
taskInfo.code
|
||||
}}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="制单人员:" name="backPerson">
|
||||
<uni-forms-item label="退料人员:" name="backPerson">
|
||||
<span style="height: 100%; display: flex; align-items: center">{{
|
||||
taskInfo.backPerson
|
||||
}}</span>
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@
|
|||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center; margin-bottom: 20px">
|
||||
<uni-col :span="6">制单人:</uni-col>
|
||||
<uni-col :span="6">退料人:</uni-col>
|
||||
<uni-col :span="16">
|
||||
<uni-easyinput placeholder="请输入制单人" maxlength="10" v-model="backPerson" />
|
||||
<uni-easyinput placeholder="请输入退料人" maxlength="10" v-model="backPerson" />
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center; margin-bottom: 20px">
|
||||
|
|
@ -103,6 +103,8 @@ import { onLoad } from '@dcloudio/uni-app'
|
|||
import { getMachine, insertBack, getMachineByQrCodeApi } from '../../services/back.js'
|
||||
import ScanQrCode from '@/pages/devicesSearch/ScanQrCode.vue'
|
||||
import { baseURL } from '@/utils/http'
|
||||
import { useMemberStore } from '@/stores'
|
||||
const memberStore = useMemberStore()
|
||||
const backPerson = ref('')
|
||||
const phone = ref('')
|
||||
const apDetection = ref('完好') //外观判定
|
||||
|
|
@ -313,6 +315,7 @@ const getMaInfoScan = async () => {
|
|||
|
||||
onLoad((options) => {
|
||||
console.log(options)
|
||||
backPerson.value = memberStore.userInfo.nickName
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<uni-forms-item label="退料单号:" name="code">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.code }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="制单人员:" name="backPerson">
|
||||
<uni-forms-item label="退料人员:" name="backPerson">
|
||||
<span style="height: 100%;display: flex;align-items: center;">{{ taskInfo.backPerson }}</span>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="退料电话:" name="phone">
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="8">制单人:</uni-col>
|
||||
<uni-col :span="8">退料人:</uni-col>
|
||||
<uni-col :span="16"
|
||||
><div class="cont">{{ item.backPerson }}</div></uni-col
|
||||
>
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ const confirmAdd = () => {
|
|||
if (agreementId.value == '') {
|
||||
uni.showToast({ title: '请确认单位名称,工程名称!', icon: 'none' })
|
||||
} else if (fieldPerson.value == '') {
|
||||
uni.showToast({ title: '请确认制单人!', icon: 'none' })
|
||||
uni.showToast({ title: '请确认退料人!', icon: 'none' })
|
||||
} else if (phone.value == '') {
|
||||
uni.showToast({ title: '请确认联系电话!', icon: 'none' })
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ const formMiddle = ref({
|
|||
//待报废
|
||||
const formRight = ref({
|
||||
// scrapNum:0,
|
||||
scrapType: 0,
|
||||
scrapType: 1,
|
||||
scrapId: null, // 报废原因id
|
||||
scrapReason: '', // 报废原因
|
||||
fileList: [],
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ const delMidPart = (index) => {
|
|||
//待报废
|
||||
const formRight = ref({
|
||||
scrapNum: 0,
|
||||
scrapType: 0,
|
||||
scrapType: 1,
|
||||
scrapReason: '',
|
||||
fileList:[]
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<!-- 维修列表 -->
|
||||
<uni-nav-bar status-bar leftIcon="left" right-text="通过" title="退料任务详情" backgroundColor="#dcf4ff" :border="false" fixed @clickLeft="back" @clickRight="submitAll"/>
|
||||
<view class="page-container">
|
||||
<view class="complete-btn">
|
||||
<view class="btn" @click="changeTab(1)">
|
||||
|
|
@ -35,12 +36,29 @@
|
|||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
<uni-row :gutter="24" class="search-form">
|
||||
<uni-col :span="24" style="display: flex;">
|
||||
<div>全选</div>
|
||||
<checkbox-group v-if="active == 1" @change="onChangeAllChecked" style="margin: 0 10px;">
|
||||
<checkbox :checked="isAllChecked"/>
|
||||
</checkbox-group>
|
||||
<div>{{ isCheckedNum }}</div>
|
||||
<div style="margin: 0 5px;">/</div>
|
||||
<div>{{ tableList.length }}</div>
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
|
||||
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
|
||||
<view class="table-list-item" :key="index" @click="handleItem(item)" v-for="(item, index) in tableList">
|
||||
<uni-swipe-action>
|
||||
<uni-swipe-action-item @click="onClick($event, item)" :right-options="item.taskStatus==10 ? options:[]">
|
||||
<div class="title">
|
||||
<div style="display: flex;">
|
||||
<checkbox-group v-if="active == 1" @change="onChangeChecked(item)">
|
||||
<checkbox :checked="item.checked"/>
|
||||
</checkbox-group>
|
||||
<span style="font-size: 15px; font-weight: 800;color: #3784fb;">{{ item.repairNum }}</span>
|
||||
</div>
|
||||
<div class="title-right">
|
||||
<uni-tag v-if="item.taskStatus == 10" text="未完成" type="warning" custom-style="warningStyle"/>
|
||||
<uni-tag v-if="item.taskStatus == 11" text="已完成" type="success" custom-style="successStyle"/>
|
||||
|
|
@ -137,6 +155,7 @@ import { getListTestExamineApply,outerAudit } from '@/services/repair/testExamin
|
|||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { debounce } from 'lodash-es'
|
||||
|
||||
const loading = ref(false)
|
||||
const total = ref(0) // 数据总量
|
||||
const active = ref(1) // tap索引
|
||||
const tableList = ref([]) // 列表数据源
|
||||
|
|
@ -173,6 +192,81 @@ const options = ref([
|
|||
},
|
||||
])
|
||||
|
||||
const isAllChecked = ref(false)
|
||||
const isCheckedNum = computed(() => tableList.value.filter(item => item.checked).length)
|
||||
|
||||
const back = () => {
|
||||
// 返回
|
||||
uni.navigateBack({
|
||||
delta: 1, // 返回到已存在的页面
|
||||
})
|
||||
}
|
||||
|
||||
const updateAllChecked = () => {
|
||||
isAllChecked.value = tableList.value.length > 0 && tableList.value.every(item => item.checked)
|
||||
}
|
||||
|
||||
// 全选
|
||||
const onChangeAllChecked = () => {
|
||||
isAllChecked.value = !isAllChecked.value
|
||||
tableList.value = tableList.value.map(item => ({
|
||||
...item,
|
||||
checked: isAllChecked.value
|
||||
}))
|
||||
}
|
||||
|
||||
const onChangeChecked = (row) => {
|
||||
row.checked = !row.checked
|
||||
updateAllChecked()
|
||||
}
|
||||
|
||||
const submitAll = () => {
|
||||
// 如果没有选择项 提示
|
||||
if (!tableList.value.some(item => item.checked)) {
|
||||
uni.showToast({
|
||||
title: '请至少勾选一条审核数据',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// 弹框确认
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定提交审核吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
const params = tableList.value.filter(item => item.checked).map(item => {
|
||||
return {
|
||||
status: '1',
|
||||
taskId: item.taskId,
|
||||
}
|
||||
})
|
||||
console.log('🚀 ~ params ~ params:', params)
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
uni.showLoading({
|
||||
mask: true
|
||||
})
|
||||
try {
|
||||
const res = await outerAudit(params)
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
title: '操作成功!',
|
||||
icon: 'none',
|
||||
})
|
||||
onSearchBtn()
|
||||
}
|
||||
loading.value = false
|
||||
uni.hideLoading()
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ submitAll ~ error:', error)
|
||||
loading.value = false
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// 右滑按钮点击事件
|
||||
const onClick = async (e, item) => {
|
||||
console.log(item)
|
||||
|
|
@ -216,16 +310,23 @@ const onSearchBtn = () => {
|
|||
// 获取列表数据
|
||||
const getTableList = async (isTap = false) => {
|
||||
console.log('queryParams.value查询参数', queryParams.value)
|
||||
const checkedIds = Array.isArray(tableList.value)
|
||||
? tableList.value.filter(item => item && item.checked).map(item => item.taskId)
|
||||
: []
|
||||
try {
|
||||
const res = await getListTestExamineApply(queryParams.value)
|
||||
total.value = res.data.total
|
||||
if (isTap) {
|
||||
tableList.value = res.data.rows
|
||||
} else {
|
||||
if (res.data.rows.length == 0) {
|
||||
total.value = res?.data?.total || 0
|
||||
tableList.value = Array.isArray(res?.data?.rows) ? res.data.rows : []
|
||||
// 恢复已勾选项
|
||||
tableList.value.forEach(item => {
|
||||
item.checked = checkedIds.includes(item.taskId)
|
||||
})
|
||||
console.log('🚀 ~ getTableList ~ tableList.value:', tableList.value)
|
||||
updateAllChecked()
|
||||
} catch (error) {
|
||||
console.error('获取列表数据失败:', error)
|
||||
total.value = 0
|
||||
tableList.value = []
|
||||
} else {
|
||||
tableList.value.push(...res.data.rows)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -244,7 +345,7 @@ onShow(() => {
|
|||
const onScrollTolower = debounce(() => {
|
||||
console.log('触底事件')
|
||||
if (total.value > tableList.value.length) {
|
||||
queryParams.value.pageNum++
|
||||
queryParams.value.pageSize += 5
|
||||
getTableList()
|
||||
}
|
||||
}, 500)
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import { useMemberStore } from '@/stores'
|
|||
const ENV = process.env.NODE_ENV
|
||||
// export const baseURL = ENV === 'development' ? 'http://192.168.0.244:18580' : 'http://192.168.0.244:18580'//测试
|
||||
// export const baseURL = ENV === 'development' ? 'http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api/' : 'http://sgwpdm.ah.sgcc.com.cn/iws/jiju-api/'//生产
|
||||
// export const baseURL = ENV === 'development' ? '/api' : '/iws/jiju-api'; // 宏源服务
|
||||
export const baseURL = ENV === 'development' ? 'http://192.168.1.114:18080' : '/iws/jiju-api'; // 宏源服务
|
||||
// export const baseURL = ENV === 'development' ? 'http://192.168.0.234:18080' : '***'
|
||||
export const baseURL = ENV === 'development' ? 'http://192.168.1.117:18080' : 'http://192.168.1.117:18080'//马
|
||||
// export const baseURL = ENV === 'development' ? 'http://192.168.1.114:18080' : 'http://192.168.1.117:18080'//马
|
||||
// export const baseURL = ENV === 'development' ? '/api' : '***'
|
||||
|
||||
// **********OCR识别为NVUE文件页面请求URL需要同步配置**********
|
||||
|
|
|
|||
Loading…
Reference in New Issue