|
@@ -14,7 +14,10 @@ var addlogistics = new Vue({
|
|
|
recordId:'',
|
|
|
sn:'',
|
|
|
fileList:[],
|
|
|
- imageList:[]
|
|
|
+ imageList:[
|
|
|
+ 'https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1194131577,2954769920&fm=26&gp=0.jpg',
|
|
|
+ 'https://dss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1194131577,2954769920&fm=26&gp=0.jpg'
|
|
|
+ ]
|
|
|
}
|
|
|
]
|
|
|
},
|
|
@@ -55,6 +58,10 @@ var addlogistics = new Vue({
|
|
|
editButtonConfim:function(){//确定添加商品资质信息
|
|
|
var _this = this;
|
|
|
var params = [];
|
|
|
+ var isRecordId = false;
|
|
|
+ var isSnCode = false;
|
|
|
+ var isFileList = false;
|
|
|
+ var isImageList = false;
|
|
|
_this.qualificationsList.forEach(function(el,index){
|
|
|
var obj = {
|
|
|
recordId : el.recordId,
|
|
@@ -64,21 +71,43 @@ var addlogistics = new Vue({
|
|
|
};
|
|
|
params.push(obj)
|
|
|
});
|
|
|
+ if(isRecordId){
|
|
|
+ CAIMEI.dialog('请选择商品');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(isSnCode){
|
|
|
+ CAIMEI.dialog('请输入商品SN码');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(isFileList && isImageList){
|
|
|
+ CAIMEI.dialog('请上传商品资质文件');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log('params========>',params)
|
|
|
SupplierApi.GetSupplierQualificationUpdata({ params:JSON.stringify(params) },function(response){
|
|
|
if(response.code == 0 ){
|
|
|
CAIMEI.dialog('保存资质成功');
|
|
|
+ setTimeout(function(){
|
|
|
+ window.location.href = '/supplier/order/delivery_record.html?shopOrderID='+_this.shopOrderId;
|
|
|
+ },2000);
|
|
|
}else{
|
|
|
CAIMEI.Alert(response.msg, '确定', false);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ hanldSnCodeChecked: function(e){//校验SN码格式错误
|
|
|
+ if(!this.$reg.isNoChinese(e.detail.value)){
|
|
|
+ this.$util.msg('SN码格式错误',2000);
|
|
|
+ return
|
|
|
+ }
|
|
|
+ },
|
|
|
showViewerImageFn: function(index,imageIndex ){//预览图片
|
|
|
var _this = this;
|
|
|
var DomEven = '#listViewImage'+index+''+imageIndex;
|
|
|
var ViewerDom = document.querySelector(DomEven);
|
|
|
_this.viewer = new Viewer(ViewerDom, {url:'data-image'});
|
|
|
},
|
|
|
- showGoodSelect:function(){
|
|
|
+ showGoodSelect:function(){//显示选择商品下拉框
|
|
|
var _this = this;
|
|
|
_this.selectGoods = !_this.selectGoods;
|
|
|
},
|