修试优化
This commit is contained in:
parent
a180e1e5a0
commit
d2e8fb8097
|
|
@ -296,9 +296,11 @@ const isExpanded = ref(false)
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
console.log(options)
|
console.log(options)
|
||||||
|
console.log('🚀 ~ options:', options.itemId)
|
||||||
queryParams.value = JSON.parse(options.queryParams)
|
queryParams.value = JSON.parse(options.queryParams)
|
||||||
rowIndex.value = options.rowIndex
|
console.log('🚀 ~ queryParams.value:', queryParams.value)
|
||||||
console.log(queryParams.value)
|
rowIndex.value = queryParams.value.repairDeviceList.findIndex((v) => v.id == options.itemId)
|
||||||
|
console.log('🚀 ~ rowIndex.value:', rowIndex.value)
|
||||||
getScrapReasonListData()
|
getScrapReasonListData()
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
|
@ -763,10 +765,15 @@ const saveCode = () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const isSubmit = ref(false)
|
||||||
//维修完成请求
|
//维修完成请求
|
||||||
const saveCodeApi = async () => {
|
const saveCodeApi = async () => {
|
||||||
|
if (isSubmit.value) return
|
||||||
|
isSubmit.value = true
|
||||||
//请求接口
|
//请求接口
|
||||||
rowData.value = queryParams.value
|
rowData.value = JSON.parse(JSON.stringify(queryParams.value))
|
||||||
|
console.log('🚀 ~ saveCodeApi ~ rowData.value:', rowData.value)
|
||||||
|
|
||||||
//维修人员
|
//维修人员
|
||||||
rowData.value.repairDeviceList[rowIndex.value].repairList = [
|
rowData.value.repairDeviceList[rowIndex.value].repairList = [
|
||||||
{
|
{
|
||||||
|
|
@ -821,6 +828,7 @@ const saveCodeApi = async () => {
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
isSubmit.value = false
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ const goOperate = (item,index) => {
|
||||||
if(item.status==0){
|
if(item.status==0){
|
||||||
const codingUrl = '/pages/repair/repairManage/code-operate' // 编码维修
|
const codingUrl = '/pages/repair/repairManage/code-operate' // 编码维修
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `${codingUrl}?queryParams=${JSON.stringify(queryParams.value)}&rowIndex=${index}`,
|
url: `${codingUrl}?queryParams=${JSON.stringify(queryParams.value)}&itemId=${item.id}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue