|
|
@@ -30,7 +30,7 @@ |
|
|
|
</radio-group> |
|
|
|
</view> |
|
|
|
</u-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <u-form-item prop="phone"> |
|
|
|
<view class="from_item" style="background-color: #f7f7f7"> |
|
|
|
<text><text style="color: red"></text>手机号:</text> |
|
|
@@ -53,20 +53,15 @@ |
|
|
|
</u-form> |
|
|
|
<view style="margin: 30rpx;" v-if="state.isPicture"> |
|
|
|
<view class="please"><text style="color: red">*</text>请上传图片:</view> |
|
|
|
<uni-file-picker |
|
|
|
fileMediatype="image" |
|
|
|
mode="grid" |
|
|
|
:limit="9" |
|
|
|
@select="select" |
|
|
|
:image-styles="state.imageStyles" |
|
|
|
/> |
|
|
|
<uni-file-picker fileMediatype="image" mode="grid" :limit="9" @select="select" |
|
|
|
:image-styles="state.imageStyles" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="btn-wrapper"> |
|
|
|
<button class="default button" v-if="apply.data.status" |
|
|
|
@click="changeCardQueryCancleAction()" type="default">撤回申请</button> |
|
|
|
<button class="submit button" v-if="apply.data.status === 'APPLY'||!apply.data.status" |
|
|
|
@click="toPage()" type="default">下一步填写资料</button> |
|
|
|
<button class="default button" v-if="apply.data.status" @click="changeCardQueryCancleAction()" |
|
|
|
type="default">撤回申请</button> |
|
|
|
<button class="submit button" v-if="apply.data.status === 'APPLY'||!apply.data.status" @click="toPage()" |
|
|
|
type="default">下一步填写资料</button> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
@@ -106,14 +101,14 @@ |
|
|
|
import { |
|
|
|
msg |
|
|
|
} from "@/utils/utils"; |
|
|
|
import {pathToBase64} from "@/utils/image-tools/index.js"; |
|
|
|
const state=reactive({ |
|
|
|
imageList:[], //图片数据 |
|
|
|
imageStyles:{ |
|
|
|
width:80, |
|
|
|
height:80, |
|
|
|
import { pathToBase64 } from "@/utils/image-tools/index.js"; |
|
|
|
const state = reactive({ |
|
|
|
imageList: [], //图片数据 |
|
|
|
imageStyles: { |
|
|
|
width: 80, |
|
|
|
height: 80, |
|
|
|
}, |
|
|
|
isPicture:false, //是否上传图片 |
|
|
|
isPicture: false, //是否上传图片 |
|
|
|
}) |
|
|
|
// 表单数据 |
|
|
|
const form = reactive({ |
|
|
@@ -217,27 +212,27 @@ |
|
|
|
onShow(() => { |
|
|
|
changeCardQueryAction() |
|
|
|
}) |
|
|
|
const select=(e)=>{ |
|
|
|
console.log('选择文件:',e) |
|
|
|
const select = (e) => { |
|
|
|
console.log('选择文件:', e) |
|
|
|
pathToBase64(e.tempFilePaths[0]).then((path) => { |
|
|
|
var data = { |
|
|
|
fileBase64: path, |
|
|
|
}; |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: data, |
|
|
|
method: "POST", |
|
|
|
showLoading: true, |
|
|
|
}; |
|
|
|
request(fileUpload, options).then((res) => { |
|
|
|
const data = stringToJson(res.bizContent); |
|
|
|
const imgArr=state.imageList |
|
|
|
imgArr.push(data.data.url) |
|
|
|
state.imageList = imgArr; |
|
|
|
console.log("data.data.url",state.imageList) |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch((error) => {}); |
|
|
|
var data = { |
|
|
|
fileBase64: path, |
|
|
|
}; |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
|
data: data, |
|
|
|
method: "POST", |
|
|
|
showLoading: true, |
|
|
|
}; |
|
|
|
request(fileUpload, options).then((res) => { |
|
|
|
const data = stringToJson(res.bizContent); |
|
|
|
const imgArr = state.imageList |
|
|
|
imgArr.push(data.data.url) |
|
|
|
state.imageList = imgArr; |
|
|
|
console.log("data.data.url", state.imageList) |
|
|
|
}); |
|
|
|
}) |
|
|
|
.catch((error) => { }); |
|
|
|
} |
|
|
|
// 单选 |
|
|
|
const radioChange = (e : any) => { |
|
|
@@ -249,10 +244,10 @@ |
|
|
|
const typeChange = (e : any) => { |
|
|
|
console.log(e); |
|
|
|
form.damageMode = e.detail.value |
|
|
|
if(e.detail.value==1){ |
|
|
|
state.isPicture=true |
|
|
|
}else{ |
|
|
|
state.isPicture=false |
|
|
|
if (e.detail.value == 1) { |
|
|
|
state.isPicture = true |
|
|
|
} else { |
|
|
|
state.isPicture = false |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
@@ -282,7 +277,7 @@ |
|
|
|
//查询申请单 |
|
|
|
const changeCardQueryAction = () => { |
|
|
|
var data = { |
|
|
|
orderId: params.orderId, |
|
|
|
orderId: params.orderId |
|
|
|
}; |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
@@ -331,8 +326,8 @@ |
|
|
|
|
|
|
|
//申请 |
|
|
|
const queryCckChangejzCardAction = () => { |
|
|
|
if(form.damageMode=="1"){ |
|
|
|
if(state.imageList.length==0){ |
|
|
|
if (form.damageMode == "1") { |
|
|
|
if (state.imageList.length == 0) { |
|
|
|
msg('请上传图片'); |
|
|
|
return; |
|
|
|
} |
|
|
@@ -340,8 +335,8 @@ |
|
|
|
var data = { |
|
|
|
orderId: params.orderId, |
|
|
|
applyType: form.applyType, |
|
|
|
damageMode: form.damageMode ,//0 --- 人为损坏 1 --- 自然损坏 当为换卡签的时候必传 |
|
|
|
fileUrl:state.imageList.toString() |
|
|
|
damageMode: form.damageMode,//0 --- 人为损坏 1 --- 自然损坏 当为换卡签的时候必传 |
|
|
|
fileUrl: state.imageList.toString() |
|
|
|
}; |
|
|
|
const options = { |
|
|
|
type: 2, |
|
|
@@ -351,12 +346,13 @@ |
|
|
|
}; |
|
|
|
return new Promise(async (resolve, reject) => { |
|
|
|
const res = await request(changeCardApply, options); |
|
|
|
if(res.bizContent.indexOf("/") !== -1){ |
|
|
|
const data = stringToJson(res.bizContent); |
|
|
|
}else{ |
|
|
|
const data=res.bizContent |
|
|
|
if (res.bizContent.indexOf("/") !== -1) { |
|
|
|
var resultData = stringToJson(res.bizContent); |
|
|
|
} else { |
|
|
|
var resultData = res.bizContent |
|
|
|
} |
|
|
|
resolve(data); |
|
|
|
console.log("data88888", JSON.parse(resultData)) |
|
|
|
resolve(JSON.parse(resultData)); |
|
|
|
}).catch((error) => { |
|
|
|
reject(error); |
|
|
|
}); |
|
|
@@ -396,15 +392,15 @@ |
|
|
|
// } |
|
|
|
|
|
|
|
queryCckChangejzCardAction().then(val => { |
|
|
|
console.log("val",val) |
|
|
|
console.log("val888888", val.id) |
|
|
|
// if(!val.id){ |
|
|
|
// msg("已存在对应的申请单"); |
|
|
|
// }else{ |
|
|
|
navTo( |
|
|
|
`/subpackage/after-sale/replace-equipment/form?orderId=${params.orderId}&&id=${val.id}` |
|
|
|
) |
|
|
|
navTo( |
|
|
|
`/subpackage/after-sale/replace-equipment/form?orderId=${params.orderId}&&id=${val.id}` |
|
|
|
) |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@@ -530,7 +526,8 @@ |
|
|
|
::v-deep .input { |
|
|
|
text-align: left; |
|
|
|
flex: 1; |
|
|
|
background: transparent; |
|
|
|
background: transparent; |
|
|
|
|
|
|
|
input { |
|
|
|
text-align: left; |
|
|
|
} |
|
|
@@ -562,14 +559,17 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.btn-wrapper{ |
|
|
|
|
|
|
|
.btn-wrapper { |
|
|
|
display: flex; |
|
|
|
padding-top: 60rpx; |
|
|
|
} |
|
|
|
.button::after{ |
|
|
|
border:none; |
|
|
|
|
|
|
|
.button::after { |
|
|
|
border: none; |
|
|
|
} |
|
|
|
.default{ |
|
|
|
|
|
|
|
.default { |
|
|
|
height: 80rpx; |
|
|
|
background: rgba(0, 179, 139, .1); |
|
|
|
border-radius: 40rpx; |
|
|
@@ -578,8 +578,9 @@ |
|
|
|
color: #00B38B; |
|
|
|
line-height: 80rpx; |
|
|
|
width: 45%; |
|
|
|
border:1px solid #00B38B; |
|
|
|
border: 1px solid #00B38B; |
|
|
|
} |
|
|
|
|
|
|
|
.submit { |
|
|
|
background: linear-gradient(to left, #43a1e0 0%, #13e7c1 100%); |
|
|
|
height: 80rpx; |
|
|
@@ -589,10 +590,12 @@ |
|
|
|
font-size: 32rpx; |
|
|
|
width: 45%; |
|
|
|
} |
|
|
|
|
|
|
|
.upload-img { |
|
|
|
margin-top: 10rpx; |
|
|
|
} |
|
|
|
.please{ |
|
|
|
|
|
|
|
.please { |
|
|
|
font-size: 28rpx; |
|
|
|
margin-bottom: 20rpx; |
|
|
|
} |