handleThree.vue 13 KB

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