form.vue 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129
  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">个人请上传身份证正面照片;机构请上传营业执照照片(图片大小不超过5M)</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-im">二手出让承诺函文件:</view>
  212. <view class="label-em">(文件大小不超过20M)</view>
  213. <view class="spacing file-none" v-if="secondParams.fileName == ''">
  214. <view class="file-none-button" @click="uploadCommitmentFile">上传</view>
  215. </view>
  216. <view class="spacing file-text" v-else>
  217. <text class="file-text-em">{{ secondParams.fileName }}</text>
  218. <i class=" del iconfont icon-shanchu1" @click="deleteCommitmentFile"></i>
  219. </view>
  220. </view>
  221. <view class="row none">
  222. <view class="label-im">二手出让承诺函图片</view>
  223. <view class="label-em">(若不方便上传承诺函文件,可对承诺函进行拍照或者截图,再上传图片)</view>
  224. <view class="label-em">图片大小不超过5M</view>
  225. <view class="release-input upload image uploadGoodsImages" >
  226. <view class="upload-file" v-if="secondParams.commitmentImage == ''">
  227. <i class="iconfont icon-shangchuantupian"></i>
  228. <text class="add-text">承诺函图片</text>
  229. <view ref="goodsImages" class="input-file" @click="uploadCommitmentImageFn"></view>
  230. </view>
  231. <view class="upload-file" v-else>
  232. <image :src="secondParams.commitmentImage" alt="" class="upload-img" ></image>
  233. <i class=" del iconfont icon-shanchu1" @click="removeCommitmentImageFn"></i>
  234. </view>
  235. </view>
  236. </view>
  237. <view class="productinfo">
  238. <view class="label unlogin-label" style="width: 100%;">商品详细信息</view>
  239. <div class="textarea-wrapper">
  240. <textarea class="textarea"
  241. type="text"
  242. v-model="secondParams.productDetails"
  243. placeholder="请填写商品详细信息,对商品进行更详细的描述"
  244. placeholder-class="placeholder"
  245. maxlength="200"
  246. @input="onTextareaInputInfo"
  247. />
  248. <span class="word-limit">{{secondParams.productDetails.length}}/200</span>
  249. </div>
  250. </view>
  251. <view class="productinfo">
  252. <view class="label unlogin-label" style="width: 100%;">免责声明</view>
  253. <text class="smText" >鉴于本网站提供的二手版块信息包括但不限于公司名称,商品的简介、性能、描述与说明,相关图片、视频等均由卖家自行提供,由卖家对其提供的信息承担相应法律责任。买家应自行甄别商品信息并查验商品性状。本网站对二手版块中买卖双方的交易不提供任何形式的担保与保证,特此声明!</text>
  254. </view>
  255. <view class="row Read">
  256. <span @click="changeBox($event)" class="iconfont xiangliao"
  257. :class="checkbox?'icon-jiagexiangliao':'icon-juxingweigouxuan'" ><span style="margin-left: 10rpx;">已阅读</span></span>
  258. </view>
  259. <view class="BtnAll" :style="{ paddingBottom :isIphoneX ? '68rpx' : '0rpx' }">
  260. <view @click="submitBtn" class="btn-submit">发布</view>
  261. </view>
  262. </form>
  263. <!-- 地址弹窗 -->
  264. <mpvue-city-picker :themeColor="themeColor"
  265. ref="mpvueCityPicker"
  266. :pickerValueDefault="cityPickerValueDefault"
  267. @onCancel="onCancel"
  268. @onConfirm="onConfirm">
  269. </mpvue-city-picker>
  270. </view>
  271. <view class="secondBj thebj" v-show="PopupShow" :class="PopupShow ? 'show':''">
  272. <view class="bjmain theresult">
  273. <text class="title">发布提示</text>
  274. <text class="content"> {{ tipsContentText }} </text>
  275. <view class="paybtn">
  276. <view class="btn cancel" @click.stop="cancelButtonFn">{{ cancelButtonText }}</view>
  277. <view class="btn confirm" @click.stop="confirmButtonFn">{{ confirmButtonText }}</view>
  278. </view>
  279. </view>
  280. </view>
  281. <payment-record ref="payment" v-if="isRequest" :discernReceiptList="discernReceiptList" :receiptAmount="receiptAmount"></payment-record>
  282. </view>
  283. </template>
  284. <script>
  285. import mpvueCityPicker from '@/components/mpvue-citypicker/mpvueCityPicker.vue'
  286. import paymentRecord from '@/components/cm-module/orderDetails/paymentRecord'
  287. import { uploadFileImage , uploadFilePdf } from "@/services/public.js"
  288. import authorize from '@/common/config/authorize.js'
  289. import $reg from '@/common/config/common.js'
  290. import { mapState,mapMutations } from 'vuex';
  291. export default{
  292. name:'secondHandrelease',
  293. components:{
  294. mpvueCityPicker,
  295. paymentRecord,
  296. },
  297. data(){
  298. return{
  299. userIdentity:0,
  300. popupShow:false,
  301. fenlei:[
  302. {name:'二手仪器',value:'1'},
  303. // {name:'临期产品',value:'2'},
  304. {name:'其他',value:'3'},
  305. ],
  306. radioList:[
  307. {name:'美容仪器',value:'1',isChecked:false}
  308. ],
  309. beauty:[
  310. {name:'医美',value:'1'},
  311. {name:'非医美',value:'2'},
  312. ],
  313. BrandList:[],
  314. isShow:false,
  315. GoodsImagesList:[],
  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:'',//身份验证图片
  334. commitmentImage:'',//承诺函图片
  335. dockingPeopleName:'',//采美对接人姓名
  336. dockingPeopleMobile:'',//采美对接人手机号
  337. secondProductType:'',//
  338. townId:'',//县区地址
  339. address:'',//详细地址
  340. image:'',//图片
  341. fileName:'',
  342. ossName:'',
  343. productDetails:'',//商品详细信息
  344. source:2//二手发布来源.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: 100%;
  769. }
  770. &.file-text{
  771. width: 100%;
  772. line-height: 44rpx;
  773. font-size: 28rpx;
  774. box-sizing: border-box;
  775. margin-left: 0;
  776. .file-text-em{
  777. width: 100%;
  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: 100%;
  804. margin-left: 0;
  805. position: relative;
  806. .file-none-button{
  807. width: 88rpx;
  808. height: 44rpx;
  809. background-color: #e15616;
  810. border-radius: 8rpx;
  811. line-height: 44rpx;
  812. text-align: center;
  813. font-size: 24rpx;
  814. color: #FFFFFF;
  815. position: absolute;
  816. right: 0;
  817. top: -15rpx;
  818. }
  819. }
  820. }
  821. .select .placeholder {
  822. position: relative;
  823. cursor: pointer;
  824. width: 100%;
  825. display: inline-block;
  826. }
  827. .icon-xiayibu{
  828. right: 0rpx;
  829. color: #b2b2b2;
  830. position: absolute;
  831. }
  832. .xiangliao{
  833. font-size: 26rpx;
  834. margin-right: 10rpx;
  835. color: #b2b2b2;
  836. }
  837. .icon-jiagexiangliao{
  838. color: #e15616 !important;
  839. }
  840. .pricecolor{
  841. margin-left: 10rpx;
  842. }
  843. .showflag{
  844. color: #b2b2b2;
  845. }
  846. .border-grey{
  847. width: 100%;
  848. resize: none;
  849. padding: 20rpx 0;
  850. height: 160rpx;
  851. border-bottom: 2rpx solid #e1e1e1;
  852. }
  853. .release-main-container {
  854. overflow: hidden;
  855. margin: 20rpx 0;
  856. }
  857. .uploadGoodsImages{
  858. display: flex;
  859. overflow-x: auto;
  860. overflow-y: hidden;
  861. }
  862. .secondradio{
  863. .row-radio{
  864. transform: scale(.8);
  865. }
  866. .row-input{margin-right: 10rpx;}
  867. }
  868. .linqi_text .p{
  869. font-size: $font-size-20;
  870. }
  871. .upload-file {
  872. float: left;
  873. margin: 20rpx 20rpx 20rpx 0px;
  874. cursor: pointer;
  875. width: 194rpx;
  876. height: 194rpx;
  877. border-radius: 6rpx;
  878. border: solid 2rpx #e1e1e1;
  879. flex-shrink: 0;
  880. position: relative;
  881. display: inline-block;
  882. }
  883. .input-file {
  884. width: 194rpx;
  885. height: 194rpx;
  886. opacity: 0;
  887. cursor: pointer;
  888. position: absolute;
  889. }
  890. .add-text {
  891. font-size: 26rpx;
  892. color: #333330;
  893. opacity: 0.5;
  894. position: absolute;
  895. top: 55%;
  896. right:24%;
  897. }
  898. .upload-img {
  899. width: 100%;
  900. height: 100%;
  901. display: block;
  902. border-radius: .53vw;
  903. }
  904. .icon-shangchuantupian{
  905. width: 46rpx;
  906. height: 46rpx;
  907. color: #b2b2b2;
  908. font-size: 18px;
  909. position: absolute;
  910. top: 30%;
  911. left: 40%;
  912. }
  913. .icon-shanchu1{
  914. width: 40rpx;
  915. height: 40rpx;
  916. line-height: 40rpx;
  917. display: block;
  918. position: absolute;
  919. top: -15rpx;
  920. right:-18rpx;
  921. color: #f94b4b;
  922. font-size: 36rpx;
  923. }
  924. .wen-tips {
  925. width: 664rpx;
  926. height: 68rpx;
  927. line-height: 68rpx;
  928. text-align: center;
  929. color: #FFF;
  930. font-size: 20rpx;
  931. background-color: #1890f9;
  932. box-shadow: 0 0.8vw 1.6vw 0 rgba(24, 144, 249, 0.17);
  933. border-radius: 2rpx;
  934. display: none;
  935. }
  936. .form-upload-tips:hover .wen-tips {
  937. display: block;
  938. }
  939. .textarea-wrapper {
  940. letter-spacing: 2rpx;
  941. line-height: 48rpx;
  942. color: #333333;
  943. position: relative;
  944. font-size: 28rpx;
  945. border: 2rpx solid #b2b2b2;
  946. height: 300rpx;
  947. padding: 16rpx;
  948. border-radius: 6rpx;
  949. margin: 20rpx 0;
  950. }
  951. .textarea-wrapper textarea{
  952. width: 100%;
  953. }
  954. .word-limit {
  955. position: absolute;
  956. right: 2.7vw;
  957. bottom: 2.7vw;
  958. font-size: 3.2vw;
  959. color: #9aa5b5;
  960. }
  961. .smText{
  962. color: #999999;
  963. text-align: left;
  964. line-height: 42rpx;
  965. font-size: 24rpx;
  966. margin-top: 10rpx;
  967. width: 100%;
  968. height: 260rpx;
  969. }
  970. .BtnAll{
  971. width: 100%;
  972. margin-bottom: 20rpx;
  973. .btn-submit{
  974. width: 600rpx;
  975. height: 90rpx;
  976. margin: auto;
  977. text-align: center;
  978. line-height: 90rpx;
  979. color: #fff;
  980. background-image: $btn-confirm;
  981. border-radius: 90rpx;
  982. font-size: 30rpx;
  983. }
  984. }
  985. .row.Read{
  986. border: 0;
  987. text-align: center;
  988. color: #999999;
  989. }
  990. .thebj {
  991. position: fixed;
  992. left: 0;
  993. top: 0;
  994. bottom: 0;
  995. width: 100%;
  996. height: 100%;
  997. background-color: rgba(0, 0, 0, .5);
  998. z-index: 999999;
  999. opacity: 0;
  1000. }
  1001. .thebj.show{
  1002. opacity: 1;
  1003. }
  1004. .theresult {
  1005. position: absolute;
  1006. top: 50%;
  1007. left: 50%;
  1008. transform: translate(-50%, -50%);
  1009. width:580rpx;
  1010. background-color: #fff;
  1011. border-radius: 32rpx;
  1012. }
  1013. .theresult .title{
  1014. line-height: 100rpx;
  1015. text-align: center;
  1016. display: block;
  1017. color: #333333;
  1018. font-size: 30rpx;
  1019. font-weight: bold;
  1020. border-bottom: 2rpx solid #efefef;
  1021. }
  1022. .theresult .content{
  1023. padding: 30rpx 52rpx;
  1024. line-height: 48rpx;
  1025. color: #666666;
  1026. font-size: 30rpx;
  1027. display: block;
  1028. }
  1029. .paybtn{
  1030. width: 100%;
  1031. height: 90rpx;
  1032. float: left;
  1033. .btn{
  1034. width: 50%;
  1035. height: 90rpx;
  1036. text-align: center;
  1037. line-height: 90rpx;
  1038. font-size: 30rpx;
  1039. display: inline-block;
  1040. float: left;
  1041. &.cancel{
  1042. background-color: #efefef;
  1043. border-radius: 0rpx 0rpx 0rpx 32rpx;
  1044. color: #999999;
  1045. }
  1046. &.confirm{
  1047. background-image: linear-gradient(270deg, #f28f31 0%, #e15616 100%);
  1048. border-radius: 0rpx 0rpx 32rpx 0rpx;
  1049. color: #fff;
  1050. }
  1051. }
  1052. }
  1053. .icon-wenhao{
  1054. color: #1890f9;
  1055. font-size: 35rpx;
  1056. width: 50rpx;
  1057. }
  1058. .form-upload-tips:hover .wen-tips {display: block;}
  1059. .tui-popup-box {
  1060. z-index: 22;
  1061. width: 702rpx;
  1062. padding: 24rpx 24rpx 36rpx 24rpx;
  1063. height: 670rpx;
  1064. position: relative;
  1065. .icon-iconfontguanbi{
  1066. font-size: 40rpx;
  1067. color: #b2b2b2;
  1068. width: 60rpx;
  1069. float: right;
  1070. display: block;
  1071. }
  1072. .content{
  1073. .freight-radio{
  1074. height: 66rpx;
  1075. line-height: 66rpx;
  1076. padding: 0 35rpx;
  1077. .row-group{
  1078. width: 100%;
  1079. // max-height: 605rpx;
  1080. // overflow: auto;
  1081. }
  1082. .row-input{
  1083. height: 66rpx;
  1084. line-height: 66rpx;
  1085. width: 100%;
  1086. display: block;
  1087. }
  1088. .row-radio{
  1089. float: right;
  1090. transform: scale(0.9);
  1091. color: #b2b2b2;
  1092. }
  1093. .row-text{
  1094. font-size: $font-size-28;
  1095. color: #666666;
  1096. float: left;
  1097. }
  1098. }
  1099. }
  1100. }
  1101. checkbox .wx-checkbox-input{
  1102. border-radius: 50%;
  1103. }
  1104. .row-check{
  1105. transform: scale(0.8);
  1106. }
  1107. checkbox .wx-checkbox-input.wx-checkbox-input-checked{
  1108. background: #E15616;
  1109. border: 2rpx solid #e15616;
  1110. }
  1111. checkbox .wx-checkbox-input.wx-checkbox-input-checked::before{
  1112. border-radius: 50%;
  1113. border: 2rpx solid #e15616;
  1114. width: 34rpx;
  1115. height: 34rpx;
  1116. line-height: 34rpx;
  1117. text-align: center;
  1118. font-size:34rpx;
  1119. color:#fff;
  1120. background: transparent;
  1121. transform:translate(-50%, -50%) scale(.8);
  1122. -webkit-transform:translate(-50%, -50%) scale(.8);
  1123. }
  1124. </style>