RedeemView.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870
  1. <template>
  2. <div class="right-wrap">
  3. <el-breadcrumb separator="/" style="margin-bottom: 13px;">
  4. <el-breadcrumb-item :to="{ path: '/home/pointsMall' }">积分商城</el-breadcrumb-item>
  5. <el-breadcrumb-item>兑换详情</el-breadcrumb-item>
  6. </el-breadcrumb>
  7. <el-card class="box-card">
  8. <div slot="header" class="clearfix">
  9. <span>兑换详情</span>
  10. <!-- <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button> -->
  11. </div>
  12. <div class="footer">
  13. <div class="left-info" style="width: 100%;">
  14. <span class="info-title">
  15. <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"
  16. class="info-icon">
  17. <path fill-rule="evenodd" clip-rule="evenodd"
  18. d="M8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1Z"
  19. fill="#165DFF"></path>
  20. <path fill-rule="evenodd" clip-rule="evenodd"
  21. d="M8.54189 6.70582C8.67075 6.70582 8.77522 6.81029 8.77522 6.93915L8.77511 10.2335L9.46743 10.2343C9.61176 10.2343 9.72876 10.3513 9.72876 10.4956V11.3319C9.72876 11.4762 9.61176 11.5932 9.46743 11.5932H6.58458C6.44025 11.5932 6.32324 11.4762 6.32324 11.3319V10.4956C6.32324 10.3513 6.44025 10.2343 6.58458 10.2343L7.28178 10.2335V8.08122L7.14759 8.08198C7.00326 8.08198 6.88626 7.96498 6.88626 7.82065V6.97073C6.88626 6.8264 7.00326 6.70939 7.14759 6.70939L7.47956 6.70859C7.49132 6.70677 7.50337 6.70582 7.51565 6.70582H8.54189ZM8.40513 4.41602C8.54946 4.41602 8.66646 4.53302 8.66646 4.67735V5.64802C8.66646 5.79235 8.54946 5.90935 8.40513 5.90935H7.43446C7.29013 5.90935 7.17313 5.79235 7.17313 5.64802V4.67735C7.17313 4.53302 7.29013 4.41602 7.43446 4.41602H8.40513Z"
  22. fill="white"></path>
  23. </svg>
  24. 物品介绍
  25. </span>
  26. <div v-html="data.comment"></div>
  27. </div>
  28. </div>
  29. <div v-show="deliveryType == 1">
  30. <p class="label">收货地址</p>
  31. <div class="address">
  32. <div v-if="addressDetail">
  33. <div class="address-container">
  34. <div class="header">
  35. <div class="left">
  36. <span>{{ name }}</span>
  37. </div>
  38. <span @click="handleClickAddress" role="button" class="btn">修改</span>
  39. </div>
  40. <p class="phone">{{ phone }}</p>
  41. <p class="address">{{ address }}</p>
  42. </div>
  43. </div>
  44. <div v-else @click="handleClickAddress">
  45. <div class="address-container new"><i class="add-icon byte-icon byte-icon--plus"><svg
  46. xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
  47. <path fill="none" d="M0 0h48v48H0z"></path>
  48. <path
  49. d="M24.7 4c.4 0 .6 0 .8.1.2.1.3.2.4.4.1.2.1.3.1.8V22h16.7c.4 0 .6 0 .8.1.2.1.3.2.4.4.1.2.1.3.1.8v1.4c0 .4 0 .6-.1.8-.1.2-.2.3-.4.4-.2.1-.3.1-.8.1H26v16.7c0 .4 0 .6-.1.8-.1.2-.2.3-.4.4-.2.1-.3.1-.8.1h-1.4c-.4 0-.6 0-.8-.1-.2-.1-.3-.2-.4-.4-.1-.2-.1-.3-.1-.8V26H5.3c-.4 0-.6 0-.8-.1-.2-.1-.3-.2-.4-.4-.1-.2-.1-.3-.1-.8v-1.4c0-.4 0-.6.1-.8.1-.2.2-.3.4-.4.2-.1.3-.1.8-.1H22V5.3c0-.4 0-.6.1-.8.1-.2.2-.3.4-.4.2-.1.3-.1.8-.1h1.4z">
  50. </path>
  51. </svg></i> <span class="add-label">添加收货地址</span></div>
  52. </div>
  53. </div>
  54. </div>
  55. <div v-show="deliveryType == 4">
  56. <p class="label">手机直充</p>
  57. <div class="address">
  58. <div v-if="phoneNumber">
  59. <div class="address-container" style="min-height: 45px;">
  60. <div class="header">
  61. <div class="left">
  62. <span>{{ phoneNumber }}</span>
  63. </div>
  64. <span @click="handleClickPhoneNumber" role="button" class="btn">修改</span>
  65. </div>
  66. </div>
  67. </div>
  68. <div v-else @click="handleClickPhoneNumber">
  69. <div class="address-container new"><i class="add-icon byte-icon byte-icon--plus"><svg
  70. xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
  71. <path fill="none" d="M0 0h48v48H0z"></path>
  72. <path
  73. d="M24.7 4c.4 0 .6 0 .8.1.2.1.3.2.4.4.1.2.1.3.1.8V22h16.7c.4 0 .6 0 .8.1.2.1.3.2.4.4.1.2.1.3.1.8v1.4c0 .4 0 .6-.1.8-.1.2-.2.3-.4.4-.2.1-.3.1-.8.1H26v16.7c0 .4 0 .6-.1.8-.1.2-.2.3-.4.4-.2.1-.3.1-.8.1h-1.4c-.4 0-.6 0-.8-.1-.2-.1-.3-.2-.4-.4-.1-.2-.1-.3-.1-.8V26H5.3c-.4 0-.6 0-.8-.1-.2-.1-.3-.2-.4-.4-.1-.2-.1-.3-.1-.8v-1.4c0-.4 0-.6.1-.8.1-.2.2-.3.4-.4.2-.1.3-.1.8-.1H22V5.3c0-.4 0-.6.1-.8.1-.2.2-.3.4-.4.2-.1.3-.1.8-.1h1.4z">
  74. </path>
  75. </svg></i> <span class="add-label">填写充值手机号</span></div>
  76. </div>
  77. </div>
  78. </div>
  79. <p class="label">物品信息</p>
  80. <div v-if="activeName == 'goodsNotice'">
  81. <table class="table">
  82. <thead>
  83. <tr>
  84. <th width="25%">兑换物品</th>
  85. <th style="text-align: center;">数量</th>
  86. <th style="text-align: center;">单价</th>
  87. <th style="text-align: center;" width="15%"><span style="color: red;">*</span>兑换方式</th>
  88. <th v-if="deliveryType=='0'" style="text-align: center;" width="15%">
  89. <span style="color: red;">*</span>领取地点
  90. </th>
  91. <th style="text-align: center;">总计</th>
  92. </tr>
  93. </thead>
  94. <tbody>
  95. <tr>
  96. <td>
  97. <div class="prize-info">
  98. <div class="prize-img-container">
  99. <el-image :src="data.imgUrl" v-if="data.imgUrl" :preview-src-list="[data.imgUrl]"
  100. class="prize-img"></el-image>
  101. </div>
  102. <div class="prize-detail-info">
  103. <h3 class="title">{{ data.name }}</h3>
  104. <!-- <p class="desc">
  105. <span v-if="data.location">{{ data.location }}</span>
  106. </p> -->
  107. </div>
  108. </div>
  109. </td>
  110. <td style="text-align: center;">
  111. <el-input-number @change="changeCount" size="mini" v-model="skuCount" :step="1" :min="1"
  112. step-strictly></el-input-number>
  113. </td>
  114. <td style="text-align: center;">{{ data.price }} 积分</td>
  115. <td style="text-align: center;">
  116. <el-select size="small" clearable v-model="deliveryType" placeholder="请选择" value-key="value" @change="changeDeliveryType">
  117. <el-option :key="item.dictValue" v-for="item in deliveryTypeList" :label="item.dictLabel" :value="item.dictValue">
  118. </el-option>
  119. </el-select>
  120. </td>
  121. <td v-if="deliveryType=='0'" style="text-align: center;">
  122. <el-select size="small" clearable v-model="reclaimAddr" placeholder="请选择" value-key="value" @change="changeReclaimAddr">
  123. <el-option :key="item.dictValue" v-for="item in reclaimAddrList" :label="item.dictLabel" :value="item.dictValue">
  124. </el-option>
  125. </el-select>
  126. </td>
  127. <td style="text-align: center;" class="finlly-price">
  128. {{ total }} 积分
  129. </td>
  130. </tr>
  131. </tbody>
  132. </table>
  133. </div>
  134. <div v-else>
  135. <table class="table">
  136. <thead>
  137. <tr>
  138. <th width="35%">兑换物品</th>
  139. <th style="text-align: center;">消耗福利券</th>
  140. <th style="text-align: center;">物品属性</th>
  141. <th style="text-align: center;" width="20%"><span style="color: red;">*</span>兑换方式</th>
  142. </tr>
  143. </thead>
  144. <tbody>
  145. <tr>
  146. <td>
  147. <div class="prize-info">
  148. <div class="prize-img-container">
  149. <el-image :src="data.imgUrl" v-if="data.imgUrl" :preview-src-list="[data.imgUrl]"
  150. class="prize-img"></el-image>
  151. </div>
  152. <div class="prize-detail-info">
  153. <h3 class="title">{{ data.name }}</h3>
  154. <!-- <p class="desc">
  155. <span v-if="data.location">{{ data.location }}</span>
  156. </p> -->
  157. </div>
  158. </div>
  159. </td>
  160. <td style="text-align: center;">{{ data.title }}</td>
  161. <td style="text-align: center;">{{ data.productAttributeName }}</td>
  162. <td style="text-align: center;" class="finlly-price">
  163. <el-select size="small" clearable v-model="deliveryType" placeholder="请选择" value-key="value" @change="changeDeliveryType">
  164. <el-option :key="item.dictValue" v-for="item in deliveryTypeList" :label="item.dictLabel" :value="item.dictValue">
  165. </el-option>
  166. </el-select>
  167. </td>
  168. </tr>
  169. </tbody>
  170. </table>
  171. </div>
  172. <div class="footer">
  173. <div class="right" v-if="data.stock != 0">
  174. <div class="btn-line">
  175. <el-button :disabled="disabled" @click="handleClickExchange" type="primary" round>确认兑换</el-button>
  176. </div>
  177. </div>
  178. </div>
  179. </el-card>
  180. <el-dialog title="兑换物品收货地址" :visible.sync="dialogFormVisible" width="500px">
  181. <el-form :model="dataForm" ref="dataForm" style="padding: 0 75px;" :rules="rules">
  182. <el-form-item label="联系姓名" :label-width="formLabelWidth" prop="name">
  183. <el-input size="medium" v-model="dataForm.name" placeholder="请输入联系姓名"></el-input>
  184. </el-form-item>
  185. <el-form-item label="联系方式" :label-width="formLabelWidth" prop="phone">
  186. <el-input size="medium" v-model="dataForm.phone" placeholder="请输入11位手机号码"></el-input>
  187. </el-form-item>
  188. <el-form-item label="联系地址"
  189. :label-width="formLabelWidth" prop="address">
  190. <el-input size="medium" v-model="dataForm.address" placeholder="请输入详细联系地址"></el-input>
  191. </el-form-item>
  192. </el-form>
  193. <div slot="footer" class="dialog-footer" style="text-align: center;">
  194. <el-button class="addButton-address" type="primary" @click="submitForm('dataForm')">提交</el-button>
  195. </div>
  196. </el-dialog>
  197. <el-dialog title="手机充值" :visible.sync="dialogFormPhoneNumber" width="500px">
  198. <el-form :model="dataFormPhoneNumber" ref="dataFormPhoneNumber" :rules="rules">
  199. <el-form-item label="充值手机号" :label-width="formLabelWidth" prop="phoneNumber">
  200. <el-input size="medium" v-model="dataFormPhoneNumber.phoneNumber" placeholder="请输入11位手机号码"></el-input>
  201. </el-form-item>
  202. </el-form>
  203. <div slot="footer" class="dialog-footer" style="text-align: center;">
  204. <el-button class="addButton-address" type="primary" @click="submitFormPhoneNumber('dataFormPhoneNumber')">提交</el-button>
  205. </div>
  206. </el-dialog>
  207. <el-dialog title="结算明细" :visible.sync="dialogFormOrderInfo" width="300px">
  208. <div class="checklist">
  209. <div class="listItem">
  210. <div class="itemName">商品积分</div>
  211. <div class="itemValue">{{ data.price }}</div>
  212. </div>
  213. <div class="listItem">
  214. <div class="itemName">商品数量</div>
  215. <div class="itemValue">{{ skuCount }}</div>
  216. </div>
  217. <div class="listItem">
  218. <div class="itemName">快递积分</div>
  219. <div class="itemValue red">+180</div>
  220. </div>
  221. <div class="listItem">
  222. <div class="itemName">合计</div>
  223. <div class="itemValue">{{ total }}</div>
  224. </div>
  225. </div>
  226. <div slot="footer" class="dialog-footer" style="text-align: center;">
  227. <el-button class="addButton-address" type="primary" style="background-image: linear-gradient(to right, #f5b543,#faa029);width: 100px;height: 35px;line-height: 34px;" @click="handleClickOrderInfo">确定</el-button>
  228. </div>
  229. </el-dialog>
  230. <el-dialog :visible.sync="dialogMsgVisible" width="400px" @close="handleClose">
  231. <div class="wrapper">
  232. <svg width="291" height="93" viewBox="0 0 291 93" fill="none" xmlns="http://www.w3.org/2000/svg"
  233. src="./success.svg" class="success-icon">
  234. <g filter="url(#filter0_f_6844:108643)">
  235. <circle cx="143" cy="56.5723" r="3" fill="#51F1E8"></circle>
  236. </g>
  237. <path d="M195.768 48.1699L195.768 39.5097L203.268 43.8398L195.768 48.1699Z" fill="#FF5E54"></path>
  238. <path d="M232.39 10.953L230.149 2.58781L238.514 4.82925L232.39 10.953Z" fill="#9F54FF"></path>
  239. <path d="M7.519 27.6623L1.39528 21.5385L9.76044 19.2971L7.519 27.6623Z" fill="#FF834E"></path>
  240. <path
  241. d="M106.774 8.99609L96.2168 11.168C94.5498 27.4571 102.885 34.5158 107.886 36.6877C113.999 37.7736 120.031 35.8701 124 32.8869C111.22 33.4298 104.552 19.3126 106.774 8.99609Z"
  242. fill="#51F1E8"></path>
  243. <path
  244. d="M283.89 68.9961L290.383 70.4176C292.692 77.5253 288.076 83.9223 283.89 84.9096C280.384 85.3438 277.597 84.0817 275 82.5007C284.452 83.364 285.768 73.9715 283.89 68.9961Z"
  245. fill="#FF5E54"></path>
  246. <g filter="url(#filter1_f_6844:108643)">
  247. <path
  248. d="M50 82.4171L55.3529 77.9961C57.902 79.4698 63 83.3014 63 86.8382C59.8213 88.1508 58.6931 89.8153 58.427 90.9879C58.4503 91.3588 58.4426 91.6987 58.4118 91.9961C58.3461 91.7429 58.3346 91.395 58.427 90.9879C58.2575 88.2958 56.4523 83.9714 50 82.4171Z"
  249. fill="#FFCF8B"></path>
  250. </g>
  251. <defs data-v-50d84ad4="">
  252. <filter id="filter0_f_6844:108643" x="139" y="52.5723" width="8" height="8"
  253. filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
  254. <feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood>
  255. <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend>
  256. <feGaussianBlur stdDeviation="0.5" result="effect1_foregroundBlur_6844:108643"></feGaussianBlur>
  257. </filter>
  258. <filter id="filter1_f_6844:108643" x="49" y="76.9961" width="15" height="16"
  259. filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
  260. <feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood>
  261. <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend>
  262. <feGaussianBlur stdDeviation="0.5" result="effect1_foregroundBlur_6844:108643"></feGaussianBlur>
  263. </filter>
  264. </defs>
  265. </svg>
  266. <h2 class="header">恭喜你,兑换成功!</h2>
  267. <img :src="data.imgUrl" class="icon">
  268. <div class="desc">
  269. <span>已下单,经过审批后,2周内发货,如有问题联系物品介绍中备注的相关联系人</span>
  270. <!-- <span>恭喜你成功兑换{{ data.name }},随后你可在</span>
  271. <a href="/home/myCenter" class="link">个人中心</a>中查看兑换的物品 -->
  272. </div>
  273. </div>
  274. <div slot="footer" class="dialog-footer" style="text-align: center;">
  275. <router-link to="/home/myCenter">
  276. <el-button @click="setTab" class="addButton-address" type="primary">
  277. 查看物品
  278. </el-button>
  279. </router-link>
  280. </div>
  281. </el-dialog>
  282. </div>
  283. </template>
  284. <script>
  285. import { integralInfo, festivalInfo, start, kill } from "@/api/allApi";
  286. import { setTab } from '@/utils/auth'
  287. import { debounce } from '@/utils/index'
  288. export default {
  289. data() {
  290. var validPhone = (rule, value, callback) => {
  291. if (value === '') {
  292. callback(new Error('请输入手机号'));
  293. }
  294. else {
  295. const reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
  296. const isCheckPhone = reg_tel.test(value);
  297. if (!isCheckPhone) {
  298. callback(new Error('请输入正确手机号'));
  299. }
  300. callback();
  301. }
  302. };
  303. return {
  304. reclaimAddr:'',
  305. reclaimAddrList:[],
  306. phoneNumber:'',
  307. deliveryTypeList:[],
  308. deliveryType:'',
  309. contactInfo:{},
  310. activeName: this.$route.query.activeName,
  311. name: '',
  312. phone: '',
  313. address: '',
  314. disabled: true,
  315. skuCount: 1,
  316. total: undefined,
  317. data: {},
  318. dialogFormOrderInfo:false,
  319. dialogFormPhoneNumber:false,
  320. addressDetail: false,
  321. dialogFormVisible: false,
  322. dialogMsgVisible: false,
  323. dataFormPhoneNumber:{
  324. phoneNumber:'',
  325. },
  326. dataForm: {
  327. name: '',
  328. phone: '',
  329. address: '',
  330. },
  331. rules: {
  332. name: [
  333. { required: true, message: '请输入联系姓名', trigger: 'blur' },
  334. { min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
  335. ],
  336. phone: [
  337. { required: true, validator: validPhone, trigger: 'blur' }
  338. ],
  339. address: [
  340. { required: true, message: '请输入联系地址', trigger: 'blur' },
  341. { min: 1, max: 120, message: '长度在 1 到 120 个字符', trigger: 'blur' }
  342. ],
  343. phoneNumber: [
  344. { required: true, validator: validPhone, trigger: 'blur' }
  345. ],
  346. },
  347. formLabelWidth: '100px',
  348. };
  349. },
  350. created() {
  351. const skuId = this.$route.query.id;
  352. const activeName = this.$route.query.activeName;
  353. this.dataForm.skuId = skuId;
  354. this.getInfo(skuId, activeName);
  355. },
  356. methods: {
  357. handleClickOrderInfo(){
  358. this.dialogFormOrderInfo = false;
  359. },
  360. changeReclaimAddr(val){
  361. this.disabled = true;
  362. if(val){
  363. this.disabled = false;
  364. }
  365. },
  366. changeDeliveryType(val){
  367. this.disabled = true;
  368. if(val=='0' || val==''){
  369. this.total = this.data.price;
  370. this.skuCount = 1;
  371. }
  372. if(val=='1'){
  373. debugger
  374. if(this.data.productAttribute=='exchange_logo'){
  375. this.total = this.data.price * this.skuCount + 180;
  376. this.dialogFormOrderInfo = true;
  377. }
  378. if(this.address){
  379. this.addressDetail = true;
  380. this.disabled = false;
  381. }
  382. }
  383. if(val=='2' || val=='3'){
  384. this.total = this.data.price;
  385. this.skuCount = 1;
  386. this.disabled = false;
  387. }
  388. if(val=='4'){
  389. this.total = this.data.price;
  390. this.skuCount = 1;
  391. if(this.phoneNumber){
  392. this.disabled = false;
  393. }
  394. }
  395. },
  396. setTab() {
  397. setTab('exchange');
  398. },
  399. changeCount(val) {
  400. this.total = this.data.price * val;
  401. if(this.deliveryType=='1' && this.data.productAttribute=='exchange_logo'){
  402. this.total = this.data.price * val + 180;
  403. }
  404. },
  405. handleClose() {
  406. this.dialogMsgVisible = false;
  407. this.$router.push({
  408. path: '/home/pointsMall',
  409. });
  410. },
  411. getInfo(skuId, activeName) {
  412. if (activeName == 'goodsNotice') {
  413. integralInfo({ skuId: skuId }).then(response => {
  414. this.data = response.data.data;
  415. this.deliveryTypeList = response.data.data.dictDataList;
  416. this.reclaimAddrList = response.data.data.reclaimAddrList;
  417. this.contactInfo = response.data.data.contactInfo;
  418. if(this.contactInfo){
  419. this.name = this.contactInfo.contact;
  420. this.phone = this.contactInfo.contactPhone;
  421. this.address = this.contactInfo.contactAddr;
  422. }
  423. this.total = response.data.data.price;
  424. }).catch(() => {
  425. })
  426. } else {
  427. festivalInfo({ skuId: skuId }).then(response => {
  428. this.data = response.data.data;
  429. this.contactInfo = response.data.data.contactInfo;
  430. this.deliveryTypeList = response.data.data.dictDataList;
  431. if(this.contactInfo){
  432. this.name = this.contactInfo.contact;
  433. this.phone = this.contactInfo.contactPhone;
  434. this.address = this.contactInfo.contactAddr;
  435. }
  436. }).catch(() => {
  437. })
  438. }
  439. },
  440. handleClickPhoneNumber(){
  441. this.dialogFormPhoneNumber = true;
  442. this.dataFormPhoneNumber.phoneNumber = this.phoneNumber;
  443. },
  444. handleClickAddress() {
  445. this.dialogFormVisible = true;
  446. this.dataForm.name = this.name;
  447. this.dataForm.phone = this.phone;
  448. this.dataForm.address = this.address;
  449. },
  450. submitFormPhoneNumber(formName){
  451. this.$refs[formName].validate((valid) => {
  452. if (valid) {
  453. this.phoneNumber = this.dataFormPhoneNumber.phoneNumber,
  454. this.dialogFormPhoneNumber = false;
  455. this.disabled = false;
  456. } else {
  457. console.log('error submit!!');
  458. return false;
  459. }
  460. });
  461. },
  462. submitForm(formName) {
  463. this.$refs[formName].validate((valid) => {
  464. if (valid) {
  465. // alert('submit!');
  466. this.name = this.dataForm.name,
  467. this.phone = this.dataForm.phone,
  468. this.address = this.dataForm.address,
  469. this.addressDetail = true;
  470. this.dialogFormVisible = false;
  471. this.disabled = false;
  472. } else {
  473. console.log('error submit!!');
  474. return false;
  475. }
  476. });
  477. },
  478. submit(){
  479. if(this.deliveryType=='1'){
  480. var params = {
  481. skuId: this.data.skuId,
  482. skuCount: this.skuCount,
  483. price:this.data.price,
  484. deliveryType:this.deliveryType,
  485. contact: this.name,
  486. contactPhone: this.phone,
  487. contactAddr: this.address,
  488. skuType: this.data.skuType,
  489. welfareId: this.data.welfareId,
  490. }
  491. }else if(this.deliveryType=='4'){
  492. var params = {
  493. skuId: this.data.skuId,
  494. skuCount: this.skuCount,
  495. price:this.data.price,
  496. deliveryType:this.deliveryType,
  497. contactPhone: this.phoneNumber,
  498. skuType: this.data.skuType,
  499. welfareId: this.data.welfareId,
  500. }
  501. }else{
  502. var params = {
  503. skuId: this.data.skuId,
  504. skuCount: this.skuCount,
  505. price:this.data.price,
  506. deliveryType:this.deliveryType,
  507. reclaimAddr:this.reclaimAddr,
  508. skuType: this.data.skuType,
  509. welfareId: this.data.welfareId,
  510. }
  511. }
  512. if (this.activeName == 'goodsNotice') {
  513. start(params).then(response => {
  514. console.log(response.data.data);
  515. this.$store.dispatch('GetUserInfo');
  516. this.dialogMsgVisible = true;
  517. }).catch(() => { })
  518. } else {
  519. kill(params).then(response => {
  520. console.log(response.data.data);
  521. this.$store.dispatch('GetUserInfo');
  522. this.dialogMsgVisible = true;
  523. }).catch(() => { })
  524. }
  525. },
  526. handleClickExchange:debounce(function(){
  527. this.submit();
  528. },2000,true),
  529. }
  530. };
  531. </script>
  532. <style scoped>
  533. .red{
  534. color: red;
  535. }
  536. /* .checklist{
  537. } */
  538. .listItem{
  539. display: flex;
  540. justify-content: space-between;
  541. align-content: center;
  542. padding: 5px 0;
  543. }
  544. /* .itemName{
  545. } */
  546. /* .itemValue{
  547. } */
  548. .clearfix:before,
  549. .clearfix:after {
  550. display: table;
  551. content: "";
  552. }
  553. .clearfix:after {
  554. clear: both
  555. }
  556. .box-card {
  557. width: 100%;
  558. }
  559. /* .label:first-child {
  560. margin-top: 0;
  561. } */
  562. .label {
  563. font-size: 16px;
  564. line-height: 24px;
  565. margin: 16px 0 24px;
  566. }
  567. .address-container {
  568. padding: 16px;
  569. min-height: 112px;
  570. background-color: #f7f8fa;
  571. box-sizing: border-box;
  572. border-radius: 4px;
  573. width: 320px;
  574. border: 1px solid #abcdff;
  575. }
  576. .address-container .header {
  577. font-weight: 500;
  578. font-size: 14px;
  579. line-height: 24px;
  580. color: #252933;
  581. display: flex;
  582. justify-content: space-between;
  583. margin: 0 0 8px;
  584. }
  585. .address-container .header .left {
  586. display: flex;
  587. justify-content: center;
  588. align-items: center;
  589. }
  590. .address-container .btn {
  591. flex: none;
  592. color: #1e80ff;
  593. cursor: pointer;
  594. font-weight: 400;
  595. margin-left: 1em;
  596. }
  597. .address-container .address,
  598. .address-container .phone {
  599. margin: 0;
  600. font-size: 14px;
  601. line-height: 24px;
  602. color: #515767;
  603. }
  604. .address-container.new {
  605. border: 1px dashed #e4e6eb;
  606. width: 100%;
  607. display: flex;
  608. align-items: center;
  609. justify-content: center;
  610. cursor: pointer;
  611. flex-flow: column nowrap;
  612. }
  613. .address-container {
  614. padding: 16px;
  615. min-height: 112px;
  616. background-color: #f7f8fa;
  617. box-sizing: border-box;
  618. border-radius: 4px;
  619. width: 320px;
  620. border: 1px solid #abcdff;
  621. }
  622. .address-container.new .add-icon {
  623. font-size: 16px;
  624. color: #515767;
  625. }
  626. .byte-icon {
  627. width: 1em;
  628. height: 1em;
  629. display: inline-block;
  630. vertical-align: middle;
  631. line-height: 1;
  632. }
  633. svg:not(:root) {
  634. overflow-clip-margin: content-box;
  635. overflow: hidden;
  636. }
  637. .byte-icon svg {
  638. width: 100%;
  639. height: 100%;
  640. fill: currentColor;
  641. pointer-events: none;
  642. }
  643. .address-container.new .add-label {
  644. font-size: 14px;
  645. line-height: 24px;
  646. color: #8a919f;
  647. margin: 18px 0 0;
  648. }
  649. .table {
  650. border-collapse: collapse;
  651. border: 1px solid #e4e6eb;
  652. box-sizing: border-box;
  653. border-radius: 2px;
  654. width: 100%;
  655. text-align: left;
  656. font-size: 14px;
  657. line-height: 24px;
  658. border-collapse: separate;
  659. border-spacing: 0;
  660. border-radius: 4px;
  661. }
  662. .table tr {
  663. border: 1px solid #e4e6eb;
  664. }
  665. .table th {
  666. padding: 12px 16px;
  667. background-color: #f7f8fa;
  668. font-weight: 500;
  669. color: #282f38;
  670. }
  671. .table td {
  672. padding: 16px;
  673. vertical-align: middle;
  674. color: #515767;
  675. }
  676. .table .prize-info {
  677. display: flex;
  678. }
  679. .table .prize-img-container {
  680. display: flex;
  681. align-items: center;
  682. justify-content: center;
  683. background: #f7f8fa;
  684. max-width: 80px;
  685. height: 80px;
  686. }
  687. .table .prize-detail-info {
  688. margin-left: 16px;
  689. display: flex;
  690. flex-flow: column;
  691. align-items: flex-start;
  692. justify-content: center;
  693. }
  694. .table .prize-img-container .prize-img {
  695. max-height: 64px;
  696. }
  697. .lazy {
  698. position: relative;
  699. -o-object-fit: cover;
  700. object-fit: cover;
  701. }
  702. img {
  703. border-style: none;
  704. }
  705. .table .prize-detail-info {
  706. margin-left: 16px;
  707. display: flex;
  708. flex-flow: column;
  709. align-items: flex-start;
  710. justify-content: center;
  711. }
  712. .table .prize-detail-info .title {
  713. font-weight: 400;
  714. font-size: 14px;
  715. line-height: 24px;
  716. color: #1d2129;
  717. margin: 0 0 3px;
  718. }
  719. .table .prize-detail-info .desc {
  720. margin: 0;
  721. line-height: 18px;
  722. height: 18px;
  723. }
  724. .table .prize-detail-info .desc span {
  725. font-size: 12px;
  726. line-height: 14px;
  727. color: #ff7d00;
  728. background: #fff7e8;
  729. padding: 2px 4px;
  730. }
  731. .table .finlly-price {
  732. font-weight: 500;
  733. font-size: 14px;
  734. line-height: 24px;
  735. color: #1e80ff;
  736. }
  737. .footer {
  738. margin-top: 16px;
  739. /* display: flex;
  740. justify-content: space-between; */
  741. }
  742. .footer .left-info {
  743. box-sizing: border-box;
  744. width: 400px;
  745. height: -webkit-fit-content;
  746. height: -moz-fit-content;
  747. height: fit-content;
  748. background-color: #e8f3ff;
  749. border-radius: 4px;
  750. padding: 16px;
  751. }
  752. .footer .left-info .info-title {
  753. font-size: 14px;
  754. line-height: 24px;
  755. color: #282f38;
  756. display: flex;
  757. align-items: center;
  758. }
  759. .footer .left-info .info-icon {
  760. margin-right: 8px;
  761. }
  762. .footer .left-info .info-content {
  763. margin: 4px 0 4px 2em;
  764. white-space: pre-line;
  765. font-size: 12px;
  766. line-height: 20px;
  767. color: #8a919f;
  768. }
  769. .footer .right {
  770. font-size: 14px;
  771. line-height: 24px;
  772. color: #282f38;
  773. }
  774. .footer .right .remark-line {
  775. display: flex;
  776. position: relative;
  777. }
  778. .footer .right .remark {
  779. width: 400px;
  780. }
  781. .footer .right .btn-line {
  782. margin-top: 16px;
  783. text-align: right;
  784. }
  785. .addButton-address {
  786. background: #1e80ff;
  787. border-color: #1e80ff;
  788. color: #fff;
  789. width: 160px;
  790. height: 48px;
  791. border-radius: 50px;
  792. line-height: 46px;
  793. padding: 0;
  794. font-size: 16px;
  795. border: 1px solid transparent;
  796. }
  797. .wrapper .icon {
  798. height: 88px;
  799. margin-bottom: 24px;
  800. max-width: 300px;
  801. }
  802. </style>
  803. <style>
  804. .el-dialog__body {
  805. padding-bottom: 0px;
  806. padding-top: 10px;
  807. }
  808. </style>