handle.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  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>
  9. </view>
  10. <view class="box order_detail">
  11. <view v-if="current == 0">
  12. <view class="item ctt">订单确认</view>
  13. </view>
  14. <view v-if="current == 1">
  15. <view class="item ctt">进口申报确认</view>
  16. </view>
  17. <view class="expand" v-if="current == 0" :style="{height:expand?'auto':'340px'}">
  18. <view class="item">
  19. <text class="label">订单编号</text>
  20. <text class="desc omit">{{ item.tradeNo }}</text>
  21. </view>
  22. <view class="item">
  23. <text class="label">结算单号</text>
  24. <text class="desc omit">{{ item.settleBillNo }}</text>
  25. </view>
  26. <view class="item">
  27. <text class="label">预申报编号</text>
  28. <text class="desc omit">{{ item.platSeqNo }}</text>
  29. </view>
  30. <view class="item">
  31. <text class="label">买家</text>
  32. <text class="desc omit">{{ item.buyUserName }}</text>
  33. </view>
  34. <view class="item">
  35. <text class="label">车牌号</text>
  36. <text class="desc">{{ item.veNo }}</text>
  37. </view>
  38. <view class="item">
  39. <text class="label">商品名称</text>
  40. <text class="desc">{{ item.goodsNames }}</text>
  41. </view>
  42. <view class="item">
  43. <text class="label">申报时间</text>
  44. <text class="desc">{{ item.applyTime }}</text>
  45. </view>
  46. <view class="item">
  47. <text class="label">申报金额</text>
  48. <text class="desc">¥ {{ item.totalPrice }}</text>
  49. </view>
  50. <view class="item">
  51. <text class="label">净重(kg)</text>
  52. <text class="desc">{{ item.netWt }}</text>
  53. </view>
  54. <view class="item">
  55. <text class="label">毛重(kg)</text>
  56. <text class="desc">{{ item.grossWt }}</text>
  57. </view>
  58. <view class="item">
  59. <text class="label">申报数量</text>
  60. <text class="desc">{{ item.buyQty }}</text>
  61. </view>
  62. <view class="item">
  63. <text class="label">商户名称</text>
  64. <text class="desc">{{ item.enterpriseName }}</text>
  65. </view>
  66. <view class="item">
  67. <text class="label">交易地区名称</text>
  68. <text class="desc">{{ item.tradeAreaName }}</text>
  69. </view>
  70. <view class="item">
  71. <text class="label">进口预申报号</text>
  72. <text class="desc">{{ item.preIeportNo }}</text>
  73. </view>
  74. <view class="item">
  75. <text class="label">批次预录入号</text>
  76. <text class="desc">{{ item.preNo }}</text>
  77. </view>
  78. </view>
  79. <view class="expand" v-else :style="{height:expand?'auto':'300px'}">
  80. <view class="item">
  81. <text class="label">业务编号</text>
  82. <text class="desc omit">{{ item2.platSeqNo }}</text>
  83. </view>
  84. <view class="item">
  85. <text class="label">预录入编号</text>
  86. <text class="desc">{{ item2.preNo }}</text>
  87. </view>
  88. <view class="item">
  89. <text class="label">进境申报单编号</text>
  90. <text class="desc">{{ item2.itrdclDeclareId }}</text>
  91. </view>
  92. <view class="item">
  93. <text class="label">申报类型</text>
  94. <text class="desc">
  95. <text v-if=" item2.declareType==1">个人申报</text>
  96. <text v-if=" item2.declareType==2">商铺或代理人</text>
  97. <text v-if=" item2.declareType==3">合作社</text>
  98. <text v-if=" item2.declareType==4">互助组</text>
  99. </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.sumAmt }}</text>
  124. </view>
  125. <view class="item">
  126. <text class="label">总毛重({{item.goodsUnit }})</text>
  127. <text class="desc">{{ item2.sumGrossWt }}</text>
  128. </view>
  129. <view class="item">
  130. <text class="label">总净重({{item.goodsUnit }})</text>
  131. <text class="desc">{{ item2.sumNetWt }}</text>
  132. </view>
  133. <view class="item">
  134. <text class="label">件数</text>
  135. <text class="desc">{{ item2.packNo }}</text>
  136. </view>
  137. <view class="item">
  138. <text class="label">车牌号</text>
  139. <text class="desc">{{ item2.veNo }}</text>
  140. </view>
  141. <view class="item" v-if="item2.declareType == '3' || item2.declareType == '4'">
  142. <text class="label" v-if="item2.declareType == '3'">互助组备案编号</text>
  143. <text class="label" v-if="item2.declareType == '4'">合作社备案编号</text>
  144. <text class="desc">¥ {{ item2.orgPutrecNo }}</text>
  145. </view>
  146. <view class="item" v-if="item2.declareType == '3' || item2.declareType == '4'">
  147. <text class="label" v-if="item2.declareType == '3'">互助组名称</text>
  148. <text class="label" v-if="item2.declareType == '4'">合作社名称</text>
  149. <text class="desc">¥ {{ item2.orgName }}</text>
  150. </view>
  151. <view class="item" v-if="item2.declareType == '4'">
  152. <text class="label">合作社信用代码</text>
  153. <text class="desc">¥ {{ item2.orgScc }}</text>
  154. </view>
  155. <view class="item">
  156. <text class="label">监管场所</text>
  157. <text class="desc">{{ item2.fieldName }}</text>
  158. </view>
  159. <view class="item">
  160. <text class="label">贸易国别</text>
  161. <text class="desc">{{ item2.tradeCountry }}</text>
  162. </view>
  163. <view class="item">
  164. <text class="label">企业编码</text>
  165. <text class="desc">{{ item2.entCode }}</text>
  166. </view>
  167. <view class="item">
  168. <text class="label">企业名称</text>
  169. <text class="desc">{{ item2.entName }}</text>
  170. </view>
  171. </view>
  172. <view class="more" @click="expand = !expand">
  173. <text class="icon">&#xe649;</text>
  174. <text>{{expand?'收起':'更多信息'}}</text>
  175. </view>
  176. </view>
  177. </view>
  178. <view class="mfooter">
  179. <view class="flex">
  180. <view class="f">
  181. <button class="btn" @click="ok()">确定</button>
  182. </view>
  183. </view>
  184. </view>
  185. </view>
  186. </template>
  187. <script>
  188. export default {
  189. data() {
  190. return {
  191. ip: this.http.ip,
  192. imgList: [],
  193. expand: false, //展开
  194. current: 0,
  195. item: {},
  196. item2: {},
  197. orderId: '',
  198. peopleConfirmStatus: '',
  199. cooperEntrustStatus: '',
  200. applyConfirmStatus: '',
  201. cooper_entrust: 2
  202. };
  203. },
  204. onLoad(e) {
  205. if (e.orderId && e.peopleConfirmStatus && e.applyConfirmStatus) {
  206. this.orderId = e.orderId;
  207. this.peopleConfirmStatus = e.peopleConfirmStatus;
  208. this.cooperEntrustStatus = e.cooperEntrustStatus;
  209. this.applyConfirmStatus = e.applyConfirmStatus;
  210. if(this.peopleConfirmStatus == 0) {
  211. this.current = 0;
  212. this.getData1();
  213. } else if(this.peopleConfirmStatus == 1 && this.applyConfirmStatus == 0) {
  214. this.current = 1;
  215. this.getData2();
  216. }
  217. }
  218. //人脸认证回调
  219. uni.$on('face',res=>{
  220. if(res){
  221. this.confirmFn()
  222. }
  223. })
  224. },
  225. methods: {
  226. confirmFn(){
  227. if (this.current == 0){
  228. this.http.request({
  229. url: '/level-one-server/app/TbOrder/confirmOrder',
  230. method: 'POST',
  231. data: { orderId: this.item.id },
  232. success: res => {
  233. uni.showToast({ title: '订单确认成功' });
  234. this.current = 1;
  235. uni.setNavigationBarTitle({ title: '互助委托确认' });
  236. this.getData2();
  237. }
  238. });
  239. }
  240. if (this.current == 1){
  241. this.http.request({
  242. url: '/level-one-server/app/TbOrder/applyOrder',
  243. method: 'POST',
  244. data: { orderId: this.orderId },
  245. success: res => {
  246. uni.showToast({ title: '进口申报确认成功' });
  247. setTimeout(() => {
  248. uni.switchTab({ url: '/pages/index/index' });
  249. }, 1000);
  250. }
  251. });
  252. }
  253. },
  254. getData1() {
  255. this.http.request({
  256. url: '/level-one-server/app/TbOrder/orderDetail',
  257. data: { orderId: this.orderId },
  258. success: res => {
  259. this.item = res.data.data;
  260. }
  261. });
  262. },
  263. getData2() {
  264. this.http.request({
  265. url: '/level-one-server/app/TbImportOrder/importOrderDetail',
  266. data: { orderId: this.orderId },
  267. success: res => {
  268. this.item2 = res.data.data;
  269. JSON.parse(this.item2.cooperEntrustImg).map(item => this.imgList.push(item))
  270. console.log("-----5-----"+this.imgList)
  271. }
  272. });
  273. },
  274. ok() {
  275. //根据不同的步骤提交不同的url或者状态参数
  276. if (this.current == 0) {
  277. uni.showModal({
  278. title: '提示',
  279. content: '我已核对信息无误',
  280. success: res => {
  281. if (res.confirm) {
  282. //return;
  283. //跳转到人脸认证
  284. uni.navigateTo({url:'/pages/face/faceRegister?type=2'})
  285. }
  286. }
  287. });
  288. }
  289. if (this.current == 1) {
  290. //进口确认不用刷脸
  291. uni.showModal({
  292. title: '提示',
  293. content: '我已核对信息无误',
  294. success: res => {
  295. if (res.confirm) {
  296. //return;
  297. //跳转到人脸认证
  298. this.confirmFn();
  299. //uni.navigateTo({url:'/pages/face/faceRegister?type=2'})
  300. }
  301. }
  302. });
  303. }
  304. }
  305. },
  306. destroyed() {
  307. uni.$off('face');
  308. }
  309. };
  310. </script>
  311. <style lang="scss">
  312. page {
  313. background-color: $pg;
  314. }
  315. .cmain{
  316. padding-bottom: 100px;
  317. }
  318. .expand {
  319. overflow: hidden;
  320. }
  321. .more {
  322. text-align: center;
  323. padding: 10px 10px 15px 10px;
  324. .icon {
  325. padding-right: 3px;
  326. }
  327. }
  328. .ctt {
  329. text-align: center;
  330. font-weight: bold;
  331. }
  332. </style>