This commit is contained in:
parent
1ba8b6eb90
commit
8d5ae253f4
|
|
@ -122,16 +122,15 @@
|
||||||
},
|
},
|
||||||
//输入框查询
|
//输入框查询
|
||||||
inputChange(e){
|
inputChange(e){
|
||||||
console.log(e)
|
// console.log(e)
|
||||||
if(e==""){
|
if(e==""){
|
||||||
this.selectData=this.options
|
this.selectData=this.options
|
||||||
}else{
|
}else{
|
||||||
this.selectData=this.mapTree(e,this.options)
|
this.selectData=this.mapTree(e,this.options)
|
||||||
}
|
}
|
||||||
console.log(this.selectData)
|
// console.log(this.selectData)
|
||||||
},
|
},
|
||||||
mapTree(value,arr){
|
mapTree(value,arr){
|
||||||
console.log("sssssss")
|
|
||||||
let newarr = [];
|
let newarr = [];
|
||||||
arr.forEach(element => {
|
arr.forEach(element => {
|
||||||
if (element.name.indexOf(value) > -1) { // 判断条件
|
if (element.name.indexOf(value) > -1) { // 判断条件
|
||||||
|
|
|
||||||
|
|
@ -280,13 +280,13 @@ function formatEquipmentTree(list) {
|
||||||
}
|
}
|
||||||
// 校验电话
|
// 校验电话
|
||||||
const checkPhone = (rule, value, callback) => {
|
const checkPhone = (rule, value, callback) => {
|
||||||
if (!formData.phone) {
|
// if (!formData.phone) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
icon: 'none',
|
// icon: 'none',
|
||||||
title: '请输入电话号码',
|
// title: '请输入电话号码',
|
||||||
})
|
// })
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (!/^1[3-9][0-9]{9}$/.test(formData.phone)) {
|
if (!/^1[3-9][0-9]{9}$/.test(formData.phone)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
|
||||||
|
|
@ -284,13 +284,13 @@ function formatEquipmentTree(list) {
|
||||||
}
|
}
|
||||||
// 校验电话
|
// 校验电话
|
||||||
const checkPhone = (rule, value, callback) => {
|
const checkPhone = (rule, value, callback) => {
|
||||||
if (!formData.phone) {
|
// if (!formData.phone) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
icon: 'none',
|
// icon: 'none',
|
||||||
title: '请输入电话号码',
|
// title: '请输入电话号码',
|
||||||
})
|
// })
|
||||||
return false
|
// return false
|
||||||
}
|
// }
|
||||||
if (!/^1[3-9][0-9]{9}$/.test(formData.phone)) {
|
if (!/^1[3-9][0-9]{9}$/.test(formData.phone)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -467,6 +467,7 @@ const submit = (isOut) => {
|
||||||
if (!opts.value.isEdit) {
|
if (!opts.value.isEdit) {
|
||||||
console.log('新增')
|
console.log('新增')
|
||||||
const res = await addLeaseTask(params)
|
const res = await addLeaseTask(params)
|
||||||
|
tableData.value = []
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
console.log('🚀 ~ .then ~ res:', res)
|
console.log('🚀 ~ .then ~ res:', res)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -476,6 +477,7 @@ const submit = (isOut) => {
|
||||||
back()
|
back()
|
||||||
} else if (opts.value.isEdit) {
|
} else if (opts.value.isEdit) {
|
||||||
const res = await editLeaseTask(params)
|
const res = await editLeaseTask(params)
|
||||||
|
tableData.value = []
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue