index.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <view class="maintenance-container">
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="发货确认单" background-color="#157A2C" color="#fff" @clickLeft="back"></uni-nav-bar>
  4. <view class="maintenance-wrapper">
  5. <scroll-view :scroll-y='true' class="kd-baseInfo">
  6. <view class="kd-cell">
  7. <text class="kd-label">发货单:</text>
  8. <text class="kd-content">
  9. {{info.sendNo}}
  10. <!-- <u-input disabled v-mode='info.sendNo'>
  11. <template slot="suffix">
  12. </template>
  13. </u-input> -->
  14. </text>
  15. <button
  16. class="search_btn"
  17. @click="handleInvoiceList"
  18. text="选择"
  19. type="primary"
  20. size="mini"
  21. >选择</button>
  22. </view>
  23. <template>
  24. <view class="kd-cell">
  25. <text class="kd-label">回执附件:</text>
  26. <file-doc v-model="info.repliedFiles"></file-doc>
  27. <text class="kd-content text-warning"></text>
  28. </view>
  29. </template>
  30. </scroll-view>
  31. <template>
  32. <button class="btn-execute" type="primary" @click="handleSubmit">提交</button>
  33. <button class="btn-reassignment" type="error" @click="back">取消</button>
  34. </template>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. import fileDoc from '../doc/index.vue'
  40. import {
  41. saleordersendrecordInfo
  42. } from '@/api/saleManage/saleorder/index.js'
  43. export default {
  44. components: {fileDoc},
  45. data() {
  46. return {
  47. info: {
  48. sendNo:'',
  49. repliedFiles:[],
  50. },
  51. }
  52. },
  53. onLoad(options={}) {
  54. console.log(options,'====')
  55. // 详情
  56. if(options.id){
  57. this.getInfo(options.id)
  58. }
  59. },
  60. computed: {
  61. },
  62. methods: {
  63. back() {
  64. uni.navigateBack({
  65. url: '/pages/index/index'
  66. })
  67. },
  68. async getInfo(id) {
  69. const data = await saleordersendrecordInfo(id);
  70. if (data) {
  71. this.info = data;
  72. this.info.sendId = this.info.id
  73. this.info.sendNo = this.info.docNo
  74. this.info.docNo = ''
  75. this.info.id = ''
  76. }
  77. },
  78. handleSubmit() {
  79. if(!this.info.sendNo){
  80. uni.showModal({
  81. title: `请选择发货单`,
  82. content: '',
  83. icon: 'error',
  84. confirmText: '确认',
  85. showCancel: false, // 是否显示取消按钮,默认为 true
  86. success: res => {
  87. if (res.confirm) {
  88. this.back()
  89. }
  90. }
  91. })
  92. }
  93. if(!this.info.repliedFiles.length){
  94. uni.showModal({
  95. title: `请上传回执附件`,
  96. content: '',
  97. icon: 'error',
  98. confirmText: '确认',
  99. showCancel: false, // 是否显示取消按钮,默认为 true
  100. success: res => {
  101. if (res.confirm) {
  102. this.back()
  103. }
  104. }
  105. })
  106. }
  107. // this.currentRow.status = status
  108. // logistictraklistnoteUpdateAPI(this.currentRow)
  109. // uni.showModal({
  110. // title: `此工单执行成功`,
  111. // content: '',
  112. // confirmText: '确认',
  113. // showCancel: false, // 是否显示取消按钮,默认为 true
  114. // success: res => {
  115. // if (res.confirm) {
  116. // this.back()
  117. // }
  118. // }
  119. // })
  120. },
  121. handleInvoiceList() {
  122. uni.navigateTo({
  123. url: `/pages/invoiceConfirm/invoice`
  124. })
  125. },
  126. handleAssign() {
  127. this.$refs.transferRef.open(this.currentRow)
  128. },
  129. }
  130. }
  131. </script>
  132. <style lang="scss" scoped>
  133. .list-cell {
  134. display: flex;
  135. align-items: center;
  136. justify-content: space-between;
  137. color: $uni-text-color-grey;
  138. padding: 5rpx 20rpx;
  139. }
  140. .font-sm {
  141. font-size: $uni-font-size-sm;
  142. }
  143. .font-text {
  144. color: $uni-text-color;
  145. }
  146. .btn-execute {
  147. background-color: $j-primary-border-green;
  148. width: 450rpx;
  149. margin-top: 10vh;
  150. }
  151. .btn-sparepart {
  152. width: 450rpx;
  153. margin-top: 20rpx;
  154. }
  155. .btn-reassignment {
  156. color: $uni-color-error;
  157. background-color: transparent;
  158. border: none;
  159. box-shadow: none;
  160. &::after {
  161. display: none;
  162. }
  163. }
  164. .maintenance-container {
  165. position: fixed;
  166. top: 0;
  167. bottom: 0;
  168. width: 100vw;
  169. display: flex;
  170. flex-direction: column;
  171. /deep/.u-popup {
  172. flex: none !important;
  173. }
  174. }
  175. .maintenance-wrapper {
  176. position: relative;
  177. flex: 1;
  178. }
  179. .maintenance-content {
  180. padding-top: 40rpx;
  181. box-sizing: border-box;
  182. // height: calc(100vh - 88rpx);
  183. position: absolute;
  184. top: 0;
  185. bottom: 0;
  186. left: 0;
  187. right: 0;
  188. display: flex;
  189. flex-direction: column;
  190. }
  191. .kd-cell {
  192. line-height: 90rpx;
  193. border-bottom: 1px dashed #dadada;
  194. display: flex;
  195. justify-content: space-between;
  196. align-items: center;
  197. .kd-label {
  198. display: inline-block;
  199. width: 5em;
  200. font-weight: bold;
  201. }
  202. .kd-content {
  203. flex: 1;
  204. text-align: left;
  205. word-break: break-all;
  206. padding: 0 30rpx 0 0;
  207. }
  208. }
  209. .kd-baseInfo {
  210. padding: 0 32rpx;
  211. font-size: 28rpx;
  212. height: 70%;
  213. }
  214. .kd-equipment {
  215. flex: 1;
  216. display: flex;
  217. flex-direction: column;
  218. overflow: hidden;
  219. .kd-type-box {
  220. text-align: center;
  221. padding: 26rpx 0;
  222. view {
  223. position: relative;
  224. display: inline-block;
  225. width: 120rpx;
  226. padding: 4rpx 0;
  227. color: #747474;
  228. margin: 0 20rpx;
  229. background-color: rgba(215, 215, 215, 0.5);
  230. &.type—active {
  231. background-color: #1e7f35;
  232. color: #fff;
  233. }
  234. .count {
  235. position: absolute;
  236. top: -9px;
  237. right: -9px;
  238. width: 18px;
  239. height: 18px;
  240. border-radius: 50%;
  241. font-size: 12px;
  242. background-color: red;
  243. color: #fff;
  244. }
  245. }
  246. }
  247. .kd-list-container {
  248. flex: 1;
  249. display: flex;
  250. flex-direction: column;
  251. overflow: hidden;
  252. padding: 12rpx 18rpx;
  253. background-color: $page-bg;
  254. .u-list {
  255. flex: 1;
  256. height: 100% !important;
  257. }
  258. }
  259. }
  260. .spare-parts {
  261. flex: 1;
  262. overflow: hidden;
  263. }
  264. .kd-card {
  265. background-color: #fff;
  266. margin-bottom: 20rpx;
  267. padding: 8rpx 0;
  268. font-size: 28rpx;
  269. word-break: break-all;
  270. .kd-card-wrapper {
  271. padding: 0 30rpx;
  272. border-bottom: 1px solid #dadada;
  273. }
  274. .kd-cell {
  275. line-height: 60rpx;
  276. }
  277. .kd-cell:last-of-type {
  278. border-bottom: none;
  279. }
  280. .status-box {
  281. margin-right: 16rpx;
  282. }
  283. .card-footer {
  284. display: flex;
  285. justify-content: flex-end;
  286. align-items: center;
  287. padding: 8rpx 0 20rpx;
  288. button {
  289. width: 180rpx;
  290. height: 56rpx;
  291. line-height: 56rpx;
  292. font-size: 28rpx;
  293. margin: 0 8rpx;
  294. }
  295. .primary-btn {
  296. background-color: $j-primary-border-green;
  297. }
  298. }
  299. }
  300. .apply-box {
  301. width: 70%;
  302. margin: 0 auto;
  303. display: flex;
  304. align-items: center;
  305. justify-content: space-around;
  306. }
  307. .top-wrapper {
  308. background-color: #fff;
  309. display: flex;
  310. width: 750rpx;
  311. height: 88rpx;
  312. padding: 16rpx 0;
  313. align-items: center;
  314. gap: 16rpx;
  315. /deep/.uni-section {
  316. margin-top: 0px;
  317. }
  318. /deep/.uni-section-header {
  319. padding: 0px;
  320. }
  321. .search_btn {
  322. width: 120rpx;
  323. height: 70rpx;
  324. line-height: 70rpx;
  325. padding: 0 50rpx;
  326. background: $theme-color;
  327. font-size: 32rpx;
  328. color: #fff;
  329. margin: 0;
  330. margin-left: 26rpx;
  331. }
  332. .menu_icon {
  333. width: 44rpx;
  334. height: 44rpx;
  335. margin-left: 14rpx;
  336. }
  337. }
  338. .search_btn {
  339. width: 120rpx;
  340. height: 70rpx;
  341. padding: 0 24rpx;
  342. background: $theme-color;
  343. font-size: 32rpx;
  344. color: #fff;
  345. transform: translate(-25px, 0px);
  346. }
  347. </style>