|
@@ -20,23 +20,23 @@ var releaseContainer = new Vue({
|
|
|
brandAssociationList:[],//品牌联想
|
|
|
isNoneBrand:false,
|
|
|
releaseParams:{
|
|
|
- userID:0,
|
|
|
- shopID:0,
|
|
|
+ userId:0,
|
|
|
+ shopId:0,
|
|
|
name:'', //商品名称
|
|
|
aliasName:'',//内部商品名称
|
|
|
- bigTypeID:'',
|
|
|
- smallTypeID:'',
|
|
|
- tinyTypeID:'',//三级分类ID
|
|
|
- brandID:'',//品牌ID
|
|
|
+ bigTypeId:'',
|
|
|
+ smallTypeId:'',
|
|
|
+ tinyTypeId:'',//三级分类ID
|
|
|
+ brandId:'',//品牌ID
|
|
|
tags:'',//商品标签
|
|
|
unit:'',//包装规格
|
|
|
productCode:'',//商品编码
|
|
|
productType:'',//商品类型,
|
|
|
machineType:'',//医疗器械类型
|
|
|
searchKey:'',//搜索关键词
|
|
|
- qualificationImg:"",//器械资质
|
|
|
+ qualificationImg:"https://img.caimei365.com/group1/M00/03/E6/Cmis21_8EgmAPFAcAAFgNbV6g2U552.jpg",//器械资质
|
|
|
normalPrice:'',//市场价
|
|
|
- price1:'',//售价
|
|
|
+ price:'',//售价
|
|
|
costPrice:'',//结算价
|
|
|
includedTax:1,//是否含税
|
|
|
invoiceType:1,//发票类型
|
|
@@ -46,7 +46,7 @@ var releaseContainer = new Vue({
|
|
|
step:1,//购买数量
|
|
|
// byFlag:0,//运费
|
|
|
allAreaFlag:1,//销售区域
|
|
|
- provinceIDs:0,//指定区域
|
|
|
+ provinceIds:0,//指定区域
|
|
|
detailInfo:'',//商品详情信息
|
|
|
orderInfo :'',//订购方案
|
|
|
serviceInfo:'',//服务详情
|
|
@@ -99,7 +99,7 @@ var releaseContainer = new Vue({
|
|
|
],
|
|
|
productDetailInfoID:null,
|
|
|
ProvinceList:[],
|
|
|
- GoodsImagesList:[],
|
|
|
+ GoodsImagesList:['https://img.caimei365.com/group1/M00/03/E6/Cmis21_8EgmAPFAcAAFgNbV6g2U552.jpg','https://img.caimei365.com/group1/M00/03/E6/Cmis21_8EgmAPFAcAAFgNbV6g2U552.jpg'],
|
|
|
isProvince:false,
|
|
|
provinceIns:0,
|
|
|
oldNum:0,
|
|
@@ -139,7 +139,7 @@ var releaseContainer = new Vue({
|
|
|
getclass:function(val){
|
|
|
this.selectText.bigTypeID='请选择一级分类';
|
|
|
this.selectText.smallTypeID = '请选择二级分类';
|
|
|
- this.releaseParams.bigTypeID ='';
|
|
|
+ this.releaseParams.bigTypeId ='';
|
|
|
this.classificationTwoList=[];
|
|
|
this.classificationThreeList =[];
|
|
|
this.GetFistClassFn(val);
|
|
@@ -150,8 +150,7 @@ var releaseContainer = new Vue({
|
|
|
if(response.code == 0){
|
|
|
console.log(response);
|
|
|
var data = response.data;
|
|
|
- _this.releaseParams.tinyTypeID = data.tinyTypeID;
|
|
|
- _this.releaseParams.brandID = data.brandID;
|
|
|
+ _this.releaseParams.brandId = data.brandId;
|
|
|
_this.releaseParams.name = data.name;
|
|
|
_this.releaseParams.aliasName = data.aliasName;
|
|
|
_this.releaseParams.productType = data.productType;
|
|
@@ -160,10 +159,10 @@ var releaseContainer = new Vue({
|
|
|
_this.releaseParams.unit = data.unit;
|
|
|
_this.releaseParams.productCode = data.productCode;
|
|
|
_this.releaseParams.normalPrice = data.normalPrice;
|
|
|
- _this.releaseParams.price1 = data.price1;
|
|
|
+ _this.releaseParams.price = data.price;
|
|
|
_this.releaseParams.includedTax = data.includedTax == '' ? 1 : data.includedTax;
|
|
|
_this.releaseParams.invoiceType = data.invoiceType;
|
|
|
- _this.releaseParams.taxPoint = data.taxPoint;
|
|
|
+ _this.releaseParams.taxPoint = data.supplierTaxPoint;
|
|
|
_this.releaseParams.costPrice = data.costPrice;
|
|
|
_this.releaseParams.minBuyNumber = data.minBuyNumber;
|
|
|
_this.releaseParams.stock = data.stock;
|
|
@@ -180,9 +179,9 @@ var releaseContainer = new Vue({
|
|
|
_this.selectText.bigTypeID = data.bigTypeName;
|
|
|
_this.selectText.smallTypeID = data.smallTypeName;
|
|
|
_this.selectText.tinyTypeID = data.tinyTypeName;
|
|
|
- _this.releaseParams.bigTypeID = data.bigTypeID;
|
|
|
- _this.releaseParams.smallTypeID =data.smallTypeID;
|
|
|
- _this.releaseParams.tinyTypeID =data.tinyTypeID;
|
|
|
+ _this.releaseParams.bigTypeId = data.bigTypeId;
|
|
|
+ _this.releaseParams.smallTypeId =data.smallTypeId;
|
|
|
+ _this.releaseParams.tinyTypeId =data.tinyTypeId;
|
|
|
_this.releaseParams.firstClassifyName = data.bigTypeName;
|
|
|
_this.releaseParams.twoClassifyName = data.smallTypeName;
|
|
|
_this.releaseParams.threeClassifyName = data.tinyTypeName;
|
|
@@ -216,26 +215,26 @@ var releaseContainer = new Vue({
|
|
|
},
|
|
|
EchoProductFn : function(type) {
|
|
|
switch (type) {
|
|
|
- case '0' && null:
|
|
|
+ case 0 && null:
|
|
|
this.selectText.goodsType = '其他';
|
|
|
break;
|
|
|
- case '1':
|
|
|
+ case 1:
|
|
|
this.selectText.goodsType = '妆字号';
|
|
|
break;
|
|
|
- case '2':
|
|
|
+ case 2:
|
|
|
this.selectText.goodsType = '械字号';
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
EchoMachineTypeFn : function(type) {
|
|
|
switch (type) {
|
|
|
- case '1' && null:
|
|
|
+ case 1 && null:
|
|
|
this.selectText.apparatusType = '一类医疗器械';
|
|
|
break;
|
|
|
- case '2':
|
|
|
+ case 2:
|
|
|
this.selectText.apparatusType = '二类医疗器械';
|
|
|
break;
|
|
|
- case '3':
|
|
|
+ case 3:
|
|
|
this.selectText.apparatusType = '三类医疗器械';
|
|
|
break;
|
|
|
}
|
|
@@ -281,8 +280,7 @@ var releaseContainer = new Vue({
|
|
|
},
|
|
|
SelectChangeApparatusFn: function(option){//选择器械类型
|
|
|
var _this = this;
|
|
|
- _this.releaseParams.machineType = option.value;
|
|
|
- console.log( _this.releaseParams.machineType)
|
|
|
+ _this.releaseParams.machineType = Number(option.value);
|
|
|
_this.selectText.apparatusType = option.name;
|
|
|
_this.isSelectActive = 0;
|
|
|
_this.vShow_GoodsType = false;
|
|
@@ -291,7 +289,7 @@ var releaseContainer = new Vue({
|
|
|
var _this = this;
|
|
|
var name = e.target.value;
|
|
|
if (name != ''){
|
|
|
- SupplierApi.GetBrandAssociation({userId: _this.releaseParams.userID,name:name},function(response){
|
|
|
+ SupplierApi.GetBrandAssociation({userId: _this.releaseParams.userId,name:name},function(response){
|
|
|
if(response.code ==0){
|
|
|
if(response.data&&response.data.length>0){
|
|
|
_this.brandAssociationList = response.data;
|
|
@@ -314,9 +312,9 @@ var releaseContainer = new Vue({
|
|
|
SupplierApi.CheckSupplierBrandDetection({name:_this.releaseParams.brandName},function(response){
|
|
|
if(response.code ==0){
|
|
|
CAIMEI.dialog('您的品牌可以使用~');
|
|
|
- _this.releaseParams.brandID = response.data.id;
|
|
|
+ _this.releaseParams.brandId = response.data.id;
|
|
|
}else{
|
|
|
- _this.releaseParams.brandID = '';
|
|
|
+ _this.releaseParams.brandId = '';
|
|
|
CAIMEI.Modal('您输入的品牌名称暂未被采美收录,请检查品牌名称是否输入正确或者向采美提交该品牌','确定','去提交',function () {
|
|
|
setTimeout(function(){
|
|
|
_this.isAddBrand = true;
|
|
@@ -344,14 +342,14 @@ var releaseContainer = new Vue({
|
|
|
var _this = this;
|
|
|
var params = {
|
|
|
name:_this.releaseParams.brandName,
|
|
|
- userID:_this.releaseParams.userID,
|
|
|
+ userId:_this.releaseParams.userId,
|
|
|
logo:_this.brandImage,
|
|
|
description:_this.brandTextarea
|
|
|
};
|
|
|
SupplierApi.AddSupplierBrand(params,function(response){
|
|
|
if(response.code == 0){
|
|
|
CAIMEI.Alert('品牌提交成功,将在1-2个工作日内进行审核~','确定',true,function () {
|
|
|
- _this.releaseParams.brandID = response.data.id;
|
|
|
+ _this.releaseParams.brandId = response.data.id;
|
|
|
_this.isBrandAssociation = false;
|
|
|
_this.isAddBrand = false;
|
|
|
});
|
|
@@ -367,7 +365,7 @@ var releaseContainer = new Vue({
|
|
|
SelectChangeAssociationFn: function(option){//选择品牌
|
|
|
var _this = this;
|
|
|
_this.releaseParams.brandName = option.name;
|
|
|
- _this.releaseParams.brandID = option.id;
|
|
|
+ _this.releaseParams.brandId = option.id;
|
|
|
_this.isBrandAssociation = false;
|
|
|
_this.vShow_BrandID = false;
|
|
|
},
|
|
@@ -390,7 +388,7 @@ var releaseContainer = new Vue({
|
|
|
}else {
|
|
|
_this.classificationTwoList = [];
|
|
|
_this.releaseParams.twoClassifyName = '';
|
|
|
- _this.releaseParams.smallTypeID = ''
|
|
|
+ _this.releaseParams.smallTypeId = ''
|
|
|
}
|
|
|
}else{
|
|
|
CAIMEI.Alert(response.msg, '确定', false);
|
|
@@ -406,7 +404,7 @@ var releaseContainer = new Vue({
|
|
|
}else {
|
|
|
_this.releaseParams.threeClassifyName = '';
|
|
|
_this.classificationThreeList = [];
|
|
|
- _this.releaseParams.tinyTypeID = ''
|
|
|
+ _this.releaseParams.tinyTypeId = ''
|
|
|
}
|
|
|
}else{
|
|
|
CAIMEI.Alert(response.msg, '确定', false);
|
|
@@ -417,32 +415,32 @@ var releaseContainer = new Vue({
|
|
|
var _this = this;
|
|
|
_this.selectText.bigTypeID = option.name;
|
|
|
_this.releaseParams.firstClassifyName = option.name;
|
|
|
- _this.releaseParams.bigTypeID = option.bigTypeID
|
|
|
+ _this.releaseParams.bigTypeId = option.bigTypeId
|
|
|
_this.selectText.smallTypeID='请选择二级分类';
|
|
|
_this.selectText.tinyTypeID = '请选择三级分类';
|
|
|
- _this.releaseParams.smallTypeID ='';
|
|
|
- _this.releaseParams.tinyTypeID ='';
|
|
|
+ _this.releaseParams.smallTypeId ='';
|
|
|
+ _this.releaseParams.tinyTypeId ='';
|
|
|
_this.classificationTwoList=[];
|
|
|
_this.classificationThreeList =[];
|
|
|
_this.isSelectActive = 0;
|
|
|
- if(_this.releaseParams.bigTypeID!=''){
|
|
|
- _this.GetTwoClassFn(_this.releaseParams.bigTypeID);
|
|
|
+ if(_this.releaseParams.bigTypeId!=''){
|
|
|
+ _this.GetTwoClassFn(_this.releaseParams.bigTypeId);
|
|
|
}
|
|
|
},
|
|
|
ChangeClassificationTwo: function(option){//选择二级分类
|
|
|
var _this = this;
|
|
|
- if(!option.smallTypeID){_this.isSelectActive = 0; return;}
|
|
|
+ if(!option.smallTypeId){_this.isSelectActive = 0; return;}
|
|
|
_this.selectText.smallTypeID = option.name;
|
|
|
_this.selectText.tinyTypeID = '请选择三级分类';
|
|
|
- _this.releaseParams.smallTypeID = option.smallTypeID;
|
|
|
+ _this.releaseParams.smallTypeId = option.smallTypeId;
|
|
|
_this.releaseParams.twoClassifyName = option.name;
|
|
|
_this.isSelectActive = 0;
|
|
|
- _this.GetThreeClassFn(_this.releaseParams.smallTypeID);
|
|
|
+ _this.GetThreeClassFn(_this.releaseParams.smallTypeId);
|
|
|
},
|
|
|
ChangeClassificationThree: function(option){//选择三级分类
|
|
|
var _this = this;
|
|
|
- if(!option.tinyTypeID){_this.isSelectActive = 0; return;}
|
|
|
- _this.releaseParams.tinyTypeID = option.tinyTypeID;
|
|
|
+ if(!option.tinyTypeId){_this.isSelectActive = 0; return;}
|
|
|
+ _this.releaseParams.tinyTypeId = option.tinyTypeId;
|
|
|
_this.selectText.tinyTypeID = option.name;
|
|
|
_this.releaseParams.threeClassifyName = option.name;
|
|
|
_this.isSelectActive = 0;
|
|
@@ -646,6 +644,7 @@ var releaseContainer = new Vue({
|
|
|
NextStep: function(){//进入第二步
|
|
|
var _this = this;
|
|
|
var KeyString = '',TagString='';
|
|
|
+ console.log(_this.releaseParams);
|
|
|
if(_this.releaseParams.name == ''){
|
|
|
_this.vShow_Name = true;
|
|
|
_this.fromMessage = '请输入商品显示名';
|
|
@@ -673,7 +672,7 @@ var releaseContainer = new Vue({
|
|
|
},2000);
|
|
|
return;
|
|
|
}
|
|
|
- if(_this.releaseParams.bigTypeID == ''){
|
|
|
+ if(_this.releaseParams.bigTypeId == ''){
|
|
|
_this.vShow_TinyTypeID = true;
|
|
|
_this.fromMessage = '请选择商品分类';
|
|
|
_this.scrollIntoView();
|
|
@@ -683,7 +682,7 @@ var releaseContainer = new Vue({
|
|
|
return;
|
|
|
}
|
|
|
if(_this.classificationTwoList!=''&& _this.classificationTwoList!=null){
|
|
|
- if(_this.releaseParams.smallTypeID == ''){
|
|
|
+ if(_this.releaseParams.smallTypeId == ''){
|
|
|
_this.vShow_TinyTypeID = true;
|
|
|
_this.fromMessage = '请选择二级分类';
|
|
|
_this.scrollIntoView();
|
|
@@ -694,7 +693,7 @@ var releaseContainer = new Vue({
|
|
|
}
|
|
|
}
|
|
|
if(_this.classificationThreeList!='' && _this.classificationThreeList!=null){
|
|
|
- if(_this.releaseParams.tinyTypeID == ''){
|
|
|
+ if(_this.releaseParams.tinyTypeId == ''){
|
|
|
_this.vShow_TinyTypeID = true;
|
|
|
_this.fromMessage = '请选择三级分类';
|
|
|
_this.scrollIntoView();
|
|
@@ -704,7 +703,7 @@ var releaseContainer = new Vue({
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- if(_this.releaseParams.brandID == ''){
|
|
|
+ if(_this.releaseParams.brandId == ''){
|
|
|
_this.vShow_BrandID = true;
|
|
|
_this.fromMessage = '请选择商品品牌';
|
|
|
_this.scrollIntoView();
|
|
@@ -801,7 +800,7 @@ var releaseContainer = new Vue({
|
|
|
},2000);
|
|
|
return
|
|
|
}
|
|
|
- if(_this.releaseParams.price1 == ''){
|
|
|
+ if(_this.releaseParams.price == ''){
|
|
|
_this.vShow_Price1 = true;
|
|
|
_this.fromMessage = '请输入售价';
|
|
|
_this.scrollIntoView();
|
|
@@ -858,10 +857,10 @@ var releaseContainer = new Vue({
|
|
|
if(_this.releaseParams.areaFlag == '0'){
|
|
|
_this.ProvinceList.forEach(function(el){
|
|
|
if(el.isChecked){
|
|
|
- _this.releaseParams.provinceIDs+=el.provinceID+',';
|
|
|
+ _this.releaseParams.provinceIds+=el.provinceID+',';
|
|
|
}
|
|
|
});
|
|
|
- if(_this.releaseParams.provinceIDs == ''){
|
|
|
+ if(_this.releaseParams.provinceIds == ''){
|
|
|
_this.vShow_isProvince = true;
|
|
|
_this.fromMessage = '请选择指定区域';
|
|
|
setTimeout(function(){
|
|
@@ -958,7 +957,7 @@ var releaseContainer = new Vue({
|
|
|
_this.releaseParams.serviceInfo = severInfoEditor.getData();
|
|
|
if(_this.releaseType == 'edit'){
|
|
|
_this.releaseParams.productDetailInfoID = _this.productDetailInfoID;
|
|
|
- _this.releaseParams.productID = _this.productId;
|
|
|
+ _this.releaseParams.productId = _this.productId;
|
|
|
CAIMEI.returnedTarget();
|
|
|
_this.releaseParams = Object.assign(_this.releaseParams,{params:JSON.stringify(_this.params)});
|
|
|
delete _this.releaseParams.imageList;
|
|
@@ -973,7 +972,7 @@ var releaseContainer = new Vue({
|
|
|
if(response.code == 0){
|
|
|
CAIMEI.dialog('提交成功,等待审核',true,function () {
|
|
|
if(_this.releaseType == 'edit'){
|
|
|
- SupplierApi.UpdateSearchManageProduct({pid:_this.productId},function (res) {
|
|
|
+ SupplierApi.UpdateSearchManageProduct({productId:_this.productId},function (res) {
|
|
|
console.log('编辑商品更新搜索索引~~~成功');
|
|
|
})
|
|
|
}
|
|
@@ -1114,11 +1113,11 @@ var releaseContainer = new Vue({
|
|
|
var NODE_ENV_BASE_URL = 'https://spi-b.caimei365.com';
|
|
|
_this.NODE_ENV_BASE_URL = NODE_ENV_BASE_URL;
|
|
|
if(globalUserData){
|
|
|
- _this.releaseParams.userID = globalUserData.userId;
|
|
|
- _this.releaseParams.shopID = globalUserData.shopId;
|
|
|
+ _this.releaseParams.shopId = globalUserData.shopId;
|
|
|
+ _this.releaseParams.userId = globalUserData.userId;
|
|
|
_this.releaseType = CAIMEI.getUrlParam('type');
|
|
|
if( _this.releaseType == 'edit'){
|
|
|
- _this.productId = Number(CAIMEI.getUrlParam('productID'));
|
|
|
+ _this.productId = Number(CAIMEI.getUrlParam('productId'));
|
|
|
_this.GetEditReleaseProductInfo(_this.productId);
|
|
|
}
|
|
|
}
|