Commit 291791ae authored by fwz's avatar fwz

绑定挪车码选择车辆

parent 87d8363f
......@@ -60,6 +60,7 @@ export default {
uni.scanCode({
success: function (res) {
let path = res.path
console.log(path+ "123")
if (path) {
let xcxIndexPath = uni.getStorageSync('xcxIndexPath')
console.info(xcxIndexPath);
......
......@@ -21,6 +21,10 @@
<div class="view__btn view__back" @click="goBack">
返回
</div>
<div>
<u-modal :show="unbindShow" :title="unbindTitle" :content='unbindContent'
@confirm="unbind" @cancel="cancelModal" showCancelButton="true"></u-modal>
</div>
</div>
</view>
</template>
......@@ -31,6 +35,13 @@ export default {
return {
items: [],
id: '',
//解除绑定对话框
unbindShow: false,
//解除绑定对话框标题
unbindTitle: '解除绑定',
//解除绑定对话框内容
unbindContent: '确定解除绑定吗?',
//解除绑定的挪车牌
};
},
methods: {
......@@ -54,7 +65,23 @@ export default {
console.log(this.items)
}
})
}
},
openUnbindModal(){
this.unbindShow = true
},
unbind(){
let opts = { url: '/app/moveCode/edit/' + this.id, method: 'put' };
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
uni.showToast({
title: '解绑成功',
icon: "success",
});
this.getMyMoveCodeList()
}
})
this.unbindShow = false
},
},
onLoad(option) {
this.id = option.id
......
......@@ -8,7 +8,7 @@
<div class="contentMoveCar">
<div class="car_item__one">
<div class="item__content">
{{moveCode}}
{{moveCode}}
</div>
</div>
<div class="car_item__three">
......@@ -23,7 +23,7 @@
</div>
<div class="car__num__self">
<div class="car__num">车牌号:</div>
<car-number class="car__input" v-model="moveCodeInfo.carNo"></car-number>
<car-number class="car__input" v-model="model1.carInfo.carNo"></car-number>
</div>
<active-form :formDate.sync="formData"></active-form>
</div>
......@@ -169,25 +169,23 @@ export default {
this.http.httpTokenRequest(opts, {}).then(res => {
if (res.data.code == 200) {
this.model1.carInfo = res.data.data
this.formData.forEach(e => {
if (e.label == '品牌:') {
e.rules.value = this.model1.carInfo.brand
} else if (e.label == '车型:') {
e.rules.value = this.model1.carInfo.carModel
}
})
console.log(this.formData)
}
})
this.formData.forEach(e => {
if (e.label == '车牌号') {
e.rules.value = this.model1.carInfo.carNo
} else if (e.label == '品牌') {
e.rules.value = this.model1.carInfo.brand
} else if (e.label == '车型') {
e.rules.value = this.model1.carInfo.carModel
}
})
console.log(this.formData)
}
},
},
onLoad(option) {
this.moveCode = option.moveCode
this.moveCode = option.moveCode
},
onShow: function () {
onShow:function(){
this.getCarInfo()
//console.log( this.$store.state.selectedCar);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment