newStoreApprovalDetail.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839
  1. <template>
  2. <div>
  3. <div class="navBarTOP">
  4. <!-- 顶部条 -->
  5. <van-nav-bar class="navBar" title="门店详情" left-arrow @click-left="onClickLeft" />
  6. </div>
  7. <!--主体内容-->
  8. <div style="margin-top: 44px; padding-bottom: 50px" v-if="list.storeId">
  9. <!-- <van-dialog title="门店位置">
  10. <mapmarker :info="list"></mapmarker>
  11. </van-dialog> -->
  12. <van-tabs class="myTab" v-model="tabVal" color="#0057ba" @change="tabChange">
  13. <van-tab title="基础信息" name="insidePlan" ref="dispsps">
  14. <!-- 提交审批后被驳回 -->
  15. <div class="rejectMsg" v-if="rejectMsg[0]">
  16. <span class="label">退回原因</span>
  17. <span class="value">{{ rejectMsg[0].approvalDesc }}</span>
  18. <span class="examineDetail" @click="examineDetail">查看详情</span>
  19. </div>
  20. <van-field readonly v-model="list.storeCode" label="编号" />
  21. <van-field readonly v-if="DIYshow" v-model="list.attribute1" label="DIY编号" />
  22. <van-field readonly v-model="list.storeName" :label="storeName" />
  23. <van-field readonly v-model="list.storeCategoryName" label="类型" />
  24. <van-field
  25. readonly
  26. rows="1"
  27. autosize
  28. type="textarea"
  29. v-model="list.addressLine"
  30. :label="address" />
  31. <van-field v-model="list.lat" readonly label="经度" placeholder="经度" />
  32. <van-field readonly v-model="list.lon" label="维度" />
  33. <van-field readonly v-model="list.orgName" label="销售部" />
  34. <van-field readonly v-model="list.provinceName" label="省(州)"> </van-field>
  35. <van-field readonly v-model="list.cityName" label="城市"> </van-field>
  36. <van-field readonly v-model="list.districtName" label="区(县)"> </van-field>
  37. <van-field readonly v-model="list.townName" label="街道"> </van-field>
  38. <van-field readonly v-model="list.cityLevel" label="城市等级" />
  39. <van-field
  40. readonly
  41. v-if="list.ifJzStoreType != 1 && list.storeCategory != 'C917'"
  42. v-model="list.contactName"
  43. label="联系人" />
  44. <van-field
  45. readonly
  46. v-if="list.ifJzStoreType == 1 && list.storeCategory != 'C917'"
  47. v-model="list.contactName"
  48. label="老板" />
  49. <van-field
  50. readonly
  51. v-model="list.telephone"
  52. label="联系电话"
  53. v-if="list.storeCategory != 'C917'" />
  54. <van-field
  55. readonly
  56. v-model="list.chainCode"
  57. label="经销商编号"
  58. v-if="list.storeCategory != 'C917'" />
  59. <van-field
  60. readonly
  61. v-model="list.chainName"
  62. label="经销商名称"
  63. v-if="list.storeCategory != 'C917'" />
  64. <van-field readonly v-model="list.salesmanName" label="销售员" />
  65. <div v-if="list.storeCategory != 'C917'">
  66. <van-field
  67. readonly
  68. v-model="list.area"
  69. v-if="list.ifJzStoreType != 1"
  70. label="面积(m²)" />
  71. <van-field
  72. readonly
  73. v-model="list.area"
  74. v-if="list.ifJzStoreType == 1"
  75. label="家装展厅面积(m²)" />
  76. </div>
  77. <van-field
  78. readonly
  79. v-if="GZAttributeFormShow"
  80. label="潜在客户类型"
  81. v-model="list.potentialCustomerType" />
  82. <van-field readonly v-if="list.carShop" label="是否车铺开店">
  83. <template #input>
  84. <span v-if="list.carShop == 1">是</span>
  85. <span v-if="list.carShop == 0">否</span>
  86. </template>
  87. </van-field>
  88. <div v-if="list.carShopImgList != null && list.carShop == 1">
  89. <p style="padding: 0 16px">车铺照片(店招及车铺产品拍在一张照片里)</p>
  90. <viewUploadImg :imgs="list.carShopImgList"></viewUploadImg>
  91. </div>
  92. <template v-if="list.img != null && list.storeCategory != 'C917'">
  93. <van-row gutter="20" style="padding: 16px">
  94. <van-col span="12">
  95. <div v-if="storeTypePOP">
  96. <van-image
  97. width="100%"
  98. height="160"
  99. :src="setImgSrc(list.img)"
  100. @click="deleteImgs(list.img)" />
  101. <p style="text-align: center">
  102. {{ list.ifJzStoreType != 1 ? '建店时门店照' : '家装前台照片' }}
  103. </p>
  104. </div>
  105. <div v-else>
  106. <van-image
  107. width="100%"
  108. height="160"
  109. :src="setImgSrc(list.img)"
  110. @click="deleteImgs(list.img)" />
  111. <p style="text-align: center">
  112. {{ list.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片' }}
  113. </p>
  114. </div>
  115. </van-col>
  116. <van-col span="12" v-if="list.ifJzStoreType != 1">
  117. <div v-if="storeTypePOP">
  118. <van-image
  119. width="100%"
  120. height="160"
  121. :src="setImgSrc(list.imgSed)"
  122. @click="deleteImgs(list.imgSed)" />
  123. <p style="text-align: center">
  124. {{ list.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片' }}
  125. </p>
  126. </div>
  127. </van-col>
  128. </van-row>
  129. </template>
  130. <van-row gutter="20" style="padding: 16px">
  131. <van-col span="12" v-if="list.newStoreSignPhoto">
  132. <div v-if="storeTypePOP">
  133. <van-image
  134. width="100%"
  135. height="160"
  136. :src="setImgSrc(list.newStoreSignPhoto)"
  137. @click="deleteImgs(list.newStoreSignPhoto)" />
  138. <p style="text-align: center">最近一次拜访店招</p>
  139. </div>
  140. </van-col>
  141. </van-row>
  142. <van-collapse v-model="activeNames" class="orderList">
  143. <van-collapse-item title="门店下单记录" name="1">
  144. <div class="orderItem" v-for="(item, index) in orderList" :key="index">
  145. <div class="orderTitle">
  146. {{ item.ORDERID }} | {{ item.ORDERDATE }} | {{ item.STATUS_DESCR }} |
  147. {{ item.totalPrice }}
  148. </div>
  149. <el-table
  150. :data="item.productDetail"
  151. border
  152. class="table-headermd table-headermdhome"
  153. show-summary
  154. :summary-method="getSummaries"
  155. style="width: 100%">
  156. <el-table-column label="产品名称" prop="DESCR" />
  157. <el-table-column label="数量" prop="QTY" width="80px" />
  158. <el-table-column label="金额" prop="productTotalPrice" width="80px">
  159. <!-- <template slot-scope="scope">
  160. {{ scope.row.UNITPRICE * scope.row.QTY }}
  161. </template> -->
  162. </el-table-column>
  163. </el-table>
  164. </div>
  165. </van-collapse-item>
  166. </van-collapse>
  167. </van-tab>
  168. <van-tab title="属性信息" name="outsidePlan">
  169. <van-field readonly label="属性" v-if="dictTypeFormShow" v-model="list.tcfxName" />
  170. </van-tab>
  171. </van-tabs>
  172. <br />
  173. <br />
  174. <br />
  175. <br />
  176. <br />
  177. <br />
  178. <!-- 未结案 未提交状态下可关闭门店、提交审核 -->
  179. <div class="bottomBtn">
  180. <van-button color="red" round @click="rejectReasonShow = true">退回</van-button>
  181. <van-button type="primary" round @click="approvalStoreFun('success')">通过</van-button>
  182. </div>
  183. </div>
  184. <!-- 退回原因填写 -->
  185. <van-popup v-model="rejectReasonShow" class="rejectMsgBox" closeable round position="bottom">
  186. <div class="title">退回原因</div>
  187. <div class="content">
  188. <van-field
  189. v-model="rejectMessage"
  190. rows="2"
  191. autosize
  192. type="textarea"
  193. maxlength="300"
  194. placeholder="请输入退回原因" />
  195. </div>
  196. <div class="btnBox">
  197. <van-button type="primary" round @click="rejectReasonSubmit">提交</van-button>
  198. </div>
  199. </van-popup>
  200. <!-- 提交审核后退回原因 只有同城分销店显示 -->
  201. <van-popup v-model="rejectMsgShow" class="rejectMsgBox" closeable round position="bottom">
  202. <div class="title">退回详情</div>
  203. <div class="content">
  204. <div class="rejectMsgItem" v-for="(item, index) in rejectMsg" :key="index">
  205. <div class="item approver">
  206. <span class="label">审批人:</span>
  207. <span class="value">{{ item.approvalUserName }}</span>
  208. </div>
  209. <div class="item approvalTime">
  210. <span class="label">审批时间:</span>
  211. <span class="value">{{ item.approvalTime }}</span>
  212. </div>
  213. <div class="item rejectCause">
  214. <span class="label">退回原因:</span>
  215. <span class="value">{{ item.approvalDesc }}</span>
  216. </div>
  217. </div>
  218. </div>
  219. </van-popup>
  220. </div>
  221. </template>
  222. <script>
  223. import { ImagePreview } from 'vant';
  224. import {
  225. getById,
  226. getStoreTypeList,
  227. getStoreyslTypeList,
  228. getTCFXList,
  229. getSJSList,
  230. getQGJZist,
  231. getCustomerInfoList,
  232. getCustomerNatureList,
  233. getMainProjectList,
  234. getMainRelationList,
  235. getManagementModelList,
  236. getpotentialCustomerTypeList,
  237. getOrderByStoreCode,
  238. approvalStore,
  239. storeApprovaHistory,
  240. } from '@/api/index';
  241. import mapmarker from '@/components/mapMarker';
  242. import viewUploadImg from '@/components/viewUploadImg';
  243. import txmapimg1 from '@/assets/txmap1.svg';
  244. import txmapimg2 from '@/assets/txmap2.svg';
  245. import txmapimg3 from '@/assets/marker_blue.png';
  246. import axios from 'axios';
  247. import uploadImg from '@/components/viewaddreddUploadImg.vue';
  248. export default {
  249. components: { uploadImg, mapmarker, viewUploadImg },
  250. data() {
  251. return {
  252. tabVal: 'insidePlan',
  253. list: {},
  254. txmapimg1: txmapimg1,
  255. txmapimg2: txmapimg2,
  256. txmapimg3: txmapimg3,
  257. storeId: '',
  258. vaue: '',
  259. show: false,
  260. storeTypeList: [],
  261. ManagementModelList: [],
  262. MainRelationList: [],
  263. MainProjectList: [],
  264. CustomerNatureList: [],
  265. CustomerInfoList: [],
  266. potentialCustomerTypeList: [],
  267. dictTypeFormShow: false,
  268. DIYshow: false,
  269. visitListList: [],
  270. TCFXList: [],
  271. QGJZist: [],
  272. SJSList: [],
  273. storeName: '名称',
  274. address: '地址',
  275. storeTypePOP: false,
  276. GZAttributeFormShow: false,
  277. pageShow: false,
  278. rejectMsgShow: false,
  279. //退回原因详情列表
  280. rejectMsg: [],
  281. activeNames: [],
  282. orderList: [],
  283. rejectReasonShow: false, //退回提交原因
  284. rejectMessage: '',
  285. };
  286. },
  287. activated() {
  288. this.getCustomerInfoList();
  289. this.getManagementModelList();
  290. this.getMainRelationList();
  291. this.getMainProjectList();
  292. this.getCustomerNatureList();
  293. this.getTCFXList();
  294. this.getSJSList();
  295. this.getQGJZist();
  296. this.getStoreType();
  297. this.getpotentialCustomerTypeList();
  298. this.visitListList = [];
  299. window.scrollTo(0, 0);
  300. this.storeApprovaHistoryFun();
  301. },
  302. methods: {
  303. storeApprovaHistoryFun() {
  304. storeApprovaHistory({ storeId: this.$route.query.id }).then((res) => {
  305. this.rejectMsg = res.data || [];
  306. });
  307. },
  308. getCustomerInfoList() {
  309. getCustomerInfoList().then((res) => {
  310. var CustomerInfoList = [];
  311. for (var t = 0; t < res.data.length; t++) {
  312. CustomerInfoList.push({
  313. text: res.data[t].dictLabel,
  314. dictCode: res.data[t].dictValue,
  315. });
  316. }
  317. this.CustomerInfoList = CustomerInfoList;
  318. });
  319. },
  320. getCustomerNatureList() {
  321. getCustomerNatureList().then((res) => {
  322. var CustomerNatureList = [];
  323. for (var t = 0; t < res.data.length; t++) {
  324. CustomerNatureList.push({
  325. text: res.data[t].dictLabel,
  326. dictCode: res.data[t].dictValue,
  327. });
  328. }
  329. this.CustomerNatureList = CustomerNatureList;
  330. });
  331. },
  332. getpotentialCustomerTypeList() {
  333. getpotentialCustomerTypeList().then((res) => {
  334. var potentialCustomerTypeList = [];
  335. for (var t = 0; t < res.data.length; t++) {
  336. potentialCustomerTypeList.push({
  337. text: res.data[t].dictLabel,
  338. dictCode: res.data[t].dictValue,
  339. });
  340. }
  341. this.potentialCustomerTypeList = potentialCustomerTypeList;
  342. });
  343. },
  344. getMainProjectList() {
  345. getMainProjectList().then((res) => {
  346. var MainProjectList = [];
  347. for (var t = 0; t < res.data.length; t++) {
  348. MainProjectList.push({
  349. text: res.data[t].dictLabel,
  350. dictCode: res.data[t].dictValue,
  351. });
  352. }
  353. this.MainProjectList = MainProjectList;
  354. });
  355. },
  356. getMainRelationList() {
  357. getMainRelationList().then((res) => {
  358. var MainRelationList = [];
  359. for (var t = 0; t < res.data.length; t++) {
  360. MainRelationList.push({
  361. text: res.data[t].dictLabel,
  362. dictCode: res.data[t].dictValue,
  363. });
  364. }
  365. this.MainRelationList = MainRelationList;
  366. });
  367. },
  368. getManagementModelList() {
  369. getManagementModelList().then((res) => {
  370. var ManagementModelList = [];
  371. for (var t = 0; t < res.data.length; t++) {
  372. ManagementModelList.push({
  373. text: res.data[t].dictLabel,
  374. dictCode: res.data[t].dictValue,
  375. });
  376. }
  377. this.ManagementModelList = ManagementModelList;
  378. });
  379. },
  380. getSJSList() {
  381. getSJSList({}).then((res) => {
  382. var SJSList = [];
  383. for (var t = 0; t < res.data.length; t++) {
  384. SJSList.push({
  385. text: res.data[t].dictLabel,
  386. dictCode: res.data[t].dictValue,
  387. });
  388. }
  389. this.SJSList = SJSList;
  390. });
  391. },
  392. getQGJZist() {
  393. getQGJZist({}).then((res) => {
  394. var QGJZist = [];
  395. for (var t = 0; t < res.data.length; t++) {
  396. QGJZist.push({
  397. text: res.data[t].dictLabel,
  398. dictCode: res.data[t].dictValue,
  399. });
  400. }
  401. this.QGJZist = QGJZist;
  402. });
  403. },
  404. getTCFXList() {
  405. getTCFXList({}).then((res) => {
  406. var TCFXList = [];
  407. for (var t = 0; t < res.data.length; t++) {
  408. TCFXList.push({
  409. text: res.data[t].dictLabel,
  410. dictCode: res.data[t].dictCode,
  411. });
  412. }
  413. this.TCFXList = TCFXList;
  414. });
  415. },
  416. visitsFn(row) {
  417. this.$router.push({
  418. path: '/historicalDetails',
  419. query: {
  420. visitId: row.id,
  421. storeCode: row.storeCode,
  422. storeId: row.storeId,
  423. },
  424. });
  425. },
  426. setImgSrc(imgUrl) {
  427. let imgArr = imgUrl.split(',');
  428. return imgArr[0];
  429. },
  430. deleteImgs(val) {
  431. ImagePreview(val.split(','));
  432. },
  433. getStoreType() {
  434. if (localStorage.getItem('storeType') == '2') {
  435. this.DIYshow = true;
  436. getStoreyslTypeList({}).then((res) => {
  437. this.storeTypeList = res.data;
  438. this.getDetail();
  439. });
  440. } else {
  441. this.DIYshow = false;
  442. getStoreTypeList({}).then((res) => {
  443. this.storeTypeList = res.data;
  444. this.getDetail();
  445. });
  446. }
  447. },
  448. getDetail() {
  449. this.pageShow = false;
  450. let loading1 = this.$toast.loading({
  451. duration: 0,
  452. message: '加载中...',
  453. forbidClick: true,
  454. });
  455. getById({ storeId: this.$route.query.id }).then((res) => {
  456. loading1.clear();
  457. this.pageShow = true;
  458. localStorage.setItem('locationRemark', res.data.addressLine);
  459. localStorage.setItem('orgName', res.data.orgName);
  460. localStorage.setItem('chainName', res.data.storeName);
  461. if (res.code == 200) {
  462. this.list = res.data;
  463. if (this.list.carShopImgList != null) {
  464. } else {
  465. this.list.carShopImgList = [];
  466. }
  467. if (this.list.storeCategory == 'C917') {
  468. this.GZAttributeFormShow = true;
  469. this.dictTypeSJSFormShow = false;
  470. this.dictTypeQGJZFormShow = false;
  471. this.dictTypeFormShow = false;
  472. this.dictTypeAFormShow = false;
  473. for (let k = 0; k < this.potentialCustomerTypeList.length; k++) {
  474. if (this.potentialCustomerTypeList[k].dictCode == this.list.potentialCustomerType) {
  475. this.list.potentialCustomerType = this.potentialCustomerTypeList[k].text;
  476. }
  477. }
  478. } else {
  479. this.GZAttributeFormShow = false;
  480. }
  481. if (this.list.storeCategory == '129081') {
  482. this.dictTypeFormShow = true;
  483. if (this.list.attribute3 != '0' && this.list.attribute3 != null) {
  484. this.list.tcfxName = this.list.attribute3;
  485. } else {
  486. this.list.tcfxName = this.list.attribute5;
  487. }
  488. }
  489. if (this.list.storeCategory == '10131') {
  490. this.dictTypeFormShow = true;
  491. for (var k = 0; k < this.TCFXList.length; k++) {
  492. if (this.TCFXList[k].dictCode == this.list.tcfxName) {
  493. this.list.tcfxName = this.TCFXList[k].text;
  494. }
  495. }
  496. }
  497. if (this.list.storeCategory == 'sjs61') {
  498. this.dictTypeFormShow = true;
  499. for (var k = 0; k < this.SJSList.length; k++) {
  500. if (this.SJSList[k].dictCode == this.list.tcfxName) {
  501. this.list.tcfxName = this.SJSList[k].text;
  502. }
  503. }
  504. }
  505. if (this.list.storeCategory == 'zyjz63') {
  506. this.dictTypeFormShow = true;
  507. for (var k = 0; k < this.QGJZist.length; k++) {
  508. if (this.QGJZist[k].dictCode == this.list.tcfxName) {
  509. this.list.tcfxName = this.QGJZist[k].text;
  510. }
  511. }
  512. }
  513. if (this.list.storeCategory == 'C912') {
  514. this.storeTypePOP = false;
  515. this.storeName = '铭牌上项目名称';
  516. this.address = '地址';
  517. } else if (this.list.storeCategory == 'C917') {
  518. this.storeTypePOP = false;
  519. this.storeName = '名称';
  520. this.address = '地址';
  521. } else {
  522. this.storeTypePOP = true;
  523. this.storeName = '名称';
  524. this.address = '地址';
  525. }
  526. // 获取门店订单
  527. this.getStoreOrderList(this.list.storeCode);
  528. } else {
  529. this.$toast.fail(res.msg);
  530. }
  531. });
  532. },
  533. // 获取门店订单
  534. getStoreOrderList(storeCode) {
  535. getOrderByStoreCode({ storeCode: storeCode }).then((res) => {
  536. if (res.code == 200 && res.data) {
  537. let orderList = res.data.ORDERS || [];
  538. if (orderList.length) {
  539. let orderMap = new Map();
  540. for (let i = 0; i < orderList.length; i++) {
  541. if (orderMap.has(orderList[i].ORDERID)) {
  542. orderMap.get(orderList[i].ORDERID).productDetail.push(orderList[i]);
  543. } else {
  544. let orderObj = {
  545. ORDERID: orderList[i].ORDERID, // 订单id
  546. ORDERDATE: orderList[i].ORDERDATE, //下单时间
  547. STATUS_DESCR: orderList[i].STATUS_DESCR, // 订单状态
  548. productDetail: [orderList[i]], // 订单详情
  549. };
  550. orderMap.set(orderList[i].ORDERID, orderObj);
  551. }
  552. }
  553. // totalPrice:
  554. let orderListArr = [];
  555. for (let value of orderMap.values()) {
  556. let productTotalPrice = 0; //当前订单总金额
  557. for (let i = 0; i < value.productDetail.length; i++) {
  558. value.productDetail[i].productTotalPrice =
  559. value.productDetail[i].UNITPRICE * value.productDetail[i].QTY; // 单个商品总金额
  560. productTotalPrice = productTotalPrice + value.productDetail[i].productTotalPrice;
  561. }
  562. value.totalPrice = productTotalPrice;
  563. orderListArr.push(value);
  564. }
  565. this.orderList = orderListArr;
  566. } else {
  567. this.orderList = [];
  568. }
  569. this.activeNames = ['1'];
  570. }
  571. });
  572. },
  573. getSummaries(param) {
  574. const { columns, data } = param;
  575. const sums = [];
  576. columns.forEach((column, index) => {
  577. if (index === 0) {
  578. sums[index] = '总金额';
  579. return;
  580. }
  581. if (index === 2) {
  582. const values = data.map((item) => Number(item[column.property]));
  583. sums[index] = values.reduce((prev, curr) => {
  584. const value = Number(curr);
  585. if (!isNaN(value)) {
  586. return prev + curr;
  587. } else {
  588. return prev;
  589. }
  590. }, 0);
  591. // sums[index] += ' 元';
  592. }
  593. // const values = data.map((item) => Number(item[column.property]));
  594. // if (!values.every((value) => isNaN(value))) {
  595. // sums[index] = values.reduce((prev, curr) => {
  596. // const value = Number(curr);
  597. // if (!isNaN(value)) {
  598. // return prev + curr;
  599. // } else {
  600. // return prev;
  601. // }
  602. // }, 0);
  603. // sums[index] += ' 元';
  604. // } else {
  605. // sums[index] = 'N/A';
  606. // }
  607. });
  608. return sums;
  609. },
  610. formLink() {
  611. this.$router.push('/storeVisit/questions');
  612. },
  613. onClickLeft() {
  614. this.$router.go(-1);
  615. },
  616. tabChange(name, title) {
  617. console.log(name, title);
  618. },
  619. // 退回原因查看详情
  620. examineDetail() {
  621. this.rejectMsgShow = true;
  622. },
  623. // 退回提交
  624. rejectReasonSubmit() {
  625. if (this.rejectMessage != '') {
  626. this.approvalStoreFun('reject');
  627. } else {
  628. this.$notify({ type: 'warning', message: '请输入退回原因' });
  629. }
  630. },
  631. approvalStoreFun(type) {
  632. this.toastLoading(0, '正在提交...', true);
  633. // processApprovalStatus(2=通过,3=拒绝)
  634. let processApprovalStatus = type == 'reject' ? 3 : 2;
  635. let approvalDesc = type == 'reject' ? this.rejectMessage : '';
  636. let params = {
  637. approvalId: this.$route.query.approvalId, // 店铺id
  638. processApprovalStatus: processApprovalStatus, // 审批类型
  639. };
  640. if (type == 'reject') {
  641. params.approvalDesc = approvalDesc;
  642. }
  643. approvalStore(params).then((res) => {
  644. this.toastLoading().clear();
  645. if (res.code == 200) {
  646. this.$toast.success('提交成功');
  647. this.rejectReasonShow = false;
  648. this.onClickLeft();
  649. } else {
  650. this.$toast.fail(res.msg);
  651. }
  652. });
  653. },
  654. },
  655. };
  656. </script>
  657. <style scoped lang="scss">
  658. .container {
  659. padding-bottom: 50px;
  660. }
  661. .myTab .van-tabs__nav--card {
  662. margin: 0 !important;
  663. border-left: 0;
  664. border-right: 0;
  665. }
  666. .myTab .van-tabs__wrap,
  667. .van-tabs__nav--card {
  668. height: 40px;
  669. }
  670. .myTab .van-tab {
  671. line-height: 40px;
  672. }
  673. .helpPageMask {
  674. width: 100%;
  675. height: 100%;
  676. background: rgba(116, 116, 116, 0.8);
  677. position: fixed;
  678. z-index: 100000;
  679. top: 0;
  680. right: 0;
  681. left: 0;
  682. bottom: 0;
  683. display: flex;
  684. align-items: center;
  685. justify-content: center;
  686. }
  687. .bottomBtn {
  688. position: fixed;
  689. bottom: 0;
  690. z-index: 10;
  691. height: 50px;
  692. width: 100%;
  693. display: flex;
  694. flex-direction: row;
  695. justify-content: space-around;
  696. .van-button {
  697. /* flex: 1; */
  698. width: 40%;
  699. }
  700. }
  701. .rejectMsg {
  702. position: sticky;
  703. top: 46px;
  704. z-index: 10;
  705. display: flex;
  706. box-sizing: border-box;
  707. width: 100%;
  708. padding: 10px 16px;
  709. overflow: hidden;
  710. color: #323233;
  711. font-size: 14px;
  712. line-height: 24px;
  713. background-color: #f5daac;
  714. font-weight: 600;
  715. .label {
  716. width: 6.2em;
  717. margin-right: 12px;
  718. }
  719. .value {
  720. flex: 1;
  721. overflow: hidden;
  722. text-overflow: ellipsis;
  723. display: -webkit-box;
  724. -webkit-line-clamp: 2;
  725. -webkit-box-orient: vertical;
  726. padding-right: 20px;
  727. }
  728. .examineDetail {
  729. width: 70px;
  730. color: #0057ba;
  731. }
  732. }
  733. .rejectMsgBox {
  734. min-height: 30%;
  735. max-height: 50%;
  736. padding: 10px 20px;
  737. display: flex;
  738. flex-direction: column;
  739. overflow: hidden;
  740. .title {
  741. padding: 10px 0;
  742. text-align: center;
  743. font-size: 16px;
  744. font-weight: 600px;
  745. }
  746. .content {
  747. flex: 1;
  748. overflow-y: auto;
  749. .rejectMsgItem {
  750. margin-bottom: 20px;
  751. .item {
  752. padding: 5px 0;
  753. span {
  754. display: inline-block;
  755. }
  756. }
  757. .label {
  758. width: 80px;
  759. font-size: 14px;
  760. font-weight: 600;
  761. }
  762. .value {
  763. font-size: 14px;
  764. }
  765. }
  766. }
  767. .btnBox {
  768. height: 44px;
  769. button {
  770. width: 100%;
  771. }
  772. }
  773. }
  774. .orderList {
  775. .orderItem {
  776. .orderTitle {
  777. padding: 5px 0;
  778. font-size: 16px;
  779. font-weight: 600;
  780. color: #000;
  781. display: flex;
  782. align-items: center;
  783. &::before {
  784. content: '';
  785. width: 8px;
  786. height: 8px;
  787. background: red;
  788. border-radius: 50%;
  789. display: inline-block;
  790. margin-right: 5px;
  791. }
  792. }
  793. }
  794. }
  795. </style>
  796. <style lang="scss">
  797. .searchDiv {
  798. .van-search {
  799. /* // background: #fff; */
  800. }
  801. .van-search__action {
  802. font-size: 14px;
  803. color: #0057ba;
  804. font-weight: bold;
  805. background: #f1f1f1;
  806. border-bottom-right-radius: 60px;
  807. border-top-right-radius: 60px;
  808. border: 1px solid #ccc;
  809. padding: 0 20px;
  810. }
  811. .van-search--show-action {
  812. padding-right: 12px;
  813. }
  814. .van-search__content {
  815. border: 1px solid #ccc;
  816. border-bottom-left-radius: 60px;
  817. border-top-left-radius: 60px;
  818. background: #f1f1f1;
  819. border-right: 0;
  820. }
  821. }
  822. .helpAlert {
  823. .van-dialog__cancel {
  824. .van-button__text {
  825. &::before {
  826. content: '?';
  827. background: #f79200;
  828. width: 20px;
  829. display: inline-block;
  830. border-radius: 50%;
  831. color: #fff;
  832. }
  833. }
  834. }
  835. }
  836. </style>