form-seller.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128
  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>
  20. <view class="row fenlei" v-if="isShow">
  21. <view class="secondradio Secondary" >
  22. <checkbox-group class="row-group" @change="secondHandType">
  23. <label class="row-input" v-for="(item, index) in radioList" :key="item.value" >
  24. <checkbox class="row-check" :value="item.value" ></checkbox>
  25. <view class="row-text">{{item.name}}</view>
  26. </label>
  27. </checkbox-group>
  28. </view>
  29. </view>
  30. <view class="row">
  31. <view class="label">商品品牌</view>
  32. <view class="select spacing" @click="hanldOperationConfim">
  33. <view class="placeholder" :style="brandname=='请选择品牌名称'?'':'color:#333333'">{{brandname}}</view>
  34. </view>
  35. <text class="iconfont icon-xiayibu"></text>
  36. <!-- 品牌弹窗 -->
  37. <tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup()">
  38. <view class="tui-popup-box clearfix">
  39. <text class="iconfont icon-iconfontguanbi" @click="hidePopup()"></text>
  40. <view class="content">
  41. <view class="freight-radio">
  42. <scroll-view scroll-y style="max-height: 605rpx;">
  43. <radio-group class="row-group" @change="radioChange" >
  44. <label class="row-input" v-for="(item, index) in BrandList" :key="item.id">
  45. <view class="row-text">{{item.name}}</view>
  46. <radio class="row-radio" :value="item.id" color="#E15616"/>
  47. </label>
  48. </radio-group>
  49. </scroll-view>
  50. </view>
  51. </view>
  52. </view>
  53. </tui-bottom-popup>
  54. </view>
  55. <view class="row" v-if="secondParams.brandId==161">
  56. <view class="label">其它品牌</view>
  57. <view class="spacing">
  58. <input type="text" maxlength="40" v-model="secondParams.brandName" placeholder="请输入商品品牌" placeholder-class="placeholder">
  59. </view>
  60. </view>
  61. <view class="row">
  62. <view class="label">商品名称</view>
  63. <view class="spacing">
  64. <input type="text" maxlength="40" v-model="secondParams.name" placeholder="请输入商品名称,不超过40个汉字" placeholder-class="placeholder">
  65. </view>
  66. </view>
  67. <view class="row">
  68. <view class="label">出厂日期</view>
  69. <view class="spacing">
  70. <input type="text" v-model="secondParams.fixedYears" maxlength="10" placeholder="请输入出厂日期 如:2020年06月" placeholder-class="placeholder">
  71. </view>
  72. </view>
  73. <!-- <view class="row" v-show="secondParams.secondHandType==2">
  74. <view class="label second">产品到期日</view>
  75. <view class="spacing second">
  76. <input type="text" v-model="secondParams.maturityYears" maxlength="10" placeholder="请输入产品到期日,如:2020年12月" placeholder-class="placeholder">
  77. </view>
  78. </view> -->
  79. <view class="row">
  80. <view class="label">公司名称</view>
  81. <view class="spacing">
  82. <input type="text" v-model="secondParams.companyName" maxlength="30" placeholder="请输入公司名称,不超过30个汉字" placeholder-class="placeholder">
  83. </view>
  84. </view>
  85. <view class="row">
  86. <view class="label">交易价</view>
  87. <view class="spacing">
  88. <input type="text" maxlength="20" v-model="secondParams.price" placeholder="请输入交易价" placeholder-class="placeholder">
  89. </view>
  90. </view>
  91. <view style="margin-top: 15rpx;">
  92. <label v-model="secondParams.detailTalkFlags" class="iconfont xiangliao"
  93. :class="vShow_detailTalkFlag ? 'icon-jiagexiangliao':'icon-juxingweigouxuan'" @click="Detailed($event)">
  94. <label class='pricecolor' >价格详聊</label>
  95. </label>
  96. <label class="showflag" v-show="vShow_detailTalkFlag">(勾选代表同意不显示交易价)</label>
  97. </view>
  98. <!-- <view class="row" v-show="secondParams.secondHandType==2">
  99. <view class="label">市场价</view>
  100. <view class="spacing">
  101. <input type="text" v-model="secondParams.normalPrice" maxlength="30" placeholder="请输入市场价" placeholder-class="placeholder">
  102. </view>
  103. </view> -->
  104. <!-- <view class="row" v-show="secondParams.secondHandType==2">
  105. <view class="label second">采购价/原价</view>
  106. <view class="spacing second">
  107. <input type="text" v-model="secondParams.originalPrice" maxlength="30" placeholder="请输入采购价/原价" placeholder-class="placeholder"/>
  108. </view>
  109. </view>
  110. <view class="row" v-show="secondParams.secondHandType==2">
  111. <view class="label">数量</view>
  112. <view class="spacing">
  113. <input type="text" v-model="secondParams.stock" maxlength="30" placeholder="请输入数量" placeholder-class="placeholder">
  114. </view>
  115. </view> -->
  116. <view class="row">
  117. <view class="label">商品成色</view>
  118. <view class="spacing">
  119. <input type="text" maxlength="10" v-model="secondParams.productQuality" placeholder="请输入商品成色,如“9成新”" placeholder-class="placeholder">
  120. </view>
  121. </view>
  122. <view class="row">
  123. <view class="label">联系人</view>
  124. <view class="spacing">
  125. <input type="text" maxlength="15" v-model="secondParams.contactName" placeholder="请输入联系人姓名" placeholder-class="placeholder">
  126. </view>
  127. </view>
  128. <view class="row">
  129. <view class="label">联系方式</view>
  130. <view class="spacing">
  131. <input type="text" v-model="secondParams.contactMobile" maxlength="11" placeholder="请输入联系人手机号" placeholder-class="placeholder">
  132. </view>
  133. </view>
  134. <view class="row none">
  135. <view class="label-im">身份验证照片</view>
  136. <view class="label-em">个人请上传身份证正面照片;机构请上传营业执照照片(图片大小不超过5M)</view>
  137. <view class="release-input upload image uploadGoodsImages" >
  138. <view class="upload-file" v-if="secondParams.authenticationImage == ''">
  139. <i class="iconfont icon-shangchuantupian"></i>
  140. <text class="add-text">验证照片</text>
  141. <view ref="goodsImages" class="input-file" @click="uploadUserImageFn"></view>
  142. </view>
  143. <view class="upload-file" v-else>
  144. <image :src="secondParams.authenticationImage" alt="" class="upload-img" ></image>
  145. <i class=" del iconfont icon-shanchu1" @click="removeUserImageFn"></i>
  146. </view>
  147. </view>
  148. </view>
  149. <view class="row">
  150. <view class="label">采美对接人</view>
  151. <view class="spacing">
  152. <input type="text" v-model="secondParams.dockingPeopleName" maxlength="15" placeholder="请输入采美对接人姓名" placeholder-class="placeholder">
  153. </view>
  154. </view>
  155. <view class="row">
  156. <view class="label">对接人联系方式</view>
  157. <view class="spacing">
  158. <input type="text" v-model="secondParams.dockingPeopleMobile" maxlength="11" placeholder="请输入采美对接人手机号" placeholder-class="placeholder">
  159. </view>
  160. </view>
  161. <view class="row">
  162. <view class="label">商品类型</view>
  163. <view class="secondradio">
  164. <radio-group class="row-group" @change="getProductType" >
  165. <label class="row-input" v-for="(item, index) in beauty" :key="index">
  166. <radio class="row-radio" :value="item.value" color="#E15616"/>
  167. <view class="row-text">{{item.name}}</view>
  168. </label>
  169. </radio-group>
  170. </view>
  171. </view>
  172. <view class="row" >
  173. <view class="label">联系地址</view>
  174. <view class="spacing" @click="showMulLinkageThreePicker">
  175. <text class="row-input" :class="addressData.address === '请选择所在地区' ? 'none,placeholder' : ''" >
  176. {{addressData.address}}
  177. </text>
  178. </view>
  179. <text class="iconfont icon-xiayibu"></text>
  180. </view>
  181. <textarea type="text"
  182. class="border-grey address-details"
  183. v-model="secondParams.address"
  184. maxlength="50"
  185. placeholder="请填写详细地址,如街道/小区/门牌等"
  186. placeholder-class="placeholder"/>
  187. </textarea>
  188. <view class="release-main-container">
  189. <view class="release-from">
  190. <view class="label">商品图片</view>
  191. <view class="release-input upload image uploadGoodsImages" >
  192. <view class="upload-file" v-if="GoodsImagesList.length<5">
  193. <i class="iconfont icon-shangchuantupian"></i>
  194. <p class="add-text">商品图片</p>
  195. <view ref="goodsImages" class="input-file" @click="uploadGoodsImagesFn"></view>
  196. </view>
  197. <view class="upload-file" v-for="(item, index) in GoodsImagesList" :key="index">
  198. <image :data-original='item' :src="item" :data-image="item" alt="" class="upload-img" ></image>
  199. <i class=" del iconfont icon-shanchu1" @click="removeGoodsImagesFn(index)"></i>
  200. </view>
  201. </view>
  202. <view class="form-upload-tips">
  203. <i class="iconfont icon-wenhao" ></i>
  204. <view class="wen-tips" >最多上传5张二手商品图片,请尽量全部上传,单张图片不能超过5M</view>
  205. </view>
  206. </view>
  207. </view>
  208. <view class="row">
  209. <view class="label-im">二手出让承诺函文件:</view>
  210. <view class="label-em">(文件大小不超过20M)</view>
  211. <view class="spacing file-none" v-if="secondParams.fileName == ''">
  212. <view class="file-none-button" @click="uploadCommitmentFile">上传</view>
  213. </view>
  214. <view class="spacing file-text" v-else>
  215. <text class="file-text-em">{{ secondParams.fileName }}</text>
  216. <i class=" del iconfont icon-shanchu1" @click="deleteCommitmentFile"></i>
  217. </view>
  218. </view>
  219. <view class="row none">
  220. <view class="label-im">二手出让承诺函图片</view>
  221. <view class="label-em">(若不方便上传承诺函文件,可对承诺函进行拍照或者截图,再上传图片)</view>
  222. <view class="label-em">图片大小不超过5M</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. ],
  307. beauty:[
  308. {name:'医美',value:'1'},
  309. {name:'非医美',value:'2'},
  310. ],
  311. BrandList:[],
  312. isShow:false,
  313. GoodsImagesList:[],
  314. secondParams:{
  315. secondHandType:'',//一级分类
  316. instrumentType:'',//二手仪器分类
  317. name:'',
  318. brandId:'',//品牌ID
  319. brandName:'',//其他品牌
  320. fixedYears:'',//出厂
  321. companyName:'',//公司名称
  322. maturityYears:'',//产品到期
  323. price:'',//交易价
  324. detailTalkFlag:1,//是否启用详聊
  325. normalPrice:'',//市场价
  326. originalPrice:'',//采购价
  327. stock:'',//数量
  328. productQuality:'',//商品成色
  329. contactName:'',//联系人
  330. contactMobile:'',//联系方式
  331. authenticationImage:'',//身份验证图片
  332. commitmentImage:'',//承诺函图片
  333. dockingPeopleName:'',//采美对接人姓名
  334. dockingPeopleMobile:'',//采美对接人手机号
  335. secondProductType:'',//
  336. townId:'',//县区地址
  337. address:'',//详细地址
  338. image:'',//图片
  339. fileName:'',
  340. ossName:'',
  341. productDetails:'',//商品详细信息
  342. source:4//二手发布来源.1:WWW,2:小程序,3:后台,4:协销
  343. },
  344. addressData:{
  345. address:'请选择所在地区',
  346. townID:'', //区ID
  347. cityID:'', //区ID
  348. provinceID:'', //区ID
  349. addressDetail: '', //地址
  350. },
  351. brandname:'请选择品牌名称',
  352. checkbox:false,
  353. shoplogoTwo:false,
  354. PopupShow:false,
  355. tipsContentText:'发布二手商品,采美需要收取您每个商品100元的展示费,展示期为3个月支付完成后,商品会在1-2个工作日内进行审核,审核通过后,商品会立即上线',
  356. cancelButtonText:'取消发布',
  357. confirmButtonText:'去支付',
  358. isButtonsType:0,
  359. resultBj:false,
  360. vShow_detailTalkFlag:false,
  361. playid:'',
  362. }
  363. },
  364. methods:{
  365. onTextareaInputInfo(e){
  366. this.secondParams.productDetails = e.detail.value
  367. },
  368. radioChange(e){//品牌
  369. this.secondParams.brandId = e.target.value
  370. this.BrandList.forEach((item,index)=>{
  371. if(item.id==this.secondParams.brandId){
  372. this.brandname = item.name
  373. this.popupShow = false
  374. }
  375. })
  376. },
  377. showMulLinkageThreePicker() {//三级地址联动
  378. this.isShowInput = true
  379. this.$refs.mpvueCityPicker.show()
  380. },
  381. onConfirm(e) {//获取选择的地址信息
  382. this.addressData.address = e.name
  383. this.addressData.townID = e.townCode
  384. this.addressData.cityID = e.cityCode
  385. this.addressData.provinceID = e.provinceCode
  386. this.secondParams.townId = this.addressData.townID
  387. },
  388. hanldOperationConfim(){
  389. this.popupShow = true
  390. },
  391. hidePopup(){
  392. this.popupShow = false
  393. },
  394. secondHandRidio(e) {
  395. this.secondParams.secondHandType = e.target.value
  396. if (e.target.value == 1){
  397. this.isShow = true
  398. this.secondParams.instrumentType = '1'
  399. }else {
  400. this.isShow = false
  401. }
  402. },
  403. secondHandType(e){ //二手仪器
  404. this.secondParams.instrumentType = e.target.value.toString()
  405. },
  406. Detailed(){
  407. this.vShow_detailTalkFlag = !this.vShow_detailTalkFlag
  408. if(this.vShow_detailTalkFlag){
  409. this.secondParams.detailTalkFlag = 2 //启用价格详聊
  410. }else {
  411. this.secondParams.detailTalkFlag = 1 //不启用价格详聊
  412. }
  413. },
  414. uploadGoodsImagesFn(event){//上传商品图片
  415. uploadFileImage().then(res =>{
  416. this.GoodsImagesList.push(JSON.parse(res.data).data)
  417. this.secondParams.image =this.GoodsImagesList.toString()+','
  418. })
  419. },
  420. uploadUserImageFn(event){//上传身份图片
  421. uploadFileImage().then(res =>{
  422. this.secondParams.authenticationImage = JSON.parse(res.data).data
  423. })
  424. },
  425. uploadCommitmentImageFn(event){//上传承诺函图片
  426. uploadFileImage().then(res =>{
  427. this.secondParams.commitmentImage = JSON.parse(res.data).data
  428. })
  429. },
  430. uploadCommitmentFile(){//上传承诺函文件
  431. uploadFilePdf().then(res =>{
  432. let data = JSON.parse(res.data).data
  433. this.secondParams.fileName = uni.getStorageSync('fileName')
  434. this.secondParams.ossName = data.ossName
  435. console.log('fileName',this.secondParams.fileName)
  436. console.log('ossName',this.secondParams.ossName)
  437. })
  438. },
  439. deleteCommitmentFile(){//删除承诺函文件
  440. this.secondParams.fileName = ''
  441. },
  442. removeGoodsImagesFn(index){//删除商品图片
  443. this.GoodsImagesList.splice(index,1)
  444. this.secondParams.image =this.GoodsImagesList.toString()+','
  445. },
  446. removeUserImageFn(index){//删除身份图片
  447. this.secondParams.authenticationImage = ''
  448. },
  449. removeCommitmentImageFn(index){//删除承诺函图片
  450. this.secondParams.commitmentImage = ''
  451. },
  452. getProductType(e){
  453. this.secondParams.secondProductType = e.target.value
  454. },
  455. submitBtn () {
  456. if(this.secondParams.secondHandType == ''){
  457. this.$util.msg('请选择分类',2000)
  458. return
  459. }
  460. if(this.secondParams.secondHandType == 1 ){
  461. if(this.secondParams.instrumentType ==''){
  462. this.$util.msg('请完善仪器分类',2000)
  463. return
  464. }
  465. }
  466. if(this.secondParams.brandId == ''){
  467. this.$util.msg('请选择商品品牌',2000)
  468. return
  469. }
  470. if(this.secondParams.name == ''){
  471. this.$util.msg('请输入商品名称',2000)
  472. return
  473. }
  474. // if(this.secondParams.secondHandType ==2) {
  475. // if (this.secondParams.maturityYears=='') {
  476. // this.$util.msg('请输入产品到期日',2000);
  477. // return
  478. // }
  479. // }
  480. if(!this.$api.isNumber(this.secondParams.price)){
  481. this.$util.msg('请输入交易价',2000)
  482. return
  483. }
  484. // if(this.secondParams.secondHandType ==2) {
  485. // if (!this.$api.isNumber(this.secondParams.normalPrice)) {
  486. // this.$util.msg('请输入市场价',2000);
  487. // return
  488. // }
  489. // if(!this.$api.isNumber(this.secondParams.originalPrice)){
  490. // this.$util.msg('请输入采购价/原价',2000);
  491. // return
  492. // }
  493. // if(!this.$api.isNumber(this.secondParams.stock)){
  494. // this.$util.msg('请输入数量',2000);
  495. // return
  496. // }
  497. // }
  498. if(this.secondParams.productQuality == ''){
  499. this.$util.msg('请输入商品成色',2000)
  500. return
  501. }
  502. if(this.secondParams.contactName == ''){
  503. this.$util.msg('请输入联系人姓名',2000)
  504. return
  505. }
  506. if(this.secondParams.contactMobile == ''){
  507. console.log(this.secondParams.contactMobile)
  508. this.$util.msg('请输入联系方式',2000)
  509. return
  510. }
  511. if(!$reg.isMobile(this.secondParams.contactMobile)){
  512. this.$util.msg('请填写正确的手机号',2000)
  513. return
  514. }
  515. if(this.userIdentity === 1){
  516. if(this.secondParams.dockingPeopleName == ''){
  517. this.$util.msg('请输入采美对接人姓名',2000)
  518. return
  519. }
  520. if(this.secondParams.dockingPeopleMobile == ''){
  521. this.$util.msg('请输入采美对接人手机号',2000)
  522. return
  523. }
  524. }
  525. if(this.secondParams.dockingPeopleMobile !=''){
  526. if(!$reg.isMobile(this.secondParams.dockingPeopleMobile)){
  527. this.$util.msg('请填写正确的采美对接人手机号',2000)
  528. return
  529. }
  530. }
  531. if(this.secondParams.townId == ''|| this.secondParams.townId == undefined){
  532. this.$util.msg('请完善联系地址',2000)
  533. return
  534. }
  535. if(this.secondParams.address == ''){
  536. this.$util.msg('请填写详细地址',2000)
  537. return
  538. }
  539. if(this.GoodsImagesList ==''){
  540. this.$util.msg('请上传图片',2000)
  541. return
  542. }
  543. if(this.checkbox==false){
  544. this.$util.msg('请勾选已阅读',2000)
  545. return
  546. }
  547. console.log(this.secondParams)
  548. if(this.secondParams.authenticationImage == ''){
  549. this.PopupShow = true
  550. this.tipsContentText = '上传身份验证照片,您的二手商品将获得更好的推荐推荐和曝光,方便您快速卖出。'
  551. this.cancelButtonText = '继续发布'
  552. this.confirmButtonText = '去上传'
  553. this.isButtonsType = 1
  554. return
  555. }
  556. if(this.secondParams.commitmentImage == '' || this.secondParams.ossName == ''){
  557. this.PopupShow = true
  558. this.tipsContentText = '上传二手出让承诺函,您的二手商品将获得更好的推荐推荐和曝光,方便您快速卖出。'
  559. this.cancelButtonText = '继续发布'
  560. this.confirmButtonText = '去上传'
  561. this.isButtonsType = 1
  562. return
  563. }
  564. this.SecondHandProduct(this.secondParams)
  565. },
  566. SecondHandProduct(params){//提交发布
  567. this.SecondService.SecondHandProduct(params).then(res=>{
  568. this.PopupShow = true
  569. this.tipsContentText = '发布二手商品,采美需要收取您每个商品100元的展示费,展示期为3个月支付完成后,商品会在1-2个工作日内进行审核,审核通过后,商品会立即上线'
  570. this.cancelButtonText = '取消发布'
  571. this.confirmButtonText = '去支付'
  572. this.isButtonsType = 2
  573. this.playid= res.data
  574. }).catch(error =>{
  575. this.$util.msg(error.msg,2000)
  576. this.secondBj = false
  577. return
  578. })
  579. },
  580. cancelButtonFn(){//弹窗操作按钮
  581. switch(this.isButtonsType){
  582. case 1:
  583. this.SecondHandProduct(this.secondParams)
  584. break
  585. case 2:
  586. this.PopupShow = false
  587. break
  588. }
  589. },
  590. confirmButtonFn(){//弹窗操作按钮
  591. switch(this.isButtonsType){
  592. case 1:
  593. this.PopupShow = false
  594. break
  595. case 2:
  596. this.MiniWxPayFor()
  597. this.PopupShow = false
  598. break
  599. }
  600. },
  601. MiniWxPayFor(){
  602. authorize.getCode('weixin').then(wechatcode =>{
  603. let params ={
  604. code:wechatcode,
  605. productId:this.playid
  606. }
  607. this.PayService.SecondHandPay(params).then(response =>{
  608. let PayInfo = JSON.parse(response.data.data.payInfo)
  609. this.WxRequestPayment(PayInfo)
  610. }).catch(error =>{
  611. this.$util.msg(error.msg,2000)
  612. })
  613. })
  614. },
  615. WxRequestPayment(data){
  616. let self = this
  617. wx.requestPayment({
  618. 'timeStamp': data.timeStamp,
  619. 'nonceStr': data.nonceStr,
  620. 'package': data.package,
  621. 'signType': data.signType,
  622. 'paySign': data.paySign,
  623. 'success':function(res){
  624. wx.reLaunch({url: '/pages/second/product/product-list'})
  625. },
  626. 'fail':function(res){
  627. self.$util.msg('用户取消支付~')
  628. },
  629. 'complete':function(res){
  630. }
  631. })
  632. },
  633. changeBox:function () {
  634. this.checkbox = !this.checkbox
  635. },
  636. },
  637. onShow() {
  638. this.SecondService.brandList().then(res =>{//品牌列表
  639. if(res.code == 0){
  640. this.BrandList = res.data
  641. }
  642. })
  643. this.$api.getComStorage('userInfo').then((resolve) =>{
  644. this.userIdentity = resolve.userIdentity
  645. console.log(this.userIdentity)
  646. }).catch(error =>{
  647. console.log(error)
  648. })
  649. }
  650. }
  651. </script>
  652. <style lang="scss">
  653. view{font-size: 28rpx;}
  654. .my-maintenance{
  655. padding: 20rpx;
  656. }
  657. .bannerimg {
  658. height: 66rpx;
  659. width: 100%;
  660. }
  661. .bannerimg image{
  662. width: 100%;
  663. height: 100% ;
  664. }
  665. .newsTitle {
  666. line-height: 48rpx;
  667. text-align: left;
  668. color: #e15616;
  669. padding:20rpx;
  670. background-color: rgba(225, 86, 22, .1);
  671. }
  672. .nestext{
  673. font-size: 24rpx;
  674. }
  675. .secondradio view{
  676. display: inline-block;
  677. color: #333333;
  678. margin-right: 21rpx;
  679. }
  680. .secondradio{
  681. display: inline-block;
  682. margin-left: 40rpx;
  683. }
  684. .Secondary{
  685. margin-left: 96rpx;
  686. }
  687. .secondradio view.active {
  688. color: #e15616;
  689. }
  690. .placeholder{
  691. color: #b2b2b2;
  692. }
  693. .linqi_text {
  694. width: 607rpx;
  695. height: 68rpx;
  696. background-color: #1890f9;
  697. box-shadow: 0rpx 4rpx 6rpx 0rpx rgba(24, 144, 249, 0.17);
  698. text-align: center;
  699. line-height: 68rpx;
  700. color: #ffffff;
  701. margin: auto;
  702. font-size:24rpx;
  703. position: relative;
  704. }
  705. .jiaobiao {
  706. width: 0;
  707. height: 0;
  708. border-left: 20rpx solid transparent;
  709. border-right: 20rpx solid transparent;
  710. top: -25%;
  711. right: 40%;
  712. border-bottom: 20rpx solid #1890f9;
  713. position: absolute;
  714. }
  715. .label{
  716. color: #666666;
  717. display: inline-block;
  718. }
  719. .label-im{
  720. width: 100%;
  721. line-height: 50rpx;
  722. font-size: $font-size-28;
  723. color: #666666;
  724. text-align: left;
  725. margin-top: 20rpx;
  726. }
  727. .label-em{
  728. line-height: 28rpx;
  729. font-size: $font-size-20;
  730. color: #fea785;
  731. width: 100%;
  732. text-align: left;
  733. }
  734. .label.second{
  735. width: 155rpx;
  736. }
  737. .row .spacing.second{
  738. width: 70%;
  739. }
  740. .row{
  741. border-bottom: 2rpx solid #e1e1e1;
  742. line-height: 90rpx;
  743. height: auto;
  744. position: relative;
  745. &.none{
  746. border-bottom: none;
  747. }
  748. }
  749. .row.fenlei{
  750. height: auto;
  751. margin: 10rpx 0;
  752. border: 0;
  753. }
  754. .select {
  755. position: relative;
  756. color: #b2b2b2;
  757. text-align: left;
  758. user-select: none;
  759. }
  760. .row .spacing{
  761. display: inline-block;
  762. margin-left: 50rpx;
  763. width: 430rpx;
  764. vertical-align:middle;
  765. position: relative;
  766. &.file{
  767. width: 100%;
  768. }
  769. &.file-text{
  770. width: 100%;
  771. line-height: 44rpx;
  772. font-size: 28rpx;
  773. box-sizing: border-box;
  774. margin-left: 0;
  775. .file-text-em{
  776. width: 100%;
  777. text-overflow: ellipsis;
  778. overflow: hidden;
  779. display: -webkit-box;
  780. -webkit-line-clamp: 1;
  781. line-clamp: 1;
  782. -webkit-box-orient: vertical;
  783. line-height: 44rpx;
  784. font-size: 28rpx;
  785. padding-right: 40rpx;
  786. box-sizing: border-box;
  787. position: relative;
  788. }
  789. .icon-shanchu1{
  790. width: 40rpx;
  791. height: 40rpx;
  792. line-height: 40rpx;
  793. display: block;
  794. position: absolute;
  795. top: 0;
  796. right:0;
  797. color: #f94b4b;
  798. font-size: 36rpx;
  799. }
  800. }
  801. &.file-none{
  802. width: 100%;
  803. margin-left: 0;
  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: $btn-confirm;
  980. border-radius: 90rpx;
  981. font-size: 30rpx;
  982. }
  983. }
  984. .row.Read{
  985. border: 0;
  986. text-align: center;
  987. color: #999999;
  988. }
  989. .thebj {
  990. position: fixed;
  991. left: 0;
  992. top: 0;
  993. bottom: 0;
  994. width: 100%;
  995. height: 100%;
  996. background-color: rgba(0, 0, 0, .5);
  997. z-index: 999999;
  998. opacity: 0;
  999. }
  1000. .thebj.show{
  1001. opacity: 1;
  1002. }
  1003. .theresult {
  1004. position: absolute;
  1005. top: 50%;
  1006. left: 50%;
  1007. transform: translate(-50%, -50%);
  1008. width:580rpx;
  1009. background-color: #fff;
  1010. border-radius: 32rpx;
  1011. }
  1012. .theresult .title{
  1013. line-height: 100rpx;
  1014. text-align: center;
  1015. display: block;
  1016. color: #333333;
  1017. font-size: 30rpx;
  1018. font-weight: bold;
  1019. border-bottom: 2rpx solid #efefef;
  1020. }
  1021. .theresult .content{
  1022. padding: 30rpx 52rpx;
  1023. line-height: 48rpx;
  1024. color: #666666;
  1025. font-size: 30rpx;
  1026. display: block;
  1027. }
  1028. .paybtn{
  1029. width: 100%;
  1030. height: 90rpx;
  1031. float: left;
  1032. .btn{
  1033. width: 50%;
  1034. height: 90rpx;
  1035. text-align: center;
  1036. line-height: 90rpx;
  1037. font-size: 30rpx;
  1038. display: inline-block;
  1039. float: left;
  1040. &.cancel{
  1041. background-color: #efefef;
  1042. border-radius: 0rpx 0rpx 0rpx 32rpx;
  1043. color: #999999;
  1044. }
  1045. &.confirm{
  1046. background-image: linear-gradient(270deg, #f28f31 0%, #e15616 100%);
  1047. border-radius: 0rpx 0rpx 32rpx 0rpx;
  1048. color: #fff;
  1049. }
  1050. }
  1051. }
  1052. .icon-wenhao{
  1053. color: #1890f9;
  1054. font-size: 35rpx;
  1055. width: 50rpx;
  1056. }
  1057. .form-upload-tips:hover .wen-tips {display: block;}
  1058. .tui-popup-box {
  1059. z-index: 22;
  1060. width: 702rpx;
  1061. padding: 24rpx 24rpx 36rpx 24rpx;
  1062. height: 670rpx;
  1063. position: relative;
  1064. .icon-iconfontguanbi{
  1065. font-size: 40rpx;
  1066. color: #b2b2b2;
  1067. width: 60rpx;
  1068. float: right;
  1069. display: block;
  1070. }
  1071. .content{
  1072. .freight-radio{
  1073. height: 66rpx;
  1074. line-height: 66rpx;
  1075. padding: 0 35rpx;
  1076. .row-group{
  1077. width: 100%;
  1078. // max-height: 605rpx;
  1079. // overflow: auto;
  1080. }
  1081. .row-input{
  1082. height: 66rpx;
  1083. line-height: 66rpx;
  1084. width: 100%;
  1085. display: block;
  1086. }
  1087. .row-radio{
  1088. float: right;
  1089. transform: scale(0.9);
  1090. color: #b2b2b2;
  1091. }
  1092. .row-text{
  1093. font-size: $font-size-28;
  1094. color: #666666;
  1095. float: left;
  1096. }
  1097. }
  1098. }
  1099. }
  1100. checkbox .wx-checkbox-input{
  1101. border-radius: 50%;
  1102. }
  1103. .row-check{
  1104. transform: scale(0.8);
  1105. }
  1106. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  1107. background: #E15616;
  1108. border: 2rpx solid #e15616;
  1109. }
  1110. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1111. border-radius: 50%;
  1112. border: 2rpx solid #e15616;
  1113. width: 34rpx;
  1114. height: 34rpx;
  1115. line-height: 34rpx;
  1116. text-align: center;
  1117. font-size:34rpx;
  1118. color:#fff;
  1119. background: transparent;
  1120. transform:translate(-50%, -50%) scale(.8);
  1121. -webkit-transform:translate(-50%, -50%) scale(.8);
  1122. }
  1123. </style>