orderInfo.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. <template>
  2. <view class="main">
  3. <view class="list_item margin-lr-sm u-margin-top-30">
  4. <view class="order-num flex justify-between u-font-28 u-padding-bottom-10 u-border-bottom"
  5. style="color:#909399;">
  6. <view class="">
  7. 订单号:{{order_info.order.orders.order_sn}}
  8. </view>
  9. <view class="u-font-26" style="color: #909399;">
  10. 联系电话:{{order_info.order.users.phone}}
  11. </view>
  12. </view>
  13. <view class="order-num u-margin-top-15 flex align-center u-padding-bottom-10 u-border-bottom">
  14. <u-avatar :src="order_info.order.users.avatar" size="100"></u-avatar>
  15. <view class="u-margin-left-20 flex-sub" style="color: #505559;">
  16. <view class="u-font-28" v-if="order_info.order.type==2">
  17. 评估类型:企业信用问题咨询
  18. </view>
  19. <view class="u-font-28" v-else>
  20. 评估类型:个人信用问题咨询
  21. </view>
  22. <view class="u-font-28">
  23. 评估用户:{{order_info.order.users.realname}}
  24. </view>
  25. <view class="u-font-28">
  26. 咨询项目个数:{{order_info.order.project_num}}
  27. </view>
  28. <view class="u-font-28 flex justify-between">
  29. <text>咨询总金额:{{order_info.order.price/100}}</text>
  30. <text class="u-font-30" style="color: #F1C453;">佣金:{{order_info.order.commission/100}}元</text>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="u-margin-top-10">
  35. <view class="">
  36. {{order_info.order.type == 2?'企业征信报告上传预览:':'个人征信报告上传预览:'}}
  37. </view>
  38. <view class="imageView u-margin-top-15">
  39. <image @click="viewImg(item)" class="u-margin-left-15" v-for="(item,index) in order_info.reports"
  40. :key="index" :src="item" mode=""></image>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="list_item margin-lr-sm u-margin-top-30">
  45. <view class="">
  46. <u-section title="咨询项目" :right="false"></u-section>
  47. </view>
  48. <view class="u-margin-top-15">
  49. <wyb-table ref="table" width="100%" :default-col-width="140" :headers="headers" :font-size="[25]"
  50. :contents="order_info.order.orders.order_project" />
  51. </view>
  52. <!-- <view class="flex align-center justify-end u-margin-top-15" v-if="order_info.order.status == 0">
  53. <button hover-class="none" @click="tipsOrder(order_info.order.id,4)"
  54. class="left_btn u-margin-right-10">拒接</button>
  55. <button style="color: #fff;background: #F1C453;border-color: #F1C453;margin: 0;" hover-class="none"
  56. class="left_btn" @click="tipsOrder(order_info.order.id,1)">接单</button>
  57. </view> -->
  58. <view class="flex align-center justify-between u-margin-top-20"
  59. v-if="order_info.order.status == 1&&order_info.order.is_change == 2">
  60. <button style="margin: 0;color: #fff;background: #F1C453;border-color: #F1C453;"
  61. @click="pdfView(order_info.order.orders.report_pdf_url)" hover-class="none"
  62. class="left_btn">查看PDF</button>
  63. <button style="margin: 0;color: #fff;background: #0CBB07;border-color: #0CBB07;"
  64. @click="tipsOrder(order_info.order.id,2)" hover-class="none" class="left_btn">提交订单</button>
  65. </view>
  66. <view class="flex align-center u-margin-top-15" v-else-if="order_info.order.status == 2">
  67. <text
  68. class="text-red">订单修复审核状态:{{order_info.order.verify_status == 0?'待审核':order_info.order.verify_status == 1?'审核通过':'审核失败'}}</text>
  69. </view>
  70. <view class="flex align-center u-margin-top-15" v-else-if="order_info.order.status == 3">
  71. <text class="text-green">订单修复审核状态:审核通过</text>
  72. </view>
  73. <view class="flex align-center u-margin-top-15" v-else-if="order_info.order.is_change == 1">
  74. <text class="text-yellow">改价审核中</text>
  75. </view>
  76. <view class="u-margin-top-15" v-if="order_info.order.verify_explain!=null">
  77. 审核未通过原因:{{order_info.order.verify_explain}}
  78. </view>
  79. </view>
  80. <view class="list_item margin-lr-sm u-margin-top-30" v-if="order_info.order.is_change == 0">
  81. <view class="">
  82. <u-section title="咨询项目与价格" :right="false"></u-section>
  83. </view>
  84. <view class="">
  85. <!-- <view class="margin-top-sm" v-for="(item,index) in order_info.project" :key="index">
  86. <view class="flex align-center justify-between" v-if="item.payment_status!=2">
  87. <view class="u-font-28 text-gray">
  88. {{item.appeal_state}}
  89. </view>
  90. <view class="flex align-center">
  91. <button style="color: #fff;background: #F1C453;border-color: #F1C453;margin: 0;"
  92. hover-class="none" class="updetedBtn" @click="open(item,index)">改价</button>
  93. <view class="u-margin-left-25 u-font-26 text-red">
  94. ¥{{item.price/100}}
  95. </view>
  96. </view>
  97. </view>
  98. </view> -->
  99. <checkbox-group @change="checkboxChange" class="u-border-bottom u-padding-bottom-20">
  100. <!-- 遍历raido框-->
  101. <label class="projectItem flex justify-between align-center margin-top-sm"
  102. v-for="(item, index) in order_info.project" :key="index">
  103. <!-- 选择框内容 -->
  104. <view class="item-checkbox" v-if="item.payment_status==1">
  105. <checkbox :value="index+''" :checked="item.payment_status > 1? true:false"
  106. :disabled="item.payment_status > 1? true:false" />
  107. <text class="checkbox-content">{{ item.appeal_state }}</text>
  108. </view>
  109. <!-- 对应选项的金额 -->
  110. <view class="item-money flex align-center" v-if="item.payment_status==1">
  111. <button style="color: #fff;background: #F1C453;border-color: #F1C453;margin: 0;"
  112. hover-class="none" class="updetedBtn" @click="open(item,index)">改价</button>
  113. <text class="text-red u-margin-left-20">¥{{ item.price/100 }}</text>
  114. </view>
  115. </label>
  116. </checkbox-group>
  117. <view class="margin-top-sm">
  118. <view class="text-red">
  119. *价格需与客户进行沟通
  120. </view>
  121. <view class="margin-top-xs justify-end flex align-center">
  122. <button style="color: #fff;background: #F1C453;border-color: #F1C453;margin: 0;width: 178rpx;"
  123. hover-class="none" class="left_btn"
  124. @click="submit_review(order_info.order.id,1)">提交改价审核</button>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. <view class="list_item margin-lr-sm u-margin-top-30" v-if="order_info.evaluate!=null">
  130. <view class="text-bold titleStyle">
  131. 评价
  132. </view>
  133. <view class="">
  134. <view class="margin-top-sm flex align-center">
  135. 星级评价:<sxRate :value="order_info.evaluate.score" activeColor="#BB3720" :disabled="true" :max="5">
  136. </sxRate>
  137. </view>
  138. <view class="margin-top-xs">
  139. 内容:{{order_info.evaluate.content}}
  140. </view>
  141. </view>
  142. </view>
  143. <u-modal v-model="showPrice" title="请输入金额" @confirm="confirmPrice" show-cancel-button
  144. :content-style="{'padding':'40rpx'}">
  145. <view class="slot-content">
  146. <u-input v-model="value" placeholder="请输入价格" />
  147. </view>
  148. </u-modal>
  149. <view class="flex align-center justify-between u-margin-top-15 footstyle" v-if="order_info.order.status == 0&&order_info.order.is_change == 0">
  150. <button hover-class="none" @click="tipsOrder(order_info.order.id,4)"
  151. class="left_btn u-margin-right-10" style="height: 62rpx;width: 344rpx;background: #7d7d7d;color: #fff;">拒接此单</button>
  152. <button style="color: #fff;background: #F1C453;border-color: #F1C453;margin: 0;height: 62rpx;width: 344rpx;" hover-class="none"
  153. class="left_btn" @click="tipsOrder(order_info.order.id,1)">不需要改价,直接接单</button>
  154. </view>
  155. <view class="cu-tabbar-height"></view>
  156. </view>
  157. </template>
  158. <script>
  159. import sxRate from '@/components/sx-rate/index.vue'
  160. import wybTable from '@/components/wyb-table/wyb-table.vue'
  161. export default {
  162. components: {
  163. wybTable,
  164. sxRate
  165. },
  166. data() {
  167. return {
  168. value: '',
  169. showPrice: false,
  170. order_id: '',
  171. order_info: {},
  172. headers: [{
  173. label: '管理机构',
  174. key: 'appeal_state'
  175. }, {
  176. label: '逾期次数',
  177. key: 'overdue_num'
  178. }, {
  179. label: '总金额',
  180. key: 'price_text'
  181. }, {
  182. label: '支付状态',
  183. key: 'payment_status_text'
  184. }, {
  185. label: '流程状态',
  186. key: 'process_status_text'
  187. }, {
  188. label: '账户类型',
  189. key: 'account_type_text'
  190. }, {
  191. label: '状态异常修复费用',
  192. key: 'account_status_price_text'
  193. }, {
  194. label: '五级分类修复费用',
  195. key: 'five_categories_price_text'
  196. }, {
  197. label: '服务费用',
  198. key: 'service_price_text'
  199. }],
  200. order_project_ids: [],
  201. currentIndex: 0
  202. }
  203. },
  204. onLoad(op) {
  205. this.getOrderInfo(op.id)
  206. },
  207. methods: {
  208. open(item, index) {
  209. this.currentIndex = index
  210. this.showPrice = true
  211. this.value = this.order_info.project[index].price / 100
  212. },
  213. confirmPrice() {
  214. this.order_info.project[this.currentIndex].price = this.value * 100
  215. },
  216. checkboxChange: function(e) {
  217. this.order_project_ids = e.detail.value;
  218. console.log(this.order_project_ids)
  219. },
  220. tipsOrder(id, status) {
  221. let arr = []
  222. if (this.vuex_user.is_auth != 2) {
  223. uni.showToast({
  224. title: "请先进行身份认证",
  225. icon: "none"
  226. })
  227. return false
  228. }
  229. if(this.order_project_ids.length>0){
  230. uni.showToast({
  231. title:"你已改价,请提交改价审核",
  232. icon:"none"
  233. })
  234. return false
  235. }
  236. let str = ''
  237. switch (status) {
  238. case 1:
  239. str = '是否接取该订单'
  240. break;
  241. case 4:
  242. str = '是否拒接该订单'
  243. break;
  244. case 2:
  245. str = '是否提交该订单'
  246. break;
  247. default:
  248. break;
  249. }
  250. uni.showModal({
  251. title: "温馨提示",
  252. content: str,
  253. success: (res) => {
  254. if (res.confirm) {
  255. this.updateOrder(id, status, arr, false)
  256. }
  257. }
  258. })
  259. },
  260. pdfView(pdf) {
  261. uni.navigateTo({
  262. url: './preview?url=' + pdf
  263. })
  264. },
  265. submit_review(id, status) {
  266. if (this.order_project_ids.length == 0) {
  267. uni.showToast({
  268. title: "请勾选修复项",
  269. icon: "none"
  270. })
  271. return false
  272. }
  273. uni.showModal({
  274. title: "温馨提示",
  275. content: '确认提交改价申请吗?',
  276. success: (res) => {
  277. if (res.confirm) {
  278. let arr = []
  279. this.order_project_ids.forEach(item => {
  280. arr.push({
  281. proj_id: this.order_info.project[item].id,
  282. price: this.order_info.project[item].price
  283. })
  284. })
  285. this.updateOrder(id, status, arr, true)
  286. }
  287. }
  288. })
  289. },
  290. async updateOrder(id, status, arr, isgai) {
  291. let data = await this.$u.post('managerOrder/updateOrder', {
  292. id,
  293. status,
  294. change: JSON.stringify(arr)
  295. })
  296. if (data.code == 200) {
  297. if (status == 4) {
  298. uni.navigateBack()
  299. } else {
  300. if (isgai) {
  301. this.order_info.order.is_change = 1
  302. } else {
  303. this.order_info.order.status = status
  304. this.order_info.order.is_change = 2
  305. }
  306. }
  307. } else {
  308. uni.showToast({
  309. title: res.message,
  310. icon: "none"
  311. })
  312. return false
  313. }
  314. },
  315. async getOrderInfo(id) {
  316. let res = await this.$u.post("managerOrder/orderDetail", {
  317. id: id
  318. })
  319. console.log(res.data.order.orders)
  320. if (res.code == 200) {
  321. this.order_info = res.data
  322. console.log(this.order_info.project)
  323. }
  324. },
  325. viewImg(img) {
  326. uni.previewImage({
  327. urls: this.order_info.reports,
  328. current: img
  329. });
  330. }
  331. }
  332. }
  333. </script>
  334. <style>
  335. .footstyle{
  336. position: fixed;
  337. bottom: 0rpx;
  338. width: 100%;
  339. background: #fff;
  340. /* height: 60rpx; */
  341. padding: 30rpx;
  342. }
  343. .list_item {
  344. padding: 20rpx;
  345. border-radius: 16rpx;
  346. box-shadow: 6rpx 6rpx 10rpx rgba(122, 122, 122, 0.2);
  347. background: #fff;
  348. }
  349. .order-num::after {
  350. border-color: #bbb;
  351. }
  352. .imageView image {
  353. width: 96rpx;
  354. height: 96rpx;
  355. }
  356. button::after {
  357. display: none;
  358. }
  359. .left_btn {
  360. padding: 0;
  361. color: #909399;
  362. border: 2rpx solid rgba(144, 147, 153, .5);
  363. border-radius: 8rpx;
  364. width: 124rpx;
  365. height: 44rpx;
  366. font-size: 28rpx;
  367. display: flex;
  368. justify-content: center;
  369. align-items: center;
  370. background: #fff;
  371. }
  372. .updetedBtn {
  373. padding: 0;
  374. color: #909399;
  375. border: 2rpx solid rgba(144, 147, 153, .5);
  376. border-radius: 8rpx;
  377. width: 90rpx;
  378. height: 44rpx;
  379. font-size: 28rpx;
  380. display: flex;
  381. justify-content: center;
  382. align-items: center;
  383. background: #fff;
  384. }
  385. .project .projectContent .projectItem {
  386. display: flex;
  387. justify-content: space-between;
  388. align-items: center;
  389. margin: 15px 0;
  390. }
  391. .projectItem .checkbox-content {
  392. padding-left: 10px;
  393. }
  394. .titleStyle {
  395. display: flex;
  396. /* justify-content: center; */
  397. align-items: center;
  398. }
  399. .titleStyle::before {
  400. content: '';
  401. width: 6rpx;
  402. height: 40rpx;
  403. background: #000;
  404. display: inline-block;
  405. margin-right: 10rpx;
  406. }
  407. </style>