release.js 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194
  1. /**
  2. * Created by ZHJY on 2020/9/17.
  3. */
  4. ;
  5. $('.navLayout').find('.navList').removeClass("on").find('.con').hide().find('a').removeClass("on");
  6. $('.navLayout').find('.navList').eq(1).addClass("on").find('.con').show().find('a').eq(2).addClass("on");
  7. var releaseContainer = new Vue({
  8. el:"#releaseContainer",
  9. data: {
  10. NODE_ENV_BASE_URL:'',
  11. releaseType:'',
  12. productId:'',
  13. activeNum:0,
  14. isSelectActive:0,
  15. isRequest:true,
  16. isAddBrand:false,//控制提交品牌弹窗
  17. tagsText:'',//标签输入框
  18. brandImage:'',//品牌LOGO
  19. brandTextarea:'',//品牌描述
  20. brandAssociationList:[],//品牌联想
  21. isNoneBrand:false,
  22. releaseParams:{
  23. userId:0,
  24. shopId:0,
  25. name:'', //商品名称
  26. aliasName:'',//内部商品名称
  27. bigTypeId:'',
  28. smallTypeId:'',
  29. tinyTypeId:'',//三级分类ID
  30. brandId:'',//品牌ID
  31. tags:'',//商品标签
  32. unit:'',//包装规格
  33. productCode:'',//商品编码
  34. productType:'',//商品类型,
  35. machineType:'',//医疗器械类型
  36. searchKey:'',//搜索关键词
  37. qualificationImg:"",//器械资质
  38. normalPrice:'',//市场价
  39. price:'',//售价
  40. costPrice:'',//结算价
  41. includedTax:1,//是否含税
  42. invoiceType:1,//发票类型
  43. taxPoint:13,//税率
  44. minBuyNumber:'',//起订量
  45. stock:'',//库存
  46. step:1,//购买数量
  47. // byFlag:0,//运费
  48. allAreaFlag:1,//销售区域
  49. provinceIds:0,//指定区域
  50. detailInfo:'',//商品详情信息
  51. orderInfo :'',//订购方案
  52. serviceInfo:'',//服务详情
  53. firstClassifyName:'',
  54. twoClassifyName:'',
  55. threeClassifyName:'',
  56. brandName:'',
  57. commodityType:1,
  58. trainingMethod:0,// 线上培训方式
  59. trainingType:0,// 售价包含培训费用
  60. trainingFee:''
  61. },
  62. params:{
  63. param:[],//相关参数
  64. image:[],//商品图片
  65. },
  66. viewer:{},
  67. tagsList:[],//本地存储标签
  68. searchKeyArr:[],//本地存储关键词
  69. paramKeyList:[{paramsName:'',paramsContent:''}],//相关参数
  70. formData:new FormData(),
  71. classificationFirstList:[{name:'请选择',value:''}],
  72. classificationTwoList:[],
  73. classificationThreeList:[],
  74. keywordText:'请务必准确定义关键词,关键词会影响商品的搜索结果,建议从品牌,商品学名,商品别名,商品大类别和商品小类别5个方面考虑,每个关键词不超过16个汉字',
  75. selectText:{
  76. bigTypeID:'请选择一级分类',
  77. smallTypeID:'请选择二级分类',
  78. tinyTypeID:'请选择三级分类',
  79. goodsType:'请选择商品类型',
  80. apparatusType:'请选择器械类型',
  81. },
  82. goodsTypeList:[
  83. {name:'妆字号',value:1},
  84. {name:'械字号',value:2},
  85. {name:'其他',value:0},
  86. ],
  87. apparatusTypeList:[
  88. {name:'一类医疗器械',value:1},
  89. {name:'二类医疗器械',value:2},
  90. {name:'三类医疗器械',value:3},
  91. ],
  92. searchKeyList:[
  93. {placeholder:'建议输入品牌关键词',value:""},
  94. {placeholder:'建议输入品牌学名关键词',value:""},
  95. {placeholder:'建议输入商品别名/市场称呼关键词',value:""},
  96. {placeholder:'建议输入商品大类别关键词',value:""},
  97. {placeholder:'建议输入商品小类别关键词',value:""},
  98. ],
  99. attributeList:[
  100. {name:'产品',value:'1'},
  101. {name:'仪器',value:'2'}
  102. ],
  103. productDetailInfoId:null,
  104. ProvinceList:[],
  105. GoodsImagesList:[],
  106. isProvince:false,
  107. provinceIns:0,
  108. oldNum:0,
  109. newNum: 0,
  110. orderingMin:0,
  111. orderingMax:500,
  112. severiMin:0,
  113. severiMax:500,
  114. isTaxPonitEditPopup:false,
  115. isTaxPonitEdit:false,
  116. fromMessage:'',//提示文字
  117. isBrandAssociation:false,
  118. vShow_Name:false,
  119. vShow_AliasName:false,
  120. vShow_TinyTypeID:false,
  121. vShow_BrandID:false,
  122. vShow_GoodsType:false,
  123. vShow_QualificationImg:false,
  124. vShow_Tags:false,
  125. vShow_Unit:false,
  126. vShow_NormalPrice:false,
  127. vShow_Price1:false,
  128. vShow_includedTax:false,
  129. vShow_MinBuyNumber:false,
  130. vShow_Stock:false,
  131. vShow_isProvince:false,
  132. vShow_taxPoint:false,
  133. vShow_GoodsImages:false,
  134. vShow_detailInfoEditor:true,
  135. vShow_orderInfoEditor:true,
  136. vShow_attribute:false,
  137. vShow_trainingMethod:false,
  138. vShow_trainingType:false,
  139. },
  140. computed: {
  141. },
  142. methods: {
  143. GetEditReleaseProductInfo: function(productId){
  144. var _this = this;
  145. SupplierApi.EditReleaseProductInfo({productId:productId},function(response){
  146. if(response.code == 0){
  147. console.log(response);
  148. var data = response.data;
  149. _this.releaseParams.brandId = data.brandId;
  150. _this.releaseParams.name = data.name;
  151. _this.releaseParams.aliasName = data.aliasName;
  152. _this.releaseParams.productType = data.productType;
  153. _this.releaseParams.trainingMethod = data.trainingMethod;
  154. _this.releaseParams.trainingType = data.trainingType;
  155. _this.releaseParams.trainingFee = data.trainingFee;
  156. _this.releaseParams.machineType = data.machineType;
  157. _this.releaseParams.qualificationImg = data.qualificationImg;
  158. _this.releaseParams.unit = data.unit;
  159. _this.releaseParams.productCode = data.productCode;
  160. _this.releaseParams.normalPrice = data.normalPrice;
  161. _this.releaseParams.price = data.price;
  162. _this.releaseParams.includedTax = data.includedTax == '' ? 1 : data.includedTax;
  163. _this.releaseParams.invoiceType = data.invoiceType;
  164. _this.releaseParams.taxPoint = data.supplierTaxPoint;
  165. _this.releaseParams.costPrice = data.costPrice;
  166. _this.releaseParams.minBuyNumber = data.minBuyNumber;
  167. _this.releaseParams.stock = data.stock;
  168. _this.releaseParams.step = data.step;
  169. _this.releaseParams.byFlag = data.byFlag;
  170. _this.releaseParams.allAreaFlag = data.allAreaFlag;
  171. _this.releaseParams.detailInfo = data.productDetail.detailInfo;
  172. _this.releaseParams.serviceInfo = data.productDetail.serviceInfo;
  173. _this.releaseParams.orderInfo = data.productDetail.orderInfo;
  174. _this.productDetailInfoId = data.productDetail.productDetailInfoId;
  175. _this.tagsList = _this.setTagArray(data.tags);
  176. _this.EchoProductFn(data.productType);
  177. _this.EchoMachineTypeFn(data.machineType);
  178. _this.selectText.bigTypeID = data.bigTypeName;
  179. _this.selectText.smallTypeID = data.smallTypeName;
  180. _this.selectText.tinyTypeID = data.tinyTypeName;
  181. _this.releaseParams.bigTypeId = data.bigTypeId;
  182. _this.releaseParams.smallTypeId =data.smallTypeId;
  183. _this.releaseParams.tinyTypeId =data.tinyTypeId;
  184. _this.releaseParams.firstClassifyName = data.bigTypeName;
  185. _this.releaseParams.twoClassifyName = data.smallTypeName;
  186. _this.releaseParams.threeClassifyName = data.tinyTypeName;
  187. _this.releaseParams.commodityType =data.commodityType;
  188. _this.releaseParams.brandName = data.brandName;
  189. _this.GoodsImagesList = _this.EchoGoodsImagesListFn(data.imageList);
  190. _this.classificationTwoList = data.smallTypeName;
  191. _this.classificationThreeList = data.tinyTypeName;
  192. if(data.commodityType !=null||data.commodityType != ''){
  193. _this.releaseParams.commodityType = data.commodityType;
  194. _this.GetFistClassFn(data.commodityType);
  195. }
  196. if(_this.classificationTwoList!=''){
  197. _this.GetTwoClassFn(data.bigTypeID);
  198. }
  199. if (_this.classificationThreeList){
  200. _this.GetThreeClassFn(data.smallTypeID);
  201. }
  202. if(data.searchKey != null){
  203. _this.setSearchKeyArray(data.searchKey);
  204. }
  205. if(data.parametersList == ''){
  206. _this.paramKeyList = [{paramsName:'',paramsContent:''}];
  207. }else{
  208. _this.paramKeyList = data.parametersList;
  209. }
  210. // 下拉列表初始化
  211. setTimeout(function(){
  212. _this.ChangeClassificationFirst({bigTypeId:data.bigTypeId, name:data.bigTypeName});
  213. setTimeout(function(){
  214. _this.ChangeClassificationTwo({smallTypeId:data.smallTypeId, name:data.smallTypeName});
  215. setTimeout(function(){
  216. _this.ChangeClassificationThree({tinyTypeId:data.tinyTypeId, name:data.tinyTypeName});
  217. },500);
  218. },500);
  219. },500);
  220. }else{
  221. CAIMEI.Alert(response.msg, '确定', false);
  222. }
  223. })
  224. },
  225. getclass:function(val){
  226. this.selectText.bigTypeID='请选择一级分类';
  227. this.selectText.smallTypeID = '请选择二级分类';
  228. this.releaseParams.bigTypeId ='';
  229. this.classificationTwoList=[];
  230. this.classificationThreeList =[];
  231. this.GetFistClassFn(val);
  232. },
  233. EchoProductFn : function(type) {
  234. switch (type) {
  235. case 0 && null:
  236. this.selectText.goodsType = '其他';
  237. break;
  238. case 1:
  239. this.selectText.goodsType = '妆字号';
  240. break;
  241. case 2:
  242. this.selectText.goodsType = '械字号';
  243. break;
  244. }
  245. },
  246. EchoMachineTypeFn : function(type) {
  247. switch (type) {
  248. case 1 && null:
  249. this.selectText.apparatusType = '一类医疗器械';
  250. break;
  251. case 2:
  252. this.selectText.apparatusType = '二类医疗器械';
  253. break;
  254. case 3:
  255. this.selectText.apparatusType = '三类医疗器械';
  256. break;
  257. }
  258. },
  259. choiceTrain : function(val){
  260. var _this = this;
  261. _this.releaseParams.trainType = Number(val);
  262. },
  263. choiceTrainOutlay : function(val){
  264. var _this = this;
  265. _this.releaseParams.expensesType = Number(val);
  266. },
  267. EchoGoodsImagesListFn: function(arr){//处理商品主图回显
  268. var newArray =[];
  269. arr.forEach( function(el){ newArray.push(el.image) });
  270. return newArray;
  271. },
  272. touchmoveFn: function(){
  273. this.isSelectActive =0;
  274. },
  275. showOption: function(type){//显示option
  276. var _this = this;
  277. switch (type) {
  278. case 'first':
  279. _this.vShow_TinyTypeID = false;
  280. _this.isSelectActive=1;
  281. break;
  282. case 'two':
  283. _this.vShow_TinyTypeID = false;
  284. _this.isSelectActive=2;
  285. break;
  286. case 'three':
  287. _this.vShow_TinyTypeID = false;
  288. _this.isSelectActive=3;
  289. break;
  290. case 'type':
  291. _this.vShow_GoodsType = false;
  292. _this.isSelectActive=4;
  293. break;
  294. case 'ratus':
  295. _this.isSelectActive=5;
  296. break;
  297. }
  298. },
  299. SelectChangeTypeFn: function(option){//选择商品类型
  300. var _this = this;
  301. _this.releaseParams.productType = Number(option.value);
  302. _this.selectText.goodsType = option.name;
  303. _this.isSelectActive = 0;
  304. _this.vShow_GoodsType = false;
  305. },
  306. SelectChangeApparatusFn: function(option){//选择器械类型
  307. var _this = this;
  308. _this.releaseParams.machineType = Number(option.value);
  309. _this.selectText.apparatusType = option.name;
  310. _this.isSelectActive = 0;
  311. _this.vShow_GoodsType = false;
  312. },
  313. bindBrandAssociationFn: function(e){//品牌输入联想
  314. var _this = this;
  315. var name = e.target.value;
  316. if (name != ''){
  317. SupplierApi.GetBrandAssociation({userId: _this.releaseParams.userId,name:name},function(response){
  318. if(response.code ==0){
  319. if(response.data&&response.data.length>0){
  320. _this.brandAssociationList = response.data;
  321. _this.isBrandAssociation = true;
  322. }else{
  323. _this.brandAssociationList = [];
  324. _this.isBrandAssociation = false;
  325. }
  326. }
  327. });
  328. }else{
  329. _this.isBrandAssociation = false;
  330. }
  331. },
  332. brandAssociationFn: function(){//失去焦点判断是否存在品牌信息
  333. var _this = this;
  334. if(_this.releaseParams.brandName == ''){
  335. CAIMEI.dialog('请输入商品品牌名称');
  336. }else{
  337. SupplierApi.CheckSupplierBrandDetection({name:_this.releaseParams.brandName},function(response){
  338. if(response.code ==0){
  339. CAIMEI.dialog('您的品牌可以使用~');
  340. _this.releaseParams.brandId = response.data.id;
  341. }else{
  342. _this.releaseParams.brandId = '';
  343. CAIMEI.Modal('您输入的品牌名称暂未被采美收录,请检查品牌名称是否输入正确或者向采美提交该品牌','确定','去提交',function () {
  344. setTimeout(function(){
  345. _this.isAddBrand = true;
  346. },200);
  347. });
  348. }
  349. });
  350. }
  351. },
  352. uploadBrandImagesFn: function(){//上传品牌LOGO
  353. var _this = this;
  354. var inputDOM = _this.$refs.brandImage;
  355. var formData = new FormData();
  356. var file = inputDOM.files;
  357. formData.append('file', file[0]);
  358. SupplierApi.uploadimg(formData,function(response){
  359. _this.brandImage = response.data;
  360. });
  361. },
  362. removeBrandImageFn: function(){//删除品牌LOGO
  363. var _this = this;
  364. _this.brandImage = '';
  365. },
  366. confimAddBrandPopup: function(){//确定提交新品牌
  367. var _this = this;
  368. var params = {
  369. name:_this.releaseParams.brandName,
  370. userId:_this.releaseParams.userId,
  371. logo:_this.brandImage,
  372. description:_this.brandTextarea,
  373. source:1
  374. };
  375. SupplierApi.AddSupplierBrand(params,function(response){
  376. if(response.code == 0){
  377. CAIMEI.Alert('品牌提交成功,将在1-2个工作日内进行审核~','确定',true,function () {
  378. _this.releaseParams.brandId = response.data.id;
  379. _this.isBrandAssociation = false;
  380. _this.isAddBrand = false;
  381. });
  382. }else{
  383. CAIMEI.Alert(response.msg, '确定', false);
  384. }
  385. });
  386. },
  387. hideAddBrandPopup: function(){//取消提交新品牌
  388. var _this = this;
  389. _this.isAddBrand = false;
  390. },
  391. SelectChangeAssociationFn: function(option){//选择品牌
  392. var _this = this;
  393. _this.releaseParams.brandName = option.name;
  394. _this.releaseParams.brandId = option.id;
  395. _this.isBrandAssociation = false;
  396. _this.vShow_BrandID = false;
  397. },
  398. GetFistClassFn: function(val){//获取一级分类菜单
  399. var _this = this;
  400. PublicApi.GetFirstClassFication({typeSort:val},function (response) {
  401. if(response.code == 0){
  402. _this.classificationFirstList = response.data;
  403. }else{
  404. CAIMEI.Alert(response.msg, '确定', false);
  405. }
  406. })
  407. },
  408. GetTwoClassFn: function(value){//获取二级分类菜单
  409. var _this = this;
  410. PublicApi.GetTwoClassFication({bigTypeId:value},function (response) {
  411. if(response.code == 0){
  412. if(response.data.length>0){
  413. _this.classificationTwoList = response.data;
  414. }else {
  415. _this.classificationTwoList = [];
  416. _this.releaseParams.twoClassifyName = '';
  417. _this.releaseParams.smallTypeId = ''
  418. }
  419. }else{
  420. CAIMEI.Alert(response.msg, '确定', false);
  421. }
  422. })
  423. },
  424. GetThreeClassFn: function(value){//获取三级分类菜单
  425. var _this = this;
  426. PublicApi.GetThreeClassFication({smallTypeId:value},function (response) {
  427. if(response.code == 0){
  428. if(response.data.length>0){
  429. _this.classificationThreeList = response.data;
  430. }else {
  431. _this.releaseParams.threeClassifyName = '';
  432. _this.classificationThreeList = [];
  433. _this.releaseParams.tinyTypeId = ''
  434. }
  435. }else{
  436. CAIMEI.Alert(response.msg, '确定', false);
  437. }
  438. })
  439. },
  440. ChangeClassificationFirst: function(option){//选择一级分类
  441. var _this = this;
  442. _this.selectText.bigTypeID = option.name;
  443. _this.releaseParams.firstClassifyName = option.name;
  444. _this.releaseParams.bigTypeId = option.bigTypeId
  445. _this.selectText.smallTypeID='请选择二级分类';
  446. _this.selectText.tinyTypeID = '请选择三级分类';
  447. _this.releaseParams.smallTypeId ='';
  448. _this.releaseParams.tinyTypeId ='';
  449. _this.classificationTwoList=[];
  450. _this.classificationThreeList =[];
  451. _this.isSelectActive = 0;
  452. if(_this.releaseParams.bigTypeId!=''){
  453. _this.GetTwoClassFn(option.bigTypeId);
  454. }
  455. },
  456. ChangeClassificationTwo: function(option){//选择二级分类
  457. var _this = this;
  458. if(!option.smallTypeId){_this.isSelectActive = 0; return;}
  459. _this.selectText.smallTypeID = option.name;
  460. _this.selectText.tinyTypeID = '请选择三级分类';
  461. _this.releaseParams.smallTypeId = option.smallTypeId;
  462. _this.releaseParams.twoClassifyName = option.name;
  463. _this.isSelectActive = 0;
  464. _this.GetThreeClassFn(option.smallTypeId);
  465. },
  466. ChangeClassificationThree: function(option){//选择三级分类
  467. var _this = this;
  468. if(!option.tinyTypeId){_this.isSelectActive = 0; return;}
  469. _this.releaseParams.tinyTypeId = option.tinyTypeId;
  470. _this.selectText.tinyTypeID = option.name;
  471. _this.releaseParams.threeClassifyName = option.name;
  472. _this.isSelectActive = 0;
  473. _this.vShow_TinyTypeID = false;
  474. },
  475. addTag:function(){//添加标签
  476. var _this = this;
  477. if(_this.tagsText == ''){
  478. _this.vShow_Tags = true;
  479. _this.fromMessage = '请输入商品标签!';
  480. }else if(_this.in_array(_this.tagsText,_this.tagsList)){
  481. _this.vShow_Tags = true;
  482. _this.fromMessage = '商品标签已存在!';
  483. }else{
  484. _this.tagsList.push({"tag":_this.tagsText});
  485. _this.tagsText = '';
  486. _this.vShow_Tags = false;
  487. _this.fromMessage = '';
  488. }
  489. },
  490. removeTags:function(index){//删除标签
  491. this.tagsList.splice(index,1);
  492. },
  493. in_array:function(search,array){//判断标签是否已存在
  494. for(var i in array){
  495. if(array[i].tag==search){
  496. return true;
  497. }
  498. }
  499. return false;
  500. },
  501. uploadQualificationsFn: function(el) {//上传资质证书
  502. var _this = this;
  503. var inputDOM = _this.$refs.inputer;
  504. var file = inputDOM.files;
  505. _this.formData.append('file', file[0]);
  506. SupplierApi.uploadimg(_this.formData,function(response){
  507. _this.releaseParams.qualificationImg = response.data;
  508. _this.vShow_QualificationImg = false;
  509. });
  510. },
  511. removeQualificationsFn: function(){//删除资质图片
  512. var _this = this;
  513. _this.releaseParams.qualificationImg = '';
  514. },
  515. addParamsFn: function(){//添加参数
  516. var _this = this;
  517. if(_this.paramKeyList.length>50){return;}
  518. var obj ={paramsName:'',paramsContent:''};
  519. _this.paramKeyList.push(obj)
  520. },
  521. removeParamsFn: function(index){//删除参数
  522. var _this = this;
  523. _this.paramKeyList.splice(index,1);
  524. },
  525. radioChangeInvoiceType: function(event) {//选择发票类型
  526. var _this = this;
  527. _this.releaseParams.invoiceType= event.target.value;
  528. switch (_this.releaseParams.invoiceType) {
  529. case '1':
  530. _this.releaseParams.taxPoint = 13;
  531. _this.isTaxPonitEdit = true;
  532. break;
  533. case '2':
  534. _this.releaseParams.taxPoint = 6;
  535. _this.isTaxPonitEdit = true;
  536. break;
  537. case '3':
  538. _this.releaseParams.taxPoint = '';
  539. _this.isTaxPonitEdit = false;
  540. break;
  541. }
  542. },
  543. taxPonitEdit: function(){//修改税率
  544. this.isTaxPonitEditPopup = true;
  545. },
  546. hideTaxPonitEditPopup: function(){//取消修改税率弹窗
  547. var _this = this;
  548. if(_this.releaseParams.taxPoint == ''){
  549. _this.vShow_taxPoint = true;
  550. _this.fromMessage = '请输入税率';
  551. return
  552. }
  553. if(_this.releaseParams.taxPoint == 0){
  554. _this.vShow_taxPoint = true;
  555. _this.fromMessage = '税率不能为0';
  556. return
  557. }
  558. this.isTaxPonitEditPopup = false;
  559. },
  560. confimTaxPonitEditPopup: function(){//确定修改税率
  561. var _this = this;
  562. if(_this.releaseParams.taxPoint == ''){
  563. _this.vShow_taxPoint = true;
  564. _this.fromMessage = '请输入税率';
  565. return
  566. }
  567. if(_this.releaseParams.taxPoint == 0){
  568. _this.vShow_taxPoint = true;
  569. _this.fromMessage = '税率不能为0';
  570. return
  571. }
  572. this.isTaxPonitEditPopup = false;
  573. },
  574. radioChangeStep: function(event){//选择指定购买数量
  575. this.releaseParams.step= event.target.value;
  576. },
  577. radioChangeByFlag: function(event){//选择运费
  578. this.releaseParams.byFlag= event.target.value;
  579. },
  580. radioChangeAllAreaFlag: function(event){//选择指定区域
  581. var _this = this;
  582. _this.releaseParams.areaFlag= event.target.value;
  583. if( _this.releaseParams.areaFlag == '0'){
  584. _this.isProvince=true;
  585. _this.GetProvinceFn();
  586. }else{
  587. _this.vShow_isProvince = false;
  588. _this.isProvince=false;
  589. }
  590. },
  591. addProvinceFn: function(item){//选择指定区域
  592. item.isChecked = ! item.isChecked;
  593. },
  594. GetProvinceFn: function(){//查询指定区域
  595. var _this = this;
  596. PublicApi.GetProvince({},function(response){
  597. if(response.code == 0){
  598. var arr =[];
  599. var data = response.data;
  600. data.forEach(function(el){
  601. CAIMEI.returnedTarget();
  602. arr.push(Object.assign({},el,{ isChecked : false }))
  603. });
  604. _this.ProvinceList =arr;
  605. }else{
  606. CAIMEI.Alert(response.msg, '确定', false);
  607. }
  608. })
  609. },
  610. uploadGoodsImagesFn: function(event){//上传商品图片
  611. var _this = this;
  612. var inputDOM = _this.$refs.goodsImages;
  613. var file = inputDOM.files;
  614. var reader = new FileReader();
  615. reader.readAsDataURL(file[0]);
  616. reader.onload = function(e) {
  617. var image = new Image();
  618. image.src = e.target.result;
  619. image.onload = function() {
  620. var w = this.width;
  621. var h = this.height;
  622. if (w != h) {
  623. CAIMEI.dialog('请上传尺寸比例为1:1的图片');
  624. return false;
  625. }
  626. if (w < 750 || h < 750) {
  627. CAIMEI.dialog('请上传分辨率大于750*750的图片');
  628. return false;
  629. }
  630. _this.formData.append('file', file[0]);
  631. SupplierApi.uploadimg(_this.formData,function(response){
  632. _this.GoodsImagesList.push(response.data);
  633. event.target.value = '';
  634. });
  635. }
  636. };
  637. },
  638. showViewerImageFn: function(index ){//预览上传图片
  639. var _this = this;
  640. var DomEven = '#uploadGoodsImages'+index;
  641. var ViewerDom = document.querySelector(DomEven);
  642. _this.viewer = new Viewer(ViewerDom, {url:'data-image'});
  643. },
  644. removeGoodsImagesFn: function(index){//删除商品图片
  645. var _this = this;
  646. _this.GoodsImagesList.splice(index,1);
  647. },
  648. orderingTextConInput: function(event){//订购方案文字控制
  649. var value = event.target.value;
  650. var len = parseInt(value.length);
  651. if (len > this.orderingMax) return;
  652. this.orderingMin = len;
  653. if(this.orderingMin == 500){
  654. return;
  655. }
  656. },
  657. severiTextConInput: function(event){//服务项目文字控制
  658. var value = event.target.value;
  659. var len = parseInt(value.length);
  660. if (len > this.severiMax) return;
  661. this.severiMin = len;
  662. if(this.severiMin == 500){
  663. return;
  664. }
  665. },
  666. PrevStep: function(){//返回上一步
  667. this.activeNum--;
  668. this.scrollIntoView();
  669. },
  670. NextStep: function(){//进入第二步
  671. var _this = this;
  672. var KeyString = '',TagString='';
  673. console.log(_this.releaseParams);
  674. if(_this.releaseParams.name == ''){
  675. _this.vShow_Name = true;
  676. _this.fromMessage = '请输入商品显示名';
  677. _this.scrollIntoView();
  678. setTimeout(function(){
  679. _this.vShow_Name = false;
  680. },2000);
  681. return
  682. }
  683. if(_this.releaseParams.aliasName == ''){
  684. _this.vShow_AliasName = true;
  685. _this.fromMessage = '请输入内部商品名';
  686. _this.scrollIntoView();
  687. setTimeout(function(){
  688. _this.vShow_AliasName = false;
  689. },2000);
  690. return;
  691. }
  692. if(_this.releaseParams.commodityType == ''){
  693. _this.vShow_attribute=true;
  694. _this.fromMessage = '请选择商品属性';
  695. _this.scrollIntoView();
  696. setTimeout(function(){
  697. _this.vShow_attribute = false;
  698. },2000);
  699. return;
  700. }
  701. if(_this.releaseParams.commodityType == 2){
  702. if(_this.releaseParams.trainingMethod == 0){
  703. _this.vShow_trainingMethod=true;
  704. _this.fromMessage = '请选择培训方式';
  705. _this.scrollIntoView();
  706. setTimeout(function(){
  707. _this.vShow_trainingMethod = false;
  708. },2000);
  709. return;
  710. }
  711. if(_this.releaseParams.trainingType == 0){
  712. _this.vShow_trainingType=true;
  713. _this.fromMessage = '请选择培训费用';
  714. _this.scrollIntoView();
  715. setTimeout(function(){
  716. _this.vShow_trainingType = false;
  717. },2000);
  718. return;
  719. }
  720. if(_this.releaseParams.trainingType == 1){
  721. if(_this.releaseParams.trainingFee == ''){
  722. _this.vShow_trainingType=true;
  723. _this.fromMessage = '请填写包含食宿,交通等各项费用的培训总金额';
  724. _this.scrollIntoView();
  725. setTimeout(function(){
  726. _this.vShow_trainingType = false;
  727. },2000);
  728. return;
  729. }
  730. }
  731. }
  732. if(_this.releaseParams.bigTypeId == ''){
  733. _this.vShow_TinyTypeID = true;
  734. _this.fromMessage = '请选择商品分类';
  735. _this.scrollIntoView();
  736. setTimeout(function(){
  737. _this.vShow_TinyTypeID = false;
  738. },2000);
  739. return;
  740. }
  741. if(_this.classificationTwoList!=''&& _this.classificationTwoList!=null){
  742. if(_this.releaseParams.smallTypeId == ''){
  743. _this.vShow_TinyTypeID = true;
  744. _this.fromMessage = '请选择二级分类';
  745. _this.scrollIntoView();
  746. setTimeout(function(){
  747. _this.vShow_TinyTypeID = false;
  748. },2000);
  749. return;
  750. }
  751. }
  752. if(_this.classificationThreeList!='' && _this.classificationThreeList!=null){
  753. if(_this.releaseParams.tinyTypeId == ''){
  754. _this.vShow_TinyTypeID = true;
  755. _this.fromMessage = '请选择三级分类';
  756. _this.scrollIntoView();
  757. setTimeout(function(){
  758. _this.vShow_TinyTypeID = false;
  759. },2000);
  760. return;
  761. }
  762. }
  763. if(_this.releaseParams.brandId == ''){
  764. _this.vShow_BrandID = true;
  765. _this.fromMessage = '请选择商品品牌';
  766. _this.scrollIntoView();
  767. setTimeout(function(){
  768. _this.vShow_BrandID = false;
  769. },2000);
  770. return;
  771. }
  772. if(_this.releaseParams.productType === ""){
  773. _this.vShow_GoodsType = true;
  774. _this.fromMessage = '请选择商品类型';
  775. _this.scrollIntoView();
  776. setTimeout(function(){
  777. _this.vShow_GoodsType = false;
  778. },2000);
  779. return;
  780. }
  781. if(_this.releaseParams.productType == 2){
  782. if(_this.releaseParams.machineType == ''){
  783. _this.vShow_GoodsType = true;
  784. _this.fromMessage = '请选择器械类型';
  785. _this.scrollIntoView();
  786. setTimeout(function(){
  787. _this.vShow_GoodsType = false;
  788. },2000);
  789. return;
  790. }
  791. if(_this.releaseParams.qualificationImg == ''){
  792. _this.vShow_QualificationImg = true;
  793. _this.fromMessage = '请上传资质图片';
  794. _this.scrollIntoView();
  795. setTimeout(function(){
  796. _this.vShow_QualificationImg = false;
  797. },2000);
  798. return;
  799. }
  800. }
  801. //商品标签
  802. if(_this.tagsList =='') {
  803. _this.vShow_Tags = true;
  804. _this.fromMessage = '请添加商品标签';
  805. _this.scrollIntoView();
  806. setTimeout(function(){
  807. _this.vShow_Tags = false;
  808. },2000);
  809. return;
  810. }else{
  811. _this.tagsList.forEach(function(el){
  812. TagString += el.tag+',';
  813. });
  814. _this.releaseParams.tags = TagString.substring(0, TagString.lastIndexOf(','));
  815. }
  816. if(_this.releaseParams.unit == ''){
  817. _this.vShow_Unit = true;
  818. _this.fromMessage = '请输入包装规格';
  819. setTimeout(function(){
  820. _this.vShow_Unit = false;
  821. },2000);
  822. _this.scrollIntoView();
  823. return;
  824. }
  825. //搜索关键词
  826. if(_this.searchKeyList!=''){
  827. _this.searchKeyList.forEach(function(el){
  828. KeyString+=el.value+',';
  829. });
  830. _this.releaseParams.searchKey = KeyString.substring(0, KeyString.lastIndexOf(','));
  831. }
  832. if( _this.paramKeyList[0].paramsName == ''){
  833. _this.params.param = [];
  834. }else{
  835. _this.params.param = _this.paramKeyList;
  836. }
  837. _this.activeNum++;
  838. _this.scrollIntoView();
  839. },
  840. NextStep1: function(){//进入第三步
  841. var _this = this;
  842. if(_this.releaseParams.normalPrice == ''){
  843. _this.vShow_NormalPrice = true;
  844. _this.fromMessage = '请输入市场价';
  845. _this.scrollIntoView();
  846. setTimeout(function(){
  847. _this.vShow_NormalPrice = false;
  848. },2000);
  849. return
  850. }
  851. if(_this.releaseParams.normalPrice == 0){
  852. _this.vShow_NormalPrice = true;
  853. _this.fromMessage = '市场价不能为0';
  854. _this.scrollIntoView();
  855. setTimeout(function(){
  856. _this.vShow_NormalPrice = false;
  857. },2000);
  858. return
  859. }
  860. if(_this.releaseParams.price == ''){
  861. _this.vShow_Price1 = true;
  862. _this.fromMessage = '请输入售价';
  863. _this.scrollIntoView();
  864. setTimeout(function(){
  865. _this.vShow_Price1 = false;
  866. },2000);
  867. return;
  868. }
  869. if(_this.releaseParams.price1 == 0){
  870. _this.vShow_Price1 = true;
  871. _this.fromMessage = '售价不能为0';
  872. _this.scrollIntoView();
  873. setTimeout(function(){
  874. _this.vShow_Price1 = false;
  875. },2000);
  876. return;
  877. }
  878. if(_this.releaseParams.includedTax == 3){
  879. _this.vShow_includedTax = true;
  880. _this.fromMessage = '请选择是否含税';
  881. _this.scrollIntoView();
  882. setTimeout(function(){
  883. _this.vShow_includedTax = false;
  884. },2000);
  885. return;
  886. }
  887. if(_this.releaseParams.minBuyNumber === ''){
  888. _this.vShow_MinBuyNumber = true;
  889. _this.fromMessage = '请输入起订量';
  890. _this.scrollIntoView();
  891. setTimeout(function(){
  892. _this.vShow_MinBuyNumber = false;
  893. },2000);
  894. return;
  895. }
  896. if(_this.releaseParams.stock === ''){
  897. _this.vShow_Stock = true;
  898. _this.fromMessage = '请输入库存';
  899. _this.scrollIntoView();
  900. setTimeout(function(){
  901. _this.vShow_Stock = false;
  902. },2000);
  903. return;
  904. }
  905. if(_this.releaseParams.minBuyNumber > _this.releaseParams.stock){
  906. _this.vShow_MinBuyNumber = true;
  907. _this.fromMessage = '起订量不能大于库存';
  908. _this.scrollIntoView();
  909. setTimeout(function(){
  910. _this.vShow_MinBuyNumber = false;
  911. },2000);
  912. return;
  913. }
  914. if(_this.releaseParams.areaFlag == '0'){
  915. _this.ProvinceList.forEach(function(el){
  916. if(el.isChecked){
  917. _this.releaseParams.provinceIds+=el.provinceID+',';
  918. }
  919. });
  920. if(_this.releaseParams.provinceIds == ''){
  921. _this.vShow_isProvince = true;
  922. _this.fromMessage = '请选择指定区域';
  923. setTimeout(function(){
  924. _this.vShow_isProvince = false;
  925. },2000);
  926. return;
  927. }
  928. }
  929. _this.activeNum++;
  930. _this.scrollIntoView();
  931. if(_this.vShow_detailInfoEditor){
  932. _this.initCKeditor();
  933. }
  934. },
  935. NextStep2: function() {//点击进入第四步
  936. var _this = this;
  937. var detailInfo= detailInfoEditor.getData();
  938. _this.releaseParams.detailInfo = detailInfo;
  939. if(_this.GoodsImagesList ==''){
  940. CAIMEI.dialog('请上传商品图片');
  941. return;
  942. }
  943. if( _this.releaseParams.detailInfo ==''){
  944. CAIMEI.dialog('请填写商品详情');
  945. return;
  946. }
  947. _this.params.image = [];
  948. _this.GoodsImagesList.forEach(function(el,index){
  949. var imageObject = {};
  950. if(index == 0 ){
  951. imageObject = {productImageId:'',image:el,mainFlag:'1'};
  952. }else{
  953. imageObject = {productImageId:'',image:el,mainFlag:'0'};
  954. }
  955. _this.params.image.push(imageObject);
  956. });
  957. _this.activeNum++;
  958. _this.scrollIntoView();
  959. if(_this.vShow_orderInfoEditor){
  960. _this.initOrderCKeditor();
  961. _this.initSeverCKeditor();
  962. }
  963. },
  964. initCKeditor: function(){//富文本
  965. var _this = this;
  966. _this.vShow_detailInfoEditor = false;
  967. ClassicEditor.create(document.querySelector('#detailInfoEditor'), {
  968. ckfinder: {
  969. uploadUrl: _this.NODE_ENV_BASE_URL+'/formData/ckeditorImage'
  970. }
  971. }).then(function(editor) {
  972. window.detailInfoEditor = editor;
  973. var detailInfo= detailInfoEditor.getData();
  974. ClassicEditor.instances.WORK_INTRODUCTION.setData(detailInfo);
  975. console.log(detailInfo);
  976. }).catch(function(error){
  977. console.log(error);
  978. });
  979. },
  980. initOrderCKeditor: function(){//富文本
  981. var _this = this;
  982. _this.vShow_orderInfoEditor = false;
  983. ClassicEditor.create(document.querySelector('#orderInfoEditor'), {
  984. ckfinder: {
  985. uploadUrl: _this.NODE_ENV_BASE_URL+'/formData/ckeditorImage'
  986. }
  987. }).then(function(editor) {
  988. window.orderInfoEditor = editor;
  989. var detailInfo= orderInfoEditor.getData();
  990. ClassicEditor.instances.WORK_INTRODUCTION.setData(detailInfo);
  991. console.log(detailInfo);
  992. }).catch(function(error){
  993. console.log(error);
  994. });
  995. },
  996. initSeverCKeditor: function(){//富文本
  997. var _this = this;
  998. _this.vShow_orderInfoEditor = false;
  999. ClassicEditor.create(document.querySelector('#severInfoEditor'), {
  1000. ckfinder: {
  1001. uploadUrl: _this.NODE_ENV_BASE_URL+'/formData/ckeditorImage'
  1002. }
  1003. }).then(function(editor) {
  1004. window.severInfoEditor = editor;
  1005. var detailInfo= severInfoEditor.getData();
  1006. ClassicEditor.instances.WORK_INTRODUCTION.setData(detailInfo);
  1007. }).catch(function(error){
  1008. console.log(error);
  1009. });
  1010. },
  1011. addReleaseGoodSubmitFn: function(){//提交发布商品
  1012. var _this = this;
  1013. _this.releaseParams.orderInfo = orderInfoEditor.getData();
  1014. _this.releaseParams.serviceInfo = severInfoEditor.getData();
  1015. if(_this.releaseType == 'edit'){
  1016. _this.releaseParams.productDetailInfoId = _this.productDetailInfoId;
  1017. _this.releaseParams.productId = _this.productId;
  1018. CAIMEI.returnedTarget();
  1019. _this.releaseParams = Object.assign(_this.releaseParams,{params:JSON.stringify(_this.params)});
  1020. delete _this.releaseParams.imageList;
  1021. delete _this.releaseParams.parametersList;
  1022. delete _this.releaseParams.productDetail;
  1023. }else{
  1024. CAIMEI.returnedTarget();
  1025. _this.releaseParams = Object.assign(_this.releaseParams,{params:JSON.stringify(_this.params)});
  1026. }
  1027. // console.log( _this.releaseParams);
  1028. SupplierApi.AddSupplierReleaseProduct(_this.releaseParams,function(response){
  1029. if(response.code == 0){
  1030. CAIMEI.dialog('提交成功,等待审核',true,function () {
  1031. if(_this.releaseType == 'edit'){
  1032. SupplierApi.UpdateSearchManageProduct({productId:_this.productId},function (res) {
  1033. console.log('编辑商品更新搜索索引~~~成功');
  1034. })
  1035. }
  1036. location.href = '/supplier/goods.html';
  1037. if(CAIMEI.Storage.getItem('adProductPeview')){
  1038. CAIMEI.Storage.removeItem('adProductPeview');
  1039. }
  1040. });
  1041. }else{
  1042. CAIMEI.Alert(response.msg, '确定', false);
  1043. }
  1044. });
  1045. },
  1046. addReleasePeview: function(){//预览按钮
  1047. var _this = this;
  1048. CAIMEI.returnedTarget();
  1049. _this.releaseParams.orderInfo = orderInfoEditor.getData();
  1050. _this.releaseParams.serviceInfo = severInfoEditor.getData();
  1051. _this.releaseParams = Object.assign(_this.releaseParams,{params:_this.params});
  1052. CAIMEI.Storage.setItem('adProductPeview', JSON.stringify(_this.releaseParams));
  1053. setTimeout(function(){
  1054. window.open('/supplier/goods/preview.html');
  1055. },1000)
  1056. },
  1057. blur_name: function(e){//商品名失去焦点
  1058. var _this = this;
  1059. _this.vShow_Name = false;
  1060. if(e.target.value == ''){
  1061. _this.vShow_Name = true;
  1062. _this.fromMessage = '请输入商品显示名';
  1063. setTimeout(function(){
  1064. _this.vShow_Name = false;
  1065. },2000);
  1066. }else{
  1067. _this.vShow_Name = false;
  1068. }
  1069. },
  1070. blur_aliasName: function(e){//内部商品名失去焦点
  1071. var _this = this;
  1072. _this.vShow_AliasName = false;
  1073. if(e.target.value == ''){
  1074. _this.vShow_AliasName = true;
  1075. _this.fromMessage = '请输入内部商品名';
  1076. setTimeout(function(){
  1077. _this.vShow_AliasName = false;
  1078. },2000);
  1079. }else{
  1080. _this.vShow_AliasName = false;
  1081. }
  1082. },
  1083. blur_taxPoint: function(event){
  1084. var E_TaxPoint = event.target.value;
  1085. if(E_TaxPoint!=''){
  1086. this.releaseParams.taxPoint = parseFloat(E_TaxPoint);
  1087. }else{
  1088. this.releaseParams.taxPoint = '';
  1089. }
  1090. this.vShow_taxPoint = false;
  1091. },
  1092. blur_tags: function(e){
  1093. this.vShow_Tags = false;
  1094. },
  1095. blur_aliasUnit: function(e){
  1096. this.vShow_Unit = false;
  1097. },
  1098. input_normalPrice: function(e){
  1099. this.vShow_NormalPrice = false;
  1100. },
  1101. input_price1: function(e){
  1102. this.vShow_Price1 = false;
  1103. },
  1104. input_trainingFee: function(event){
  1105. var E_Number = event.target.value;
  1106. if(E_Number!=''){
  1107. this.releaseParams.trainingFee = parseInt(E_Number.replace(/[^0-9]/g,''));
  1108. }else{
  1109. this.releaseParams.trainingFee = '';
  1110. }
  1111. },
  1112. input_minBuyNumber: function(event){
  1113. this.vShow_MinBuyNumber = false;
  1114. var E_Number = event.target.value;
  1115. if(E_Number!=''){
  1116. this.releaseParams.minBuyNumber = parseInt(E_Number.replace(/[^0-9]/g,''));
  1117. }else{
  1118. this.releaseParams.minBuyNumber = '';
  1119. }
  1120. },
  1121. input_stock: function(event){
  1122. this.vShow_Stock = false;
  1123. var E_stock = event.target.value;
  1124. if(E_stock!=''){
  1125. this.releaseParams.stock = parseInt(E_stock.replace(/[^0-9]/g,''));
  1126. }else{
  1127. this.releaseParams.stock = '';
  1128. }
  1129. },
  1130. toFixedFn: function(text){
  1131. return Number(text).toFixed(2);
  1132. },
  1133. scrollIntoView: function(){
  1134. document.getElementById('releaseContainer').scrollIntoView({block: 'start', behavior: 'smooth'});
  1135. },
  1136. setTagArray: function(arr){//回显处理商品标签
  1137. var arrSplit = arr.split(',');
  1138. var _ARRAY = [];
  1139. arrSplit.forEach(function(item){
  1140. var _OBJ = {tag:item};
  1141. _ARRAY.push(_OBJ)
  1142. });
  1143. return _ARRAY
  1144. },
  1145. setSearchKeyArray: function(arr){//回显处理商品搜索关键词
  1146. var _this = this;
  1147. var arrSplit = arr.split(',');
  1148. return _this.searchKeyList.map(function(el,index){
  1149. el.value = arrSplit[index] || '';
  1150. })
  1151. },
  1152. gernerateTitleId: function(index){
  1153. return "title_" +index
  1154. },
  1155. dragstart: function(value) { // 记录初始信息
  1156. this.oldNum = value;
  1157. },
  1158. dragend: function(value) { // 做最终操作
  1159. if (this.oldNum != this.newNum) {
  1160. var oldIndex = this.GoodsImagesList.indexOf(this.oldNum);
  1161. var newIndex = this.GoodsImagesList.indexOf(this.newNum);
  1162. var newItems = this.GoodsImagesList;
  1163. // 删除老的节点
  1164. newItems.splice(oldIndex, 1);
  1165. // 在列表中目标位置增加新的节点
  1166. newItems.splice(newIndex, 0, this.oldNum);
  1167. // this.items一改变,transition-group就起了作用
  1168. this.GoodsImagesList = newItems;
  1169. }
  1170. },
  1171. dragenter: function(value) {//记录移动过程中信息
  1172. this.newNum = value;
  1173. },
  1174. },
  1175. created: function () {
  1176. // 获取初始一级分类菜单
  1177. this.GetFistClassFn(this.releaseParams.commodityType);
  1178. },
  1179. mounted: function () {
  1180. var _this = this;
  1181. var NODE_ENV_BASE_URL = $('#spiServer').val();
  1182. _this.NODE_ENV_BASE_URL = NODE_ENV_BASE_URL;
  1183. if(globalUserData){
  1184. _this.releaseParams.shopId = globalUserData.shopId;
  1185. _this.releaseParams.userId = globalUserData.userId;
  1186. _this.releaseType = CAIMEI.getUrlParam('type');
  1187. if( _this.releaseType == 'edit'){
  1188. _this.productId = Number(CAIMEI.getUrlParam('productId'));
  1189. _this.GetEditReleaseProductInfo(_this.productId);
  1190. }
  1191. }
  1192. }
  1193. });