handleThree.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433
  1. <template>
  2. <view>
  3. <view class="cmain">
  4. <view class="box order_detail" style="padding: 13px">
  5. <u-steps :current="current">
  6. <u-steps-item title="订单确认"></u-steps-item>
  7. <u-steps-item title="互助委托确认"></u-steps-item>
  8. <u-steps-item title="进口申报确认"></u-steps-item>
  9. </u-steps>
  10. </view>
  11. <view class="box order_detail">
  12. <view v-if="current == 0">
  13. <view class="item ctt">订单确认</view>
  14. </view>
  15. <view v-if="current == 1">
  16. <view class="item ctt">互助委托书</view>
  17. <view class="item desc">边民 {{ item.buyUserName }}(身份证号:4509231***12)委托代理边民互市(进口/入境)商品交易(进口/入境)商品交易信息如下:</view>
  18. </view>
  19. <view v-if="current == 2">
  20. <view class="item ctt">进口申报确认</view>
  21. </view>
  22. <view class="expand" v-if="current == 0" :style="{height:expand?'auto':'340px'}">
  23. <view class="item">
  24. <text class="label">订单编号</text>
  25. <text class="desc omit">{{ item.tradeNo }}</text>
  26. </view>
  27. <view class="item">
  28. <text class="label">结算单号</text>
  29. <text class="desc omit">{{ item.settleBillNo }}</text>
  30. </view>
  31. <view class="item">
  32. <text class="label">预申报编号</text>
  33. <text class="desc omit">{{ item.platSeqNo }}</text>
  34. </view>
  35. <view class="item">
  36. <text class="label">买家</text>
  37. <text class="desc omit">{{ item.buyUserName }}</text>
  38. </view>
  39. <view class="item">
  40. <text class="label">车牌号</text>
  41. <text class="desc">{{ item.veNo }}</text>
  42. </view>
  43. <view class="item">
  44. <text class="label">商品名称</text>
  45. <text class="desc">{{ item.goodsNames }}</text>
  46. </view>
  47. <view class="item">
  48. <text class="label">申报时间</text>
  49. <text class="desc">{{ item.applyTime }}</text>
  50. </view>
  51. <view class="item">
  52. <text class="label">申报金额</text>
  53. <text class="desc">¥ {{ item.totalPrice }}</text>
  54. </view>
  55. <view class="item">
  56. <text class="label">净重(kg)</text>
  57. <text class="desc">{{ item.netWt }}</text>
  58. </view>
  59. <view class="item">
  60. <text class="label">毛重(kg)</text>
  61. <text class="desc">{{ item.grossWt }}</text>
  62. </view>
  63. <view class="item">
  64. <text class="label">申报数量</text>
  65. <text class="desc">{{ item.buyQty }}</text>
  66. </view>
  67. <view class="item">
  68. <text class="label">商户名称</text>
  69. <text class="desc">{{ item.enterpriseName }}</text>
  70. </view>
  71. <view class="item">
  72. <text class="label">交易地区名称</text>
  73. <text class="desc">{{ item.tradeAreaName }}</text>
  74. </view>
  75. <view class="item">
  76. <text class="label">进口预申报号</text>
  77. <text class="desc">{{ item.preIeportNo }}</text>
  78. </view>
  79. <view class="item">
  80. <text class="label">批次预录入号</text>
  81. <text class="desc">{{ item.preNo }}</text>
  82. </view>
  83. </view>
  84. <view class="expand" v-else :style="{height:expand?'auto':'300px'}">
  85. <view class="item">
  86. <text class="label">业务编号</text>
  87. <text class="desc omit">{{ item2.platSeqNo }}</text>
  88. </view>
  89. <view class="item">
  90. <text class="label">预录入编号</text>
  91. <text class="desc">{{ item2.preNo }}</text>
  92. </view>
  93. <view class="item">
  94. <text class="label">进境申报单编号</text>
  95. <text class="desc">{{ item2.itrdclDeclareId }}</text>
  96. </view>
  97. <view class="item">
  98. <text class="label">申报人类型</text>
  99. <text class="desc">{{ item2.declareType }}</text>
  100. </view>
  101. <view class="item">
  102. <text class="label">申报人姓名</text>
  103. <text class="desc">{{ item2.declareName }}</text>
  104. </view>
  105. <view class="item">
  106. <text class="label">申报人身份证号</text>
  107. <text class="desc">{{ item2.ciphertextIdno }}</text>
  108. </view>
  109. <view class="item" v-if="item2.declareType == '2'">
  110. <text class="label">商铺编码</text>
  111. <text class="desc">{{ item2.shopNo }}</text>
  112. </view>
  113. <view class="item" v-if="item2.declareType == '2'">
  114. <text class="label">商铺名称</text>
  115. <text class="desc">{{ item2.shopName }}</text>
  116. </view>
  117. <view class="item">
  118. <text class="label">商品名称</text>
  119. <text class="desc">{{ item2.goodsNames }}</text>
  120. </view>
  121. <view class="item">
  122. <text class="label">商品额度</text>
  123. <text class="desc">{{ item2.glimit }}</text>
  124. </view>
  125. <view class="item">
  126. <text class="label">总金额</text>
  127. <text class="desc">{{ item2.sumAmt }}</text>
  128. </view>
  129. <view class="item">
  130. <text class="label">总毛重</text>
  131. <text class="desc">{{ item2.sumGrossWt }}</text>
  132. </view>
  133. <view class="item">
  134. <text class="label">总净重</text>
  135. <text class="desc">{{ item2.sumNetWt }}</text>
  136. </view>
  137. <view class="item">
  138. <text class="label">币制</text>
  139. <text class="desc">{{ item2.currCode }}</text>
  140. </view>
  141. <view class="item">
  142. <text class="label">件数</text>
  143. <text class="desc">{{ item2.packNo }}</text>
  144. </view>
  145. <view class="item">
  146. <text class="label">车牌号</text>
  147. <text class="desc">{{ item2.veNo }}</text>
  148. </view>
  149. <view class="item">
  150. <text class="label">运输方式</text>
  151. <text class="desc">{{ item2.trafMode }}</text>
  152. </view>
  153. <view class="item" v-if="item2.declareType == '3' || item2.declareType == '4'">
  154. <text class="label" v-if="item2.declareType == '3'">互助组备案编号</text>
  155. <text class="label" v-if="item2.declareType == '4'">合作社备案编号</text>
  156. <text class="desc">¥ {{ item2.orgPutrecNo }}</text>
  157. </view>
  158. <view class="item" v-if="item2.declareType == '3' || item2.declareType == '4'">
  159. <text class="label" v-if="item2.declareType == '3'">互助组名称</text>
  160. <text class="label" v-if="item2.declareType == '4'">合作社名称</text>
  161. <text class="desc">¥ {{ item2.orgName }}</text>
  162. </view>
  163. <view class="item" v-if="item2.declareType == '4'">
  164. <text class="label">合作社信用代码</text>
  165. <text class="desc">¥ {{ item2.orgScc }}</text>
  166. </view>
  167. <view class="item">
  168. <text class="label">监管场所</text>
  169. <text class="desc">{{ item2.fieldName }}</text>
  170. </view>
  171. <view class="item">
  172. <text class="label">贸易国别</text>
  173. <text class="desc">{{ item2.tradeCountry }}</text>
  174. </view>
  175. <view class="item">
  176. <text class="label">企业编码</text>
  177. <text class="desc">{{ item2.entCode }}</text>
  178. </view>
  179. <view class="item">
  180. <text class="label">企业名称</text>
  181. <text class="desc">{{ item2.entName }}</text>
  182. </view>
  183. <view class="item">
  184. <view class="lable">互助委托协议</view>
  185. <view v-for="(url,index) in imgList">
  186. <image :src="ip + url" style="margin-top: 20px; width: 200px;"></image>
  187. </view>
  188. </view>
  189. </view>
  190. <view class="more" @click="expand = !expand">
  191. <text class="icon">&#xe649;</text>
  192. <text>{{expand?'收起':'更多信息'}}</text>
  193. </view>
  194. </view>
  195. </view>
  196. <view class="mfooter">
  197. <view class="flex">
  198. <view class="f">
  199. <button class="btn" @click="ok()">确定</button>
  200. </view>
  201. </view>
  202. </view>
  203. </view>
  204. </template>
  205. <script>
  206. export default {
  207. data() {
  208. return {
  209. ip: this.http.ip,
  210. imgList: [],
  211. expand: false, //展开
  212. current: 0,
  213. item: {},
  214. item2: {},
  215. orderId: '',
  216. peopleConfirmStatus: '',
  217. cooperEntrustStatus: '',
  218. applyConfirmStatus: '',
  219. cooper_entrust: 2
  220. };
  221. },
  222. onLoad(e) {
  223. if (e.orderId && e.peopleConfirmStatus && e.cooperEntrustStatus && e.applyConfirmStatus) {
  224. this.orderId = e.orderId;
  225. this.peopleConfirmStatus = e.peopleConfirmStatus;
  226. this.cooperEntrustStatus = e.cooperEntrustStatus;
  227. this.applyConfirmStatus = e.applyConfirmStatus;
  228. if(this.peopleConfirmStatus == 0) {
  229. this.current = 0;
  230. this.getData1();
  231. } else if(this.peopleConfirmStatus == 1 && this.cooperEntrustStatus == 0) {
  232. this.current = 1;
  233. this.getData2();
  234. } else if(this.peopleConfirmStatus == 1 && this.cooperEntrustStatus == 1 && this.applyConfirmStatus == 0) {
  235. this.current = 2;
  236. this.getData2();
  237. }
  238. console.log('load:=====',+this.current)
  239. }
  240. //人脸认证回调
  241. uni.$on('face',res=>{
  242. console.log('current:=====',+this.current)
  243. this.confirmFn()
  244. })
  245. },
  246. methods: {
  247. confirmFn(){
  248. if (this.current == 0){
  249. this.http.request({
  250. url: '/level-one-server/app/TbOrder/confirmOrder',
  251. method: 'POST',
  252. data: { orderId: this.item.id },
  253. success: res => {
  254. uni.showToast({ title: '订单确认成功' });
  255. this.current = 1;
  256. uni.setNavigationBarTitle({ title: '互助委托确认' });
  257. this.getData2();
  258. }
  259. });
  260. }
  261. if (this.current == 1){
  262. // 是否校验互助委托书【1校验 2不校验】
  263. this.http.request({
  264. url: '/sp-admin/SpCfg/getCfg',
  265. method: 'POST',
  266. data: { cfgName: 'cooper_entrust_cfg' },
  267. success: res => {
  268. this.cooper_entrust = JSON.parse(res.data.data).cooper_entrust
  269. if(this.cooper_entrust == 1) {
  270. console.log("---1---this.imgList.length="+this.imgList.length)
  271. if(this.imgList.length == 0) {
  272. console.log("---2---")
  273. uni.showModal({
  274. content: "请上传互助委托协议!",
  275. success: res => {
  276. if(res.confirm) {
  277. uni.navigateTo({url: '/pages/personal/commissionAgreement?id='+this.item2.id})
  278. return;
  279. }
  280. }
  281. });
  282. return false;
  283. } else {
  284. console.log("---3---"+this.item2.judgeStatus)
  285. if(this.item2.judgeStatus == 0) {
  286. console.log("---4---")
  287. uni.showModal({
  288. content: "当前订单的互助委托协议未审核!请联系后台管理员进行审核!"
  289. });
  290. return false;
  291. }
  292. if(this.item2.judgeStatus == 2) {
  293. console.log("---5---")
  294. uni.showModal({
  295. content: "当前订单的互助委托协议审核未通过!请重新上传!",
  296. success: res => {
  297. if(res.confirm) {
  298. uni.navigateTo({url: '/pages/personal/commissionAgreement?id='+this.item2.id})
  299. return;
  300. }
  301. }
  302. });
  303. return false;
  304. }
  305. }
  306. }
  307. this.http.request({
  308. url: '/level-one-server/app/TbOrder/cooperOrder',
  309. method: 'POST',
  310. data: { orderId: this.orderId },
  311. success: res => {
  312. uni.showToast({ title: '互助委托确认成功' });
  313. this.current = 2;
  314. uni.setNavigationBarTitle({ title: '进口申报确认' });
  315. }
  316. });
  317. }
  318. })
  319. }
  320. if (this.current == 2){
  321. this.http.request({
  322. url: '/level-one-server/app/TbOrder/applyOrder',
  323. method: 'POST',
  324. data: { orderId: this.orderId },
  325. success: res => {
  326. uni.showToast({ title: '进口申报确认成功' });
  327. setTimeout(() => {
  328. uni.switchTab({ url: '/pages/index/index' });
  329. }, 1000);
  330. }
  331. });
  332. }
  333. },
  334. getData1() {
  335. this.http.request({
  336. url: '/level-one-server/app/TbOrder/orderDetail',
  337. data: { orderId: this.orderId },
  338. success: res => {
  339. this.item = res.data.data;
  340. }
  341. });
  342. },
  343. getData2() {
  344. this.http.request({
  345. url: '/level-one-server/app/TbImportOrder/importOrderDetail',
  346. data: { orderId: this.orderId },
  347. success: res => {
  348. this.item2 = res.data.data;
  349. JSON.parse(this.item2.cooperEntrustImg).map(item => this.imgList.push(item))
  350. console.log("-----5-----"+this.imgList)
  351. }
  352. });
  353. },
  354. ok() {
  355. //根据不同的步骤提交不同的url或者状态参数
  356. if (this.current == 0) {
  357. uni.showModal({
  358. title: '提示',
  359. content: '我已核对信息无误',
  360. success: res => {
  361. if (res.confirm) {
  362. //return;
  363. //跳转到人脸认证
  364. uni.navigateTo({url:'/pages/face/faceRegister?type=2'})
  365. }
  366. }
  367. });
  368. }
  369. if (this.current == 1) {
  370. uni.showModal({
  371. title: '提示',
  372. content: '我已核对信息无误',
  373. success: res => {
  374. if (res.confirm) {
  375. //return;
  376. //跳转到人脸认证
  377. uni.navigateTo({url:'/pages/face/faceRegister?type=2'})
  378. }
  379. }
  380. });
  381. }
  382. if (this.current == 2) {
  383. //进口确认不用刷脸
  384. uni.showModal({
  385. title: '提示',
  386. content: '我已核对信息无误',
  387. success: res => {
  388. if (res.confirm) {
  389. //return;
  390. //跳转到人脸认证
  391. this.confirmFn();
  392. //uni.navigateTo({url:'/pages/face/faceRegister?type=2'})
  393. }
  394. }
  395. });
  396. }
  397. }
  398. },
  399. destroyed() {
  400. uni.$off('face');
  401. }
  402. };
  403. </script>
  404. <style lang="scss">
  405. page {
  406. background-color: $pg;
  407. }
  408. .cmain{
  409. padding-bottom: 100px;
  410. }
  411. .expand {
  412. overflow: hidden;
  413. }
  414. .more {
  415. text-align: center;
  416. padding: 10px 10px 15px 10px;
  417. .icon {
  418. padding-right: 3px;
  419. }
  420. }
  421. .ctt {
  422. text-align: center;
  423. font-weight: bold;
  424. }
  425. </style>