|
@@ -43,7 +43,7 @@
|
|
<!-- 产品品牌 -->
|
|
<!-- 产品品牌 -->
|
|
<productBrand :openModal="brandModal" :itemSn="form.productBrandSn" @choose="brandChoose" @clean="brandClean" @close="brandModal=false" />
|
|
<productBrand :openModal="brandModal" :itemSn="form.productBrandSn" @choose="brandChoose" @clean="brandClean" @close="brandModal=false" />
|
|
<!-- 产品分类 -->
|
|
<!-- 产品分类 -->
|
|
- <productType :openModal="showTypeModal" :nowData="nowData" @choose="typeChoose" @clean="typeClean" @close="showTypeModal=false" />
|
|
|
|
|
|
+ <productType :openModal="showTypeModal" :nowData="nowData" @choose="typeChoose" @close="showTypeModal=false" />
|
|
<!-- 选择收款方式 -->
|
|
<!-- 选择收款方式 -->
|
|
<u-picker v-model="warehouseModal" @confirm="warehouseChange" :range="warehouseList" range-key="name" mode="selector"></u-picker>
|
|
<u-picker v-model="warehouseModal" @confirm="warehouseChange" :range="warehouseList" range-key="name" mode="selector"></u-picker>
|
|
</view>
|
|
</view>
|
|
@@ -95,18 +95,14 @@
|
|
brandModal: false,
|
|
brandModal: false,
|
|
brandName: '',
|
|
brandName: '',
|
|
showTypeModal: false,
|
|
showTypeModal: false,
|
|
- nowData: {
|
|
|
|
- data: [],
|
|
|
|
- indArr: [],
|
|
|
|
- nowInd: 0
|
|
|
|
- },
|
|
|
|
|
|
+ nowData: [],
|
|
action: baseUrl + 'vinIdentify/ocr',
|
|
action: baseUrl + 'vinIdentify/ocr',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
productTypeNameArr: function() {
|
|
productTypeNameArr: function() {
|
|
let str = ''
|
|
let str = ''
|
|
- this.nowData.data.map(item => {
|
|
|
|
|
|
+ this.nowData.map(item => {
|
|
str += item.productTypeName+' / '
|
|
str += item.productTypeName+' / '
|
|
})
|
|
})
|
|
return str ? str.substr(0, str.length-3) : ''
|
|
return str ? str.substr(0, str.length-3) : ''
|
|
@@ -131,15 +127,7 @@
|
|
this.form.cost = this.defaultParams && this.defaultParams.cost || false
|
|
this.form.cost = this.defaultParams && this.defaultParams.cost || false
|
|
this.form.cityPrice = this.defaultParams && this.defaultParams.cityPrice || false
|
|
this.form.cityPrice = this.defaultParams && this.defaultParams.cityPrice || false
|
|
this.brandName = this.defaultParams && this.defaultParams.brandName || ''
|
|
this.brandName = this.defaultParams && this.defaultParams.brandName || ''
|
|
- if(this.defaultParams && this.defaultParams.nowData){
|
|
|
|
- this.nowData = this.defaultParams.nowData
|
|
|
|
- }else{
|
|
|
|
- this.nowData = {
|
|
|
|
- data: [],
|
|
|
|
- indArr: [],
|
|
|
|
- nowInd: 0
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ this.nowData = this.defaultParams && this.defaultParams.nowData ? this.defaultParams.nowData : []
|
|
this.warehouseName = this.defaultParams && this.defaultParams.warehouseName || ''
|
|
this.warehouseName = this.defaultParams && this.defaultParams.warehouseName || ''
|
|
},
|
|
},
|
|
// 查询
|
|
// 查询
|
|
@@ -156,11 +144,7 @@
|
|
// 重置
|
|
// 重置
|
|
resetForm() {
|
|
resetForm() {
|
|
this.warehouseName = ''
|
|
this.warehouseName = ''
|
|
- this.nowData = {
|
|
|
|
- data: [],
|
|
|
|
- indArr: [],
|
|
|
|
- nowInd: 0
|
|
|
|
- }
|
|
|
|
|
|
+ this.nowData = []
|
|
this.$refs.uForm.resetFields()
|
|
this.$refs.uForm.resetFields()
|
|
this.$emit('refresh', {})
|
|
this.$emit('refresh', {})
|
|
this.isShow = false
|
|
this.isShow = false
|
|
@@ -168,7 +152,6 @@
|
|
this.typeClean()
|
|
this.typeClean()
|
|
},
|
|
},
|
|
uploadSuccess(res){
|
|
uploadSuccess(res){
|
|
- console.log(res)
|
|
|
|
if(res.status == 200){
|
|
if(res.status == 200){
|
|
this.form.vinCode = res.data
|
|
this.form.vinCode = res.data
|
|
}else{
|
|
}else{
|
|
@@ -187,22 +170,18 @@
|
|
},
|
|
},
|
|
// 选择分类
|
|
// 选择分类
|
|
typeChoose(obj){
|
|
typeChoose(obj){
|
|
- this.nowData = {
|
|
|
|
- data: obj.data,
|
|
|
|
- indArr: obj.indArr,
|
|
|
|
- nowInd: obj.nowInd
|
|
|
|
|
|
+ if(obj){
|
|
|
|
+ this.nowData = obj
|
|
|
|
+ this.form.productTypeSn1 = obj[0].productTypeSn
|
|
|
|
+ this.form.productTypeSn2 = obj[1].productTypeSn
|
|
|
|
+ this.form.productTypeSn3 = obj[2].productTypeSn
|
|
|
|
+ }else{
|
|
|
|
+ this.typeClean()
|
|
}
|
|
}
|
|
- this.form.productTypeSn1 = this.nowData.data[0]&&this.nowData.data[0].productTypeSn ? this.nowData.data[0].productTypeSn : undefined
|
|
|
|
- this.form.productTypeSn2 = this.nowData.data[1]&&this.nowData.data[1].productTypeSn ? this.nowData.data[1].productTypeSn : undefined
|
|
|
|
- this.form.productTypeSn3 = this.nowData.data[2]&&this.nowData.data[2].productTypeSn ? this.nowData.data[2].productTypeSn : undefined
|
|
|
|
},
|
|
},
|
|
// 清空分类
|
|
// 清空分类
|
|
typeClean(){
|
|
typeClean(){
|
|
- this.nowData = {
|
|
|
|
- data: [],
|
|
|
|
- indArr: [],
|
|
|
|
- nowInd: 0
|
|
|
|
- }
|
|
|
|
|
|
+ this.nowData = []
|
|
this.form.productTypeSn1 = undefined
|
|
this.form.productTypeSn1 = undefined
|
|
this.form.productTypeSn2 = undefined
|
|
this.form.productTypeSn2 = undefined
|
|
this.form.productTypeSn3 = undefined
|
|
this.form.productTypeSn3 = undefined
|