form-seller.vue 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130
  1. <template name="secondHandrelease">
  2. <view class="fleaMarketForm">
  3. <view class="bannerimg"><image src="https://static.caimei365.com/app/img/bg/secondbg.jpg"></image></view>
  4. <view class="my-maintenance" >
  5. <view class="newsTitle">
  6. <view class="nestext">欢迎您来到采美365网二手商品市场,您可以在这里发布二手设备/产品信息,每个商品需要收取您100元的展示费,展示期为3个月; 为了完整展示您的商品,请您认真填写以下内容,谢谢合作</view>
  7. </view>
  8. <form>
  9. <view class="row fenlei">
  10. <view class="label">分类</view>
  11. <view class="secondradio">
  12. <radio-group class="row-group" @change="secondHandRidio" >
  13. <label class="row-input" v-for="(item, index) in fenlei" :key="index">
  14. <radio class="row-radio" :value="item.value" color="#E15616"/>
  15. <view class="row-text">{{item.name}}</view>
  16. </label>
  17. </radio-group>
  18. </view>
  19. <view class="secondradio Secondary" v-if="isShow" >
  20. <checkbox-group class="row-group" @change="secondHandType">
  21. <label class="row-input" v-for="(item, index) in radioList" :key="item.value" >
  22. <checkbox class="row-check" :value="item.value" ></checkbox>
  23. <view class="row-text">{{item.name}}</view>
  24. </label>
  25. </checkbox-group>
  26. </view>
  27. <view class="linqi_text" v-show="secondParams.secondHandType==2">
  28. <view class="jiaobiao"></view>
  29. <p class="p">临期产品是指临近保质期的产品,距离到期日最好在3个月以上</p>
  30. </view>
  31. </view>
  32. <view class="row">
  33. <view class="label">商品品牌</view>
  34. <view class="select spacing" @click="hanldOperationConfim">
  35. <view class="placeholder" :style="brandname=='请选择品牌名称'?'':'color:#333333'">{{brandname}}</view>
  36. </view>
  37. <text class="iconfont icon-xiayibu"></text>
  38. <!-- 品牌弹窗 -->
  39. <tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
  40. <view class="tui-popup-box clearfix">
  41. <text class="iconfont icon-iconfontguanbi" @click="hidePopup()"></text>
  42. <view class="content">
  43. <view class="freight-radio">
  44. <scroll-view scroll-y style="max-height: 605rpx;">
  45. <radio-group class="row-group" @change="radioChange" >
  46. <label class="row-input" v-for="(item, index) in BrandList" :key="item.id">
  47. <view class="row-text">{{item.name}}</view>
  48. <radio class="row-radio" :value="item.id" color="#E15616"/>
  49. </label>
  50. </radio-group>
  51. </scroll-view>
  52. </view>
  53. </view>
  54. </view>
  55. </tui-bottom-popup>
  56. </view>
  57. <view class="row" v-if="secondParams.brandId==161">
  58. <view class="label">其它品牌</view>
  59. <view class="spacing">
  60. <input type="text" maxlength="40" v-model="secondParams.brandName" placeholder="请输入商品品牌" placeholder-class="placeholder">
  61. </view>
  62. </view>
  63. <view class="row">
  64. <view class="label">商品名称</view>
  65. <view class="spacing">
  66. <input type="text" maxlength="40" v-model="secondParams.name" placeholder="请输入商品名称,不超过40个汉字" placeholder-class="placeholder">
  67. </view>
  68. </view>
  69. <view class="row">
  70. <view class="label">出厂日期</view>
  71. <view class="spacing">
  72. <input type="text" v-model="secondParams.fixedYears" maxlength="10" placeholder="请输入出厂日期 如:2020年06月" placeholder-class="placeholder">
  73. </view>
  74. </view>
  75. <!-- <view class="row" v-show="secondParams.secondHandType==2">
  76. <view class="label second">产品到期日</view>
  77. <view class="spacing second">
  78. <input type="text" v-model="secondParams.maturityYears" maxlength="10" placeholder="请输入产品到期日,如:2020年12月" placeholder-class="placeholder">
  79. </view>
  80. </view> -->
  81. <view class="row">
  82. <view class="label">公司名称</view>
  83. <view class="spacing">
  84. <input type="text" v-model="secondParams.companyName" maxlength="30" placeholder="请输入公司名称,不超过30个汉字" placeholder-class="placeholder">
  85. </view>
  86. </view>
  87. <view class="row">
  88. <view class="label">交易价</view>
  89. <view class="spacing">
  90. <input type="text" maxlength="20" v-model="secondParams.price" placeholder="请输入交易价" placeholder-class="placeholder">
  91. </view>
  92. </view>
  93. <view style="margin-top: 15rpx;">
  94. <label v-model="secondParams.detailTalkFlags" class="iconfont xiangliao"
  95. :class="vShow_detailTalkFlag ? 'icon-jiagexiangliao':'icon-juxingweigouxuan'" @click="Detailed($event)">
  96. <label class='pricecolor' >价格详聊</label>
  97. </label>
  98. <label class="showflag" v-show="vShow_detailTalkFlag">(勾选代表同意不显示交易价)</label>
  99. </view>
  100. <!-- <view class="row" v-show="secondParams.secondHandType==2">
  101. <view class="label">市场价</view>
  102. <view class="spacing">
  103. <input type="text" v-model="secondParams.normalPrice" maxlength="30" placeholder="请输入市场价" placeholder-class="placeholder">
  104. </view>
  105. </view> -->
  106. <!-- <view class="row" v-show="secondParams.secondHandType==2">
  107. <view class="label second">采购价/原价</view>
  108. <view class="spacing second">
  109. <input type="text" v-model="secondParams.originalPrice" maxlength="30" placeholder="请输入采购价/原价" placeholder-class="placeholder"/>
  110. </view>
  111. </view>
  112. <view class="row" v-show="secondParams.secondHandType==2">
  113. <view class="label">数量</view>
  114. <view class="spacing">
  115. <input type="text" v-model="secondParams.stock" maxlength="30" placeholder="请输入数量" placeholder-class="placeholder">
  116. </view>
  117. </view> -->
  118. <view class="row">
  119. <view class="label">商品成色</view>
  120. <view class="spacing">
  121. <input type="text" maxlength="10" v-model="secondParams.productQuality" placeholder="请输入商品成色,如“9成新”" placeholder-class="placeholder">
  122. </view>
  123. </view>
  124. <view class="row">
  125. <view class="label">联系人</view>
  126. <view class="spacing">
  127. <input type="text" maxlength="15" v-model="secondParams.contactName" placeholder="请输入联系人姓名" placeholder-class="placeholder">
  128. </view>
  129. </view>
  130. <view class="row">
  131. <view class="label">联系方式</view>
  132. <view class="spacing">
  133. <input type="text" v-model="secondParams.contactMobile" maxlength="11" placeholder="请输入联系人手机号" placeholder-class="placeholder">
  134. </view>
  135. </view>
  136. <view class="row none">
  137. <view class="label-im">身份验证照片</view>
  138. <view class="label-em">(个人请上传身份证正面照片;机构请上传营业执照照片)</view>
  139. <view class="release-input upload image uploadGoodsImages" >
  140. <view class="upload-file" v-if="secondParams.authenticationImage == ''">
  141. <i class="iconfont icon-shangchuantupian"></i>
  142. <text class="add-text">验证照片</text>
  143. <view ref="goodsImages" class="input-file" @click="uploadUserImageFn"></view>
  144. </view>
  145. <view class="upload-file" v-else>
  146. <image :src="secondParams.authenticationImage" alt="" class="upload-img" ></image>
  147. <i class=" del iconfont icon-shanchu1" @click="removeUserImageFn"></i>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="row">
  152. <view class="label">采美对接人</view>
  153. <view class="spacing">
  154. <input type="text" v-model="secondParams.dockingPeopleName" maxlength="15" placeholder="请输入采美对接人姓名" placeholder-class="placeholder">
  155. </view>
  156. </view>
  157. <view class="row">
  158. <view class="label">对接人联系方式</view>
  159. <view class="spacing">
  160. <input type="text" v-model="secondParams.dockingPeopleMobile" maxlength="11" placeholder="请输入采美对接人手机号" placeholder-class="placeholder">
  161. </view>
  162. </view>
  163. <view class="row">
  164. <view class="label">商品类型</view>
  165. <view class="secondradio">
  166. <radio-group class="row-group" @change="getProductType" >
  167. <label class="row-input" v-for="(item, index) in beauty" :key="index">
  168. <radio class="row-radio" :value="item.value" color="#E15616"/>
  169. <view class="row-text">{{item.name}}</view>
  170. </label>
  171. </radio-group>
  172. </view>
  173. </view>
  174. <view class="row" >
  175. <view class="label">联系地址</view>
  176. <view class="spacing" @click="showMulLinkageThreePicker">
  177. <text class="row-input" :class="addressData.address === '请选择所在地区' ? 'none,placeholder' : ''" >
  178. {{addressData.address}}
  179. </text>
  180. </view>
  181. <text class="iconfont icon-xiayibu"></text>
  182. </view>
  183. <textarea type="text"
  184. class="border-grey address-details"
  185. v-model="secondParams.address"
  186. maxlength="50"
  187. placeholder="请填写详细地址,如街道/小区/门牌等"
  188. placeholder-class="placeholder"/>
  189. </textarea>
  190. <view class="release-main-container">
  191. <view class="release-from">
  192. <view class="label">商品图片</view>
  193. <view class="release-input upload image uploadGoodsImages" >
  194. <view class="upload-file" v-if="GoodsImagesList.length<5">
  195. <i class="iconfont icon-shangchuantupian"></i>
  196. <p class="add-text">商品图片</p>
  197. <view ref="goodsImages" class="input-file" @click="uploadGoodsImagesFn"></view>
  198. </view>
  199. <view class="upload-file" v-for="(item, index) in GoodsImagesList" :key="index">
  200. <image :data-original='item' :src="item" :data-image="item" alt="" class="upload-img" ></image>
  201. <i class=" del iconfont icon-shanchu1" @click="removeGoodsImagesFn(index)"></i>
  202. </view>
  203. </view>
  204. <view class="form-upload-tips">
  205. <i class="iconfont icon-wenhao" ></i>
  206. <view class="wen-tips" >最多上传5张二手商品图片,请尽量全部上传,单张图片不能超过5M</view>
  207. </view>
  208. </view>
  209. </view>
  210. <view class="row">
  211. <view class="label">二手出让承诺函文件</view>
  212. <view class="spacing file-none" v-if="secondParams.fileName == ''">
  213. <view class="file-none-button" @click="uploadCommitmentFile">上传</view>
  214. </view>
  215. <view class="spacing file-text" v-else>
  216. <text class="file-text-em">{{ secondParams.fileName }}</text>
  217. <i class=" del iconfont icon-shanchu1" @click="deleteCommitmentFile"></i>
  218. </view>
  219. </view>
  220. <view class="row none">
  221. <view class="label-im">二手出让承诺函图片</view>
  222. <view class="label-em">(若不方便上传承诺函文件,可对承诺函进行拍照或者截图,再上传图片)</view>
  223. <view class="release-input upload image uploadGoodsImages" >
  224. <view class="upload-file" v-if="secondParams.commitmentImage == ''">
  225. <i class="iconfont icon-shangchuantupian"></i>
  226. <text class="add-text">承诺函图片</text>
  227. <view ref="goodsImages" class="input-file" @click="uploadCommitmentImageFn"></view>
  228. </view>
  229. <view class="upload-file" v-else>
  230. <image :src="secondParams.commitmentImage" alt="" class="upload-img" ></image>
  231. <i class=" del iconfont icon-shanchu1" @click="removeCommitmentImageFn"></i>
  232. </view>
  233. </view>
  234. </view>
  235. <view class="productinfo">
  236. <view class="label unlogin-label" style="width: 100%;">商品详细信息</view>
  237. <div class="textarea-wrapper">
  238. <textarea class="textarea"
  239. type="text"
  240. v-model="secondParams.productDetails"
  241. placeholder="请填写商品详细信息,对商品进行更详细的描述"
  242. placeholder-class="placeholder"
  243. maxlength="200"
  244. @input="onTextareaInputInfo"
  245. />
  246. <span class="word-limit">{{secondParams.productDetails.length}}/200</span>
  247. </div>
  248. </view>
  249. <view class="productinfo">
  250. <view class="label unlogin-label" style="width: 100%;">免责声明</view>
  251. <text class="smText" >鉴于本网站提供的二手版块信息包括但不限于公司名称,商品的简介、性能、描述与说明,相关图片、视频等均由卖家自行提供,由卖家对其提供的信息承担相应法律责任。买家应自行甄别商品信息并查验商品性状。本网站对二手版块中买卖双方的交易不提供任何形式的担保与保证,特此声明!</text>
  252. </view>
  253. <view class="row Read">
  254. <span @click="changeBox($event)" class="iconfont xiangliao"
  255. :class="checkbox?'icon-jiagexiangliao':'icon-juxingweigouxuan'" ><span style="margin-left: 10rpx;">已阅读</span></span>
  256. </view>
  257. <view class="BtnAll" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
  258. <view @click="submitBtn" class="btn-submit">发布</view>
  259. </view>
  260. </form>
  261. <!-- 地址弹窗 -->
  262. <mpvue-city-picker :themeColor="themeColor"
  263. ref="mpvueCityPicker"
  264. :pickerValueDefault="cityPickerValueDefault"
  265. @onCancel="onCancel"
  266. @onConfirm="onConfirm">
  267. </mpvue-city-picker>
  268. </view>
  269. <view class="secondBj thebj" v-show="PopupShow" :class="PopupShow ? 'show':''">
  270. <view class="bjmain theresult">
  271. <text class="title">发布提示</text>
  272. <text class="content"> {{ tipsContentText }} </text>
  273. <view class="paybtn">
  274. <view class="btn cancel" @click.stop="cancelButtonFn">{{ cancelButtonText }}</view>
  275. <view class="btn confirm" @click.stop="confirmButtonFn">{{ confirmButtonText }}</view>
  276. </view>
  277. </view>
  278. </view>
  279. <payment-record ref="payment" v-if="isRequest" :discernReceiptList="discernReceiptList" :receiptAmount="receiptAmount"></payment-record>
  280. </view>
  281. </template>
  282. <script>
  283. import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
  284. import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord'
  285. import { uploadFileImage , uploadFilePdf } from "@/services/public.js"
  286. import authorize from '@/common/config/authorize.js'
  287. import $reg from '@/common/config/common.js'
  288. import { mapState,mapMutations } from 'vuex';
  289. export default{
  290. name:'secondHandrelease',
  291. components:{
  292. mpvueCityPicker,
  293. paymentRecord,
  294. },
  295. data(){
  296. return{
  297. userIdentity:0,
  298. popupShow:false,
  299. fenlei:[
  300. {name:'二手仪器',value:'1'},
  301. // {name:'临期产品',value:'2'},
  302. {name:'其他',value:'3'},
  303. ],
  304. radioList:[
  305. {name:'轻光电',value:'1',isChecked:false},
  306. {name:'重光电',value:'2',isChecked:false},
  307. {name:'耗材配件',value:'3',isChecked:false},
  308. ],
  309. beauty:[
  310. {name:'医美',value:'1'},
  311. {name:'非医美',value:'2'},
  312. ],
  313. BrandList:[],
  314. isShow:false,
  315. GoodsImagesList:['https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg'],
  316. secondParams:{
  317. secondHandType:'',//一级分类
  318. instrumentType:'',//二手仪器分类
  319. name:'',
  320. brandId:'',//品牌ID
  321. brandName:'',//其他品牌
  322. fixedYears:'',//出厂
  323. companyName:'',//公司名称
  324. maturityYears:'',//产品到期
  325. price:'',//交易价
  326. detailTalkFlag:1,//是否启用详聊
  327. normalPrice:'',//市场价
  328. originalPrice:'',//采购价
  329. stock:'',//数量
  330. productQuality:'',//商品成色
  331. contactName:'',//联系人
  332. contactMobile:'',//联系方式
  333. authenticationImage:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',//身份验证图片
  334. commitmentImage:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',//承诺函图片
  335. dockingPeopleName:'',//采美对接人姓名
  336. dockingPeopleMobile:'',//采美对接人手机号
  337. secondProductType:'',//
  338. townId:'',//县区地址
  339. address:'',//详细地址
  340. image:'https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2306696130,3636777462&fm=26&gp=0.jpg',//图片
  341. fileName:'',
  342. ossName:'',
  343. productDetails:'',//商品详细信息
  344. source:4//二手发布来源.1:WWW,2:小程序,3:后台,4:协销
  345. },
  346. addressData:{
  347. address:'请选择所在地区',
  348. townID:'', //区ID
  349. cityID:'', //区ID
  350. provinceID:'', //区ID
  351. addressDetail: '', //地址
  352. },
  353. brandname:'请选择品牌名称',
  354. checkbox:false,
  355. shoplogoTwo:false,
  356. PopupShow:false,
  357. tipsContentText:'发布二手商品,采美需要收取您每个商品100元的展示费,展示期为3个月支付完成后,商品会在1-2个工作日内进行审核,审核通过后,商品会立即上线',
  358. cancelButtonText:'取消发布',
  359. confirmButtonText:'去支付',
  360. isButtonsType:0,
  361. resultBj:false,
  362. vShow_detailTalkFlag:false,
  363. playid:'',
  364. }
  365. },
  366. methods:{
  367. onTextareaInputInfo(e){
  368. this.secondParams.productDetails = e.detail.value;
  369. },
  370. radioChange(e){//品牌
  371. this.secondParams.brandId = e.target.value;
  372. this.BrandList.forEach((item,index)=>{
  373. if(item.id==this.secondParams.brandId){
  374. this.brandname = item.name;
  375. this.popupShow = false;
  376. }
  377. })
  378. },
  379. showMulLinkageThreePicker() {//三级地址联动
  380. this.isShowInput = true
  381. this.$refs.mpvueCityPicker.show()
  382. },
  383. onConfirm(e) {//获取选择的地址信息
  384. this.addressData.address = e.name;
  385. this.addressData.townID = e.townCode;
  386. this.addressData.cityID = e.cityCode;
  387. this.addressData.provinceID = e.provinceCode;
  388. this.secondParams.townId = this.addressData.townID;
  389. },
  390. hanldOperationConfim(){
  391. this.popupShow = true;
  392. },
  393. hidePopup(){
  394. this.popupShow = false;
  395. },
  396. secondHandRidio(e) {
  397. this.secondParams.secondHandType = e.target.value;
  398. if (e.target.value == 1){
  399. this.isShow = true;
  400. }else {
  401. this.isShow = false;
  402. }
  403. },
  404. secondHandType(e){ //二手仪器
  405. this.secondParams.instrumentType = e.target.value.toString();
  406. },
  407. Detailed(){
  408. this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag;
  409. if(this.vShow_detailTalkFlag){
  410. this.secondParams.detailTalkFlag = 2 ;//启用价格详聊
  411. }else {
  412. this.secondParams.detailTalkFlag = 1 ;//不启用价格详聊
  413. }
  414. },
  415. uploadGoodsImagesFn(event){//上传商品图片
  416. uploadFileImage().then(res =>{
  417. this.GoodsImagesList.push(JSON.parse(res.data).data);
  418. this.secondParams.image =this.GoodsImagesList.toString()+',';
  419. })
  420. },
  421. uploadUserImageFn(event){//上传身份图片
  422. uploadFileImage().then(res =>{
  423. this.secondParams.authenticationImage = JSON.parse(res.data).data;
  424. })
  425. },
  426. uploadCommitmentImageFn(event){//上传承诺函图片
  427. uploadFileImage().then(res =>{
  428. this.secondParams.commitmentImage = JSON.parse(res.data).data;
  429. })
  430. },
  431. uploadCommitmentFile(){//上传承诺函文件
  432. uploadFilePdf().then(res =>{
  433. let data = JSON.parse(res.data).data
  434. this.secondParams.fileName = uni.getStorageSync('fileName');
  435. this.secondParams.ossName = data.ossName;
  436. console.log('fileName',this.secondParams.fileName)
  437. console.log('ossName',this.secondParams.ossName)
  438. })
  439. },
  440. deleteCommitmentFile(){//删除承诺函文件
  441. this.secondParams.fileName = ''
  442. },
  443. removeGoodsImagesFn(index){//删除商品图片
  444. this.GoodsImagesList.splice(index,1);
  445. this.secondParams.image =this.GoodsImagesList.toString()+',';
  446. },
  447. removeUserImageFn(index){//删除身份图片
  448. this.secondParams.authenticationImage = ''
  449. },
  450. removeCommitmentImageFn(index){//删除承诺函图片
  451. this.secondParams.commitmentImage = ''
  452. },
  453. getProductType(e){
  454. this.secondParams.secondProductType = e.target.value ;
  455. },
  456. submitBtn () {
  457. if(this.secondParams.secondHandType == ''){
  458. this.$util.msg('请选择分类',2000);
  459. return;
  460. }
  461. if(this.secondParams.secondHandType == 1 ){
  462. if(this.secondParams.instrumentType ==''){
  463. this.$util.msg('请完善仪器分类',2000);
  464. return;
  465. }
  466. }
  467. if(this.secondParams.brandId == ''){
  468. this.$util.msg('请选择商品品牌',2000);
  469. return;
  470. }
  471. if(this.secondParams.name == ''){
  472. this.$util.msg('请输入商品名称',2000);
  473. return
  474. }
  475. // if(this.secondParams.secondHandType ==2) {
  476. // if (this.secondParams.maturityYears=='') {
  477. // this.$util.msg('请输入产品到期日',2000);
  478. // return
  479. // }
  480. // }
  481. if(!this.$api.isNumber(this.secondParams.price)){
  482. this.$util.msg('请输入交易价',2000);
  483. return
  484. }
  485. // if(this.secondParams.secondHandType ==2) {
  486. // if (!this.$api.isNumber(this.secondParams.normalPrice)) {
  487. // this.$util.msg('请输入市场价',2000);
  488. // return
  489. // }
  490. // if(!this.$api.isNumber(this.secondParams.originalPrice)){
  491. // this.$util.msg('请输入采购价/原价',2000);
  492. // return
  493. // }
  494. // if(!this.$api.isNumber(this.secondParams.stock)){
  495. // this.$util.msg('请输入数量',2000);
  496. // return
  497. // }
  498. // }
  499. if(this.secondParams.productQuality == ''){
  500. this.$util.msg('请输入商品成色',2000);
  501. return
  502. }
  503. if(this.secondParams.contactName == ''){
  504. this.$util.msg('请输入联系人姓名',2000);
  505. return
  506. }
  507. if(this.secondParams.contactMobile == ''){
  508. console.log(this.secondParams.contactMobile)
  509. this.$util.msg('请输入联系方式',2000);
  510. return
  511. }
  512. if(!$reg.isMobile(this.secondParams.contactMobile)){
  513. this.$util.msg('请填写正确的手机号',2000);
  514. return
  515. }
  516. if(this.userIdentity === 1){
  517. if(this.secondParams.dockingPeopleName == ''){
  518. this.$util.msg('请输入采美对接人姓名',2000);
  519. return
  520. }
  521. if(this.secondParams.dockingPeopleMobile == ''){
  522. this.$util.msg('请输入采美对接人手机号',2000);
  523. return
  524. }
  525. }
  526. if(this.secondParams.dockingPeopleMobile !=''){
  527. if(!$reg.isMobile(this.secondParams.dockingPeopleMobile)){
  528. this.$util.msg('请填写正确的采美对接人手机号',2000);
  529. return
  530. }
  531. }
  532. if(this.secondParams.townId == ''|| this.secondParams.townId == undefined){
  533. this.$util.msg('请完善联系地址',2000);
  534. return
  535. }
  536. if(this.secondParams.address == ''){
  537. this.$util.msg('请填写详细地址',2000);
  538. return
  539. }
  540. if(this.GoodsImagesList ==''){
  541. this.$util.msg('请上传图片',2000);
  542. return;
  543. }
  544. if(this.checkbox==false){
  545. this.$util.msg('请勾选已阅读',2000);
  546. return
  547. }
  548. console.log(this.secondParams)
  549. if(this.secondParams.authenticationImage == ''){
  550. this.PopupShow = true
  551. this.tipsContentText = '上传身份验证照片。您的二手商品将获得更好的推荐推荐和曝光,方便您快速卖出。'
  552. this.cancelButtonText = '继续发布'
  553. this.confirmButtonText = '去上传'
  554. this.isButtonsType = 1
  555. return;
  556. }
  557. if(this.secondParams.commitmentImage == '' || this.secondParams.ossName == ''){
  558. this.PopupShow = true
  559. this.tipsContentText = '上传二手出让承诺函。您的二手商品将获得更好的推荐推荐和曝光,方便您快速卖出。'
  560. this.cancelButtonText = '继续发布'
  561. this.confirmButtonText = '去上传'
  562. this.isButtonsType = 1
  563. return;
  564. }
  565. this.SecondHandProduct(this.secondParams)
  566. },
  567. SecondHandProduct(params){//提交发布
  568. this.SecondService.SecondHandProduct(params).then(res=>{
  569. this.PopupShow = true;
  570. this.tipsContentText = '发布二手商品,采美需要收取您每个商品100元的展示费,展示期为3个月支付完成后,商品会在1-2个工作日内进行审核,审核通过后,商品会立即上线'
  571. this.cancelButtonText = '取消发布'
  572. this.confirmButtonText = '去支付'
  573. this.isButtonsType = 2
  574. this.playid= res.data;
  575. }).catch(error =>{
  576. this.$util.msg(error.msg,2000)
  577. this.secondBj = false;
  578. return
  579. })
  580. },
  581. cancelButtonFn(){//弹窗操作按钮
  582. switch(this.isButtonsType){
  583. case 1:
  584. this.SecondHandProduct(this.secondParams)
  585. break;
  586. case 2:
  587. this.PopupShow = false;
  588. break;
  589. }
  590. },
  591. confirmButtonFn(){//弹窗操作按钮
  592. switch(this.isButtonsType){
  593. case 1:
  594. this.PopupShow = false;
  595. break;
  596. case 2:
  597. this.MiniWxPayFor()
  598. this.PopupShow = false;
  599. break;
  600. }
  601. },
  602. MiniWxPayFor(){
  603. authorize.getCode('weixin').then(wechatcode =>{
  604. let params ={
  605. code:wechatcode,
  606. productId:this.playid
  607. }
  608. this.PayService.SecondHandPay(params).then(response =>{
  609. let PayInfo = JSON.parse(response.data.data.payInfo);
  610. this.WxRequestPayment(PayInfo)
  611. }).catch(error =>{
  612. this.$util.msg(error.msg,2000)
  613. })
  614. })
  615. },
  616. WxRequestPayment(data){
  617. let self = this
  618. wx.requestPayment({
  619. 'timeStamp': data.timeStamp,
  620. 'nonceStr': data.nonceStr,
  621. 'package': data.package,
  622. 'signType': data.signType,
  623. 'paySign': data.paySign,
  624. 'success':function(res){
  625. wx.reLaunch({url: 'second/pages/product/product-list'});
  626. },
  627. 'fail':function(res){
  628. self.$util.msg('用户取消支付~')
  629. },
  630. 'complete':function(res){
  631. }
  632. })
  633. },
  634. changeBox:function () {
  635. this.checkbox = !this.checkbox;
  636. },
  637. },
  638. onShow() {
  639. this.SecondService.brandList().then(res =>{//品牌列表
  640. if(res.code == 0){
  641. this.BrandList = res.data;
  642. }
  643. })
  644. this.$api.getComStorage('userInfo').then((resolve) =>{
  645. this.userIdentity = resolve.userIdentity
  646. console.log(this.userIdentity)
  647. }).catch(error =>{
  648. console.log(error)
  649. })
  650. }
  651. }
  652. </script>
  653. <style lang="scss">
  654. view{font-size: 28rpx;}
  655. .my-maintenance{
  656. padding: 20rpx;
  657. }
  658. .bannerimg {
  659. height: 66rpx;
  660. width: 100%;
  661. }
  662. .bannerimg image{
  663. width: 100%;
  664. height: 100% ;
  665. }
  666. .newsTitle {
  667. line-height: 48rpx;
  668. text-align: left;
  669. color: #e15616;
  670. padding:20rpx;
  671. background-color: rgba(225, 86, 22, .1);
  672. }
  673. .nestext{
  674. font-size: 24rpx;
  675. }
  676. .secondradio view{
  677. display: inline-block;
  678. color: #333333;
  679. margin-right: 21rpx;
  680. }
  681. .secondradio{
  682. display: inline-block;
  683. margin-left: 40rpx;
  684. }
  685. .Secondary{
  686. margin-left: 96rpx;
  687. }
  688. .secondradio view.active {
  689. color: #e15616;
  690. }
  691. .placeholder{
  692. color: #b2b2b2;
  693. }
  694. .linqi_text {
  695. width: 607rpx;
  696. height: 68rpx;
  697. background-color: #1890f9;
  698. box-shadow: 0rpx 4rpx 6rpx 0rpx rgba(24, 144, 249, 0.17);
  699. text-align: center;
  700. line-height: 68rpx;
  701. color: #ffffff;
  702. margin: auto;
  703. font-size:24rpx;
  704. position: relative;
  705. }
  706. .jiaobiao {
  707. width: 0;
  708. height: 0;
  709. border-left: 20rpx solid transparent;
  710. border-right: 20rpx solid transparent;
  711. top: -25%;
  712. right: 40%;
  713. border-bottom: 20rpx solid #1890f9;
  714. position: absolute;
  715. }
  716. .label{
  717. color: #666666;
  718. display: inline-block;
  719. }
  720. .label-im{
  721. width: 100%;
  722. line-height: 50rpx;
  723. font-size: $font-size-28;
  724. color: #666666;
  725. text-align: left;
  726. margin-top: 20rpx;
  727. }
  728. .label-em{
  729. line-height: 28rpx;
  730. font-size: $font-size-20;
  731. color: #fea785;
  732. width: 100%;
  733. text-align: left;
  734. }
  735. .label.second{
  736. width: 155rpx;
  737. }
  738. .row .spacing.second{
  739. width: 70%;
  740. }
  741. .row{
  742. border-bottom: 2rpx solid #e1e1e1;
  743. line-height: 90rpx;
  744. height: auto;
  745. position: relative;
  746. &.none{
  747. border-bottom: none;
  748. }
  749. }
  750. .row.fenlei{
  751. height: auto;
  752. margin: 10rpx 0;
  753. border: 0;
  754. }
  755. .select {
  756. position: relative;
  757. color: #b2b2b2;
  758. text-align: left;
  759. user-select: none;
  760. }
  761. .row .spacing{
  762. display: inline-block;
  763. margin-left: 50rpx;
  764. width: 430rpx;
  765. vertical-align:middle;
  766. position: relative;
  767. &.file{
  768. width: 400rpx;
  769. }
  770. &.file-text{
  771. width: 400rpx;
  772. line-height: 44rpx;
  773. font-size: 28rpx;
  774. padding-right: 40rpx;
  775. box-sizing: border-box;
  776. .file-text-em{
  777. width: 400rpx;
  778. text-overflow: ellipsis;
  779. overflow: hidden;
  780. display: -webkit-box;
  781. -webkit-line-clamp: 1;
  782. line-clamp: 1;
  783. -webkit-box-orient: vertical;
  784. line-height: 44rpx;
  785. font-size: 28rpx;
  786. padding-right: 40rpx;
  787. box-sizing: border-box;
  788. position: relative;
  789. }
  790. .icon-shanchu1{
  791. width: 40rpx;
  792. height: 40rpx;
  793. line-height: 40rpx;
  794. display: block;
  795. position: absolute;
  796. top: 0;
  797. right:0;
  798. color: #f94b4b;
  799. font-size: 36rpx;
  800. }
  801. }
  802. &.file-none{
  803. width: 400rpx;
  804. position: relative;
  805. .file-none-button{
  806. width: 88rpx;
  807. height: 44rpx;
  808. background-color: #e15616;
  809. border-radius: 8rpx;
  810. line-height: 44rpx;
  811. text-align: center;
  812. font-size: 24rpx;
  813. color: #FFFFFF;
  814. position: absolute;
  815. right: 0;
  816. top: -15rpx;
  817. }
  818. }
  819. }
  820. .select .placeholder {
  821. position: relative;
  822. cursor: pointer;
  823. width: 100%;
  824. display: inline-block;
  825. }
  826. .icon-xiayibu{
  827. right: 0rpx;
  828. color: #b2b2b2;
  829. position: absolute;
  830. }
  831. .xiangliao{
  832. font-size: 26rpx;
  833. margin-right: 10rpx;
  834. color: #b2b2b2;
  835. }
  836. .icon-jiagexiangliao{
  837. color: #e15616 !important;
  838. }
  839. .pricecolor{
  840. margin-left: 10rpx;
  841. }
  842. .showflag{
  843. color: #b2b2b2;
  844. }
  845. .border-grey{
  846. width: 100%;
  847. resize: none;
  848. padding: 20rpx 0;
  849. height: 160rpx;
  850. border-bottom: 2rpx solid #e1e1e1;
  851. }
  852. .release-main-container {
  853. overflow: hidden;
  854. margin: 20rpx 0;
  855. }
  856. .uploadGoodsImages{
  857. display: flex;
  858. overflow-x: auto;
  859. overflow-y: hidden;
  860. }
  861. .secondradio{
  862. .row-radio{
  863. transform: scale(.8);
  864. }
  865. .row-input{margin-right: 10rpx;}
  866. }
  867. .linqi_text .p{
  868. font-size: $font-size-20;
  869. }
  870. .upload-file {
  871. float: left;
  872. margin: 20rpx 20rpx 20rpx 0px;
  873. cursor: pointer;
  874. width: 194rpx;
  875. height: 194rpx;
  876. border-radius: 6rpx;
  877. border: solid 2rpx #e1e1e1;
  878. flex-shrink: 0;
  879. position: relative;
  880. display: inline-block;
  881. }
  882. .input-file {
  883. width: 194rpx;
  884. height: 194rpx;
  885. opacity: 0;
  886. cursor: pointer;
  887. position: absolute;
  888. }
  889. .add-text {
  890. font-size: 26rpx;
  891. color: #333330;
  892. opacity: 0.5;
  893. position: absolute;
  894. top: 55%;
  895. right:24%;
  896. }
  897. .upload-img {
  898. width: 100%;
  899. height: 100%;
  900. display: block;
  901. border-radius: .53vw;
  902. }
  903. .icon-shangchuantupian{
  904. width: 46rpx;
  905. height: 46rpx;
  906. color: #b2b2b2;
  907. font-size: 18px;
  908. position: absolute;
  909. top: 30%;
  910. left: 40%;
  911. }
  912. .icon-shanchu1{
  913. width: 40rpx;
  914. height: 40rpx;
  915. line-height: 40rpx;
  916. display: block;
  917. position: absolute;
  918. top: -15rpx;
  919. right:-18rpx;
  920. color: #f94b4b;
  921. font-size: 36rpx;
  922. }
  923. .wen-tips {
  924. width: 664rpx;
  925. height: 68rpx;
  926. line-height: 68rpx;
  927. text-align: center;
  928. color: #FFF;
  929. font-size: 20rpx;
  930. background-color: #1890f9;
  931. box-shadow: 0 0.8vw 1.6vw 0 rgba(24, 144, 249, 0.17);
  932. border-radius: 2rpx;
  933. display: none;
  934. }
  935. .form-upload-tips:hover .wen-tips {
  936. display: block;
  937. }
  938. .textarea-wrapper {
  939. letter-spacing: 2rpx;
  940. line-height: 48rpx;
  941. color: #333333;
  942. position: relative;
  943. font-size: 28rpx;
  944. border: 2rpx solid #b2b2b2;
  945. height: 300rpx;
  946. padding: 16rpx;
  947. border-radius: 6rpx;
  948. margin: 20rpx 0;
  949. }
  950. .textarea-wrapper textarea{
  951. width: 100%;
  952. }
  953. .word-limit {
  954. position: absolute;
  955. right: 2.7vw;
  956. bottom: 2.7vw;
  957. font-size: 3.2vw;
  958. color: #9aa5b5;
  959. }
  960. .smText{
  961. color: #999999;
  962. text-align: left;
  963. line-height: 42rpx;
  964. font-size: 24rpx;
  965. margin-top: 10rpx;
  966. width: 100%;
  967. height: 260rpx;
  968. }
  969. .BtnAll{
  970. width: 100%;
  971. margin-bottom: 20rpx;
  972. .btn-submit{
  973. width: 600rpx;
  974. height: 90rpx;
  975. margin: auto;
  976. text-align: center;
  977. line-height: 90rpx;
  978. color: #fff;
  979. background-image: linear-gradient(315deg,
  980. #f28f31 0%,
  981. #e15616 100%);
  982. border-radius: 90rpx;
  983. font-size: 30rpx;
  984. }
  985. }
  986. .row.Read{
  987. border: 0;
  988. text-align: center;
  989. color: #999999;
  990. }
  991. .thebj {
  992. position: fixed;
  993. left: 0;
  994. top: 0;
  995. bottom: 0;
  996. width: 100%;
  997. height: 100%;
  998. background-color: rgba(0, 0, 0, .5);
  999. z-index: 999999;
  1000. opacity: 0;
  1001. }
  1002. .thebj.show{
  1003. opacity: 1;
  1004. }
  1005. .theresult {
  1006. position: absolute;
  1007. top: 50%;
  1008. left: 50%;
  1009. transform: translate(-50%, -50%);
  1010. width:580rpx;
  1011. background-color: #fff;
  1012. border-radius: 32rpx;
  1013. }
  1014. .theresult .title{
  1015. line-height: 100rpx;
  1016. text-align: center;
  1017. display: block;
  1018. color: #333333;
  1019. font-size: 30rpx;
  1020. font-weight: bold;
  1021. border-bottom: 2rpx solid #efefef;
  1022. }
  1023. .theresult .content{
  1024. padding: 30rpx 52rpx;
  1025. line-height: 48rpx;
  1026. color: #666666;
  1027. font-size: 30rpx;
  1028. display: block;
  1029. }
  1030. .paybtn{
  1031. width: 100%;
  1032. height: 90rpx;
  1033. float: left;
  1034. .btn{
  1035. width: 50%;
  1036. height: 90rpx;
  1037. text-align: center;
  1038. line-height: 90rpx;
  1039. font-size: 30rpx;
  1040. display: inline-block;
  1041. float: left;
  1042. &.cancel{
  1043. background-color: #efefef;
  1044. border-radius: 0rpx 0rpx 0rpx 32rpx;
  1045. color: #999999;
  1046. }
  1047. &.confirm{
  1048. background-image: linear-gradient(270deg, #f28f31 0%, #e15616 100%);
  1049. border-radius: 0rpx 0rpx 32rpx 0rpx;
  1050. color: #fff;
  1051. }
  1052. }
  1053. }
  1054. .icon-wenhao{
  1055. color: #1890f9;
  1056. font-size: 35rpx;
  1057. width: 50rpx;
  1058. }
  1059. .form-upload-tips:hover .wen-tips {display: block;}
  1060. .tui-popup-box {
  1061. z-index: 22;
  1062. width: 702rpx;
  1063. padding: 24rpx 24rpx 36rpx 24rpx;
  1064. height: 670rpx;
  1065. position: relative;
  1066. .icon-iconfontguanbi{
  1067. font-size: 40rpx;
  1068. color: #b2b2b2;
  1069. width: 60rpx;
  1070. float: right;
  1071. display: block;
  1072. }
  1073. .content{
  1074. .freight-radio{
  1075. height: 66rpx;
  1076. line-height: 66rpx;
  1077. padding: 0 35rpx;
  1078. .row-group{
  1079. width: 100%;
  1080. // max-height: 605rpx;
  1081. // overflow: auto;
  1082. }
  1083. .row-input{
  1084. height: 66rpx;
  1085. line-height: 66rpx;
  1086. width: 100%;
  1087. display: block;
  1088. }
  1089. .row-radio{
  1090. float: right;
  1091. transform: scale(0.9);
  1092. color: #b2b2b2;
  1093. }
  1094. .row-text{
  1095. font-size: $font-size-28;
  1096. color: #666666;
  1097. float: left;
  1098. }
  1099. }
  1100. }
  1101. }
  1102. checkbox .wx-checkbox-input{
  1103. border-radius: 50%;
  1104. }
  1105. .row-check{
  1106. transform: scale(0.8);
  1107. }
  1108. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  1109. background: #E15616;
  1110. border: 2rpx solid #e15616;
  1111. }
  1112. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1113. border-radius: 50%;
  1114. border: 2rpx solid #e15616;
  1115. width: 34rpx;
  1116. height: 34rpx;
  1117. line-height: 34rpx;
  1118. text-align: center;
  1119. font-size:34rpx;
  1120. color:#fff;
  1121. background: transparent;
  1122. transform:translate(-50%, -50%) scale(.8);
  1123. -webkit-transform:translate(-50%, -50%) scale(.8);
  1124. }
  1125. </style>