|
@@ -4,33 +4,35 @@
|
|
|
<view class="box">
|
|
|
<view class="line">
|
|
|
<view class="lineTitle">纠错类型</view>
|
|
|
- <view class="lineCont">VIN解析纠错</view>
|
|
|
+ <view class="lineCont" v-if="optdata.type==1">VIN解析纠错</view>
|
|
|
+ <view class="lineCont" v-if="optdata.type==2">匹配关系纠错</view>
|
|
|
</view>
|
|
|
- <view class="line">
|
|
|
+ <view class="line" v-if="optdata.type==1">
|
|
|
<view class="lineTitle">VIN</view>
|
|
|
- <view class="lineCont">VIN222222222222</view>
|
|
|
+ <view class="lineCont">{{jcData.vin}}</view>
|
|
|
</view>
|
|
|
<view class="line">
|
|
|
<view class="lineTitle">车型</view>
|
|
|
- <view class="lineCont">奥迪奥迪奥迪奥迪奥迪奥迪奥迪奥迪CCCC奥迪奥迪奥迪奥迪奥迪奥迪奥迪奥迪1019</view>
|
|
|
+ <view class="lineCont">{{jcData.value}}</view>
|
|
|
</view>
|
|
|
<view class="line">
|
|
|
<view class="lineTitle">错误说明</view>
|
|
|
<view class="lineCont">
|
|
|
- <textarea class="lineConttextarea" placeholder="请输入" name="" id=""></textarea>
|
|
|
+ <textarea v-model="comment" class="lineConttextarea" placeholder="请输入" name="" id=""></textarea>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="line" style="border: none;">
|
|
|
<view class="lineTitle">上传图片</view>
|
|
|
<view class="lineCont lineImgBox">
|
|
|
<image class="lineImg" src="/static/img/noimg.png" mode=""></image>
|
|
|
- <image class="lineImg" src="/static/img/scimg.png" mode=""></image>
|
|
|
+ <image @click="uploadImg" class="lineImg" src="/static/img/scimg.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
<view class="btnBox">
|
|
|
- <view class="btn">提交</view>
|
|
|
+ <view class="btn" v-if="optdata.type==1" @click="saveVIN">提交</view>
|
|
|
+ <view class="btn" v-if="optdata.type==2" @click="SaveMatching">提交</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -48,18 +50,118 @@
|
|
|
return {
|
|
|
iStatusBarHeight:'',
|
|
|
optdata:'',
|
|
|
+ jcData:'',
|
|
|
+ comment:'',
|
|
|
+ imgs:'',
|
|
|
+ imgArr:[],
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
|
+ this.jcData= uni.getStorageSync("jcData")
|
|
|
console.log(opt)
|
|
|
this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
|
this.optdata=opt;
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
+ saveVIN(){
|
|
|
+ uni.showLoading({ title: '加载中'});
|
|
|
+ this.$http3('errcheckapi/saveVIN', {
|
|
|
+ carId:this.jcData.id,
|
|
|
+ carmodel:this.jcData.value,
|
|
|
+ comment:this.comment,
|
|
|
+ imgs:this.imgs,
|
|
|
+ vin:this.jcData.vin
|
|
|
+ },'POST').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if(res.code==0){
|
|
|
+ uni.showToast({
|
|
|
+ title: '操作成功',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ SaveMatching(){
|
|
|
+ uni.showLoading({ title: '加载中'});
|
|
|
+ this.$http3('errcheckapi/saveVIN', {
|
|
|
+ goods:this.jcData.goods,
|
|
|
+ carmodel:this.jcData.value,
|
|
|
+ comment:this.comment,
|
|
|
+ imgs:this.imgs,
|
|
|
+ vin:this.jcData.vin,
|
|
|
+ carGroupId:this.jcData.carGroupId,
|
|
|
+ partId:this.jcData.partId
|
|
|
+ },'POST').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ uploadImg() {
|
|
|
+
|
|
|
+ var that = this;
|
|
|
+ var length = this.imgArr.length;
|
|
|
+ var num = 9;
|
|
|
+ if (length > 8) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '最多上传9张',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ uni.chooseImage({
|
|
|
+ sourceType: ['album', 'camera'],
|
|
|
+ count: num - length,
|
|
|
+ sizeType:['compressed'],
|
|
|
+ success: (chooseImageRes) => {
|
|
|
+ const tempFilePaths = chooseImageRes.tempFilePaths;
|
|
|
+ console.log(tempFilePaths)
|
|
|
+ tempFilePaths.forEach(v => {
|
|
|
+ console.log(that.$baseURL + '/search?action=uploadapi/uploadImgBatch');
|
|
|
+ uni.uploadFile({
|
|
|
+ //url: that.$baseURL + '/search?action=uploadapi/uploadImgBatch',
|
|
|
+ url:'http://openapi.db.66km.cn/uploadapi/uploadImgBatch?timestamp='+Date.now(),
|
|
|
+
|
|
|
+ //url:'http://api.dms.66km.com.cn/tuhuUploadFile',
|
|
|
+ filePath: v,
|
|
|
+ name: 'file',
|
|
|
+ formData: {
|
|
|
+ 'user': 'test'
|
|
|
+ },
|
|
|
+ success: (uploadFileRes) => {
|
|
|
+ var res=JSON.parse(uploadFileRes.data)
|
|
|
+ if(res.code==0){
|
|
|
+ console.log(JSON.parse(uploadFileRes.data).data);
|
|
|
+ that.imgArr = that.imgArr.concat(JSON.parse(
|
|
|
+ uploadFileRes.data).data);
|
|
|
+ console.log('imgArr--',that.imgArr);
|
|
|
+ }else{
|
|
|
+ console.log(res)
|
|
|
+ uni.showToast({
|
|
|
+ title: res.msg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ fail(err) {
|
|
|
+ uni.showToast({
|
|
|
+ title: err.msg,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|