|
|
|
@ -38,7 +38,7 @@ |
|
|
|
|
lower-threshold="50"> |
|
|
|
|
|
|
|
|
|
<view class="listBox"> |
|
|
|
|
<view class="photoBox" v-for="(item,index) in temList" :key="index" @click="checkHave(item)"> |
|
|
|
|
<view class="photoBox" v-for="(item,index) in temList" :key="index" @click="checkHave(item,item.ilk)" v-if="item.ilk != 2"> |
|
|
|
|
<view class="photoTop"> |
|
|
|
|
<view class="topLeft"> |
|
|
|
|
<image :src="item.icon" mode="widthFix" @error="specsErr(index)"></image> |
|
|
|
@ -96,8 +96,8 @@ |
|
|
|
|
<u-input |
|
|
|
|
placeholder="宽" |
|
|
|
|
border="surround" |
|
|
|
|
v-model="FormData.w_h_px.w" |
|
|
|
|
@change="change" |
|
|
|
|
type="number" |
|
|
|
|
v-model="FormData.w" |
|
|
|
|
></u-input> |
|
|
|
|
</view> |
|
|
|
|
<view class="item3">x</view> |
|
|
|
@ -105,8 +105,8 @@ |
|
|
|
|
<u-input |
|
|
|
|
placeholder="高" |
|
|
|
|
border="surround" |
|
|
|
|
v-model="FormData.w_h_px.h" |
|
|
|
|
@change="change" |
|
|
|
|
type="number" |
|
|
|
|
v-model="FormData.h" |
|
|
|
|
></u-input> |
|
|
|
|
</view> |
|
|
|
|
<view class="item5">PX</view> |
|
|
|
@ -117,8 +117,8 @@ |
|
|
|
|
<u-input |
|
|
|
|
placeholder="最小" |
|
|
|
|
border="surround" |
|
|
|
|
v-model="value" |
|
|
|
|
@change="change" |
|
|
|
|
type="number" |
|
|
|
|
v-model="FormData.min" |
|
|
|
|
></u-input> |
|
|
|
|
</view> |
|
|
|
|
<view class="item3">-</view> |
|
|
|
@ -126,8 +126,8 @@ |
|
|
|
|
<u-input |
|
|
|
|
placeholder="最大" |
|
|
|
|
border="surround" |
|
|
|
|
v-model="value" |
|
|
|
|
@change="change" |
|
|
|
|
type="number" |
|
|
|
|
v-model="FormData.max" |
|
|
|
|
></u-input> |
|
|
|
|
</view> |
|
|
|
|
<view class="item5">KB</view> |
|
|
|
@ -252,17 +252,16 @@ |
|
|
|
|
|
|
|
|
|
//传值 |
|
|
|
|
FormData:{ |
|
|
|
|
ilk:1, |
|
|
|
|
specs_id:0, //证件照合成规格id |
|
|
|
|
portrait_id:0, //用户面部形象id |
|
|
|
|
template_id:0,//证件照合成模版id |
|
|
|
|
w_h_px:{ |
|
|
|
|
w:0, |
|
|
|
|
h:0, |
|
|
|
|
}, |
|
|
|
|
kb:{ |
|
|
|
|
min:0, |
|
|
|
|
max:0, |
|
|
|
|
}, |
|
|
|
|
w:'', |
|
|
|
|
h:'', |
|
|
|
|
|
|
|
|
|
min:'', |
|
|
|
|
max:'', |
|
|
|
|
|
|
|
|
|
image_suffix:0, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
@ -427,11 +426,12 @@ |
|
|
|
|
//自定义 确认 |
|
|
|
|
submit(key){ |
|
|
|
|
var _this =this; |
|
|
|
|
_this.close(key); |
|
|
|
|
|
|
|
|
|
switch(key) |
|
|
|
|
{ |
|
|
|
|
//显示提示信息 跳转到创建面部档案 |
|
|
|
|
case 'tips_show': |
|
|
|
|
_this.close(key); |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url:'/pagesA/merge/face_1' |
|
|
|
|
}); |
|
|
|
@ -439,13 +439,39 @@ |
|
|
|
|
//选择面部档案 跳转到选择模板信息 |
|
|
|
|
case 'select_show': |
|
|
|
|
_this.FormData.portrait_id = _this.selectList[_this.selectIndex].id; |
|
|
|
|
_this.close(key); |
|
|
|
|
var FormData = _this.FormData; |
|
|
|
|
console.log(FormData); |
|
|
|
|
var str = '?specs_id='+FormData.specs_id+'&portrait_id='+FormData.portrait_id+'&ilk='+FormData.ilk; |
|
|
|
|
if(FormData.ilk == 3) |
|
|
|
|
{ |
|
|
|
|
str += '&w='+Number(FormData.w)+'&h='+Number(FormData.h)+'&min='+Number(FormData.min)+'&max='+Number(FormData.max); |
|
|
|
|
} |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url:'/pagesA/merge/idcard' |
|
|
|
|
url:'/pagesA/merge/idcard'+str, |
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
//自定义尺寸确认操作 |
|
|
|
|
case 'custom_show': |
|
|
|
|
|
|
|
|
|
var FormData = _this.FormData; |
|
|
|
|
|
|
|
|
|
if(!_this.$com.check(FormData.w,'digits') || !_this.$com.check(FormData.h,'digits')) |
|
|
|
|
{ |
|
|
|
|
_this.$com.showError('宽/高必须为整数'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if(!_this.$com.check(FormData.min,'digits') || !_this.$com.check(FormData.max,'digits')) |
|
|
|
|
{ |
|
|
|
|
_this.$com.showError('最小/最大必须为整数'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if(Number(FormData.min) >= Number(FormData.max)) |
|
|
|
|
{ |
|
|
|
|
_this.$com.showError('填写的最小值不能大于最大值'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
_this.close(key); |
|
|
|
|
_this.getPortraitList(); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -453,34 +479,15 @@ |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//判断选择 |
|
|
|
|
checkHave(item){ |
|
|
|
|
checkHave(item,ilk){ |
|
|
|
|
var _this = this; |
|
|
|
|
_this.FormData.ilk = ilk; //区分正常 还是 自定义 |
|
|
|
|
_this.FormData.specs_id = item.id; |
|
|
|
|
if(!(item.w_h_mm.w == 0 && item.w_h_mm.h == 0 && item.w_h_px.w == 0 && item.w_h_px.h == 0)) |
|
|
|
|
if(ilk == 1 || ilk == 2) //正常的 && 结婚 |
|
|
|
|
{ |
|
|
|
|
var post = {}; |
|
|
|
|
_this.$api.get('api/portrait/list', post, function(res) { |
|
|
|
|
|
|
|
|
|
var d = res; |
|
|
|
|
console.log(d); |
|
|
|
|
if(d.length == 0) |
|
|
|
|
{ |
|
|
|
|
_this.tips_show = true; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
var selectList = d; |
|
|
|
|
selectList.forEach((item, index) => { |
|
|
|
|
selectList[index].model_image = _this.$api.ossurl(item.model_image); |
|
|
|
|
selectList[index].model_image_thumbnail = _this.$api.ossurl(item.model_image_thumbnail); |
|
|
|
|
}); |
|
|
|
|
_this.selectList = selectList; |
|
|
|
|
_this.selectIndex = 0; |
|
|
|
|
_this.select_show = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
_this.getPortraitList(); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
else //自定义 |
|
|
|
|
{ |
|
|
|
|
_this.showEdit(item); |
|
|
|
|
} |
|
|
|
@ -490,6 +497,31 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
//获取面部档案 |
|
|
|
|
getPortraitList(){ |
|
|
|
|
var _this =this; |
|
|
|
|
var post = {}; |
|
|
|
|
_this.$api.get('api/portrait/list', post, function(res) { |
|
|
|
|
|
|
|
|
|
var d = res; |
|
|
|
|
console.log(d); |
|
|
|
|
if(d.length == 0) |
|
|
|
|
{ |
|
|
|
|
_this.tips_show = true; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
var selectList = d; |
|
|
|
|
selectList.forEach((item, index) => { |
|
|
|
|
selectList[index].model_image = _this.$api.ossurl(item.model_image); |
|
|
|
|
selectList[index].model_image_thumbnail = _this.$api.ossurl(item.model_image_thumbnail); |
|
|
|
|
}); |
|
|
|
|
_this.selectList = selectList; |
|
|
|
|
_this.selectIndex = 0; |
|
|
|
|
_this.select_show = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
//选择面部档案 |
|
|
|
|
selectPortrait(index) |
|
|
|
|