tareDetail2.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <template>
  2. <view class="warp">
  3. <view class="content">
  4. <view class="title">
  5. 基本信息
  6. </view>
  7. <view class="row">
  8. <view class="left">仓库</view>
  9. <view class="right">{{detailData.warehouseName}}</view>
  10. </view>
  11. <view class="row">
  12. <view class="left">合同编号</view>
  13. <view class="right">{{detailData.contractNo}}</view>
  14. </view>
  15. <view class="row">
  16. <view class="left">货名</view>
  17. <view class="right">{{detailData.goodsName}}</view>
  18. </view>
  19. <view class="row">
  20. <view class="left">车牌号</view>
  21. <view class="right">{{detailData.carNumber}}</view>
  22. </view>
  23. <view class="row">
  24. <view class="left">仓位号</view>
  25. <view class="right">{{detailData.binNumber}}</view>
  26. </view>
  27. <view class="row">
  28. <view class="left">囤位号</view>
  29. <view class="right">{{detailData.storageNumber}}</view>
  30. </view>
  31. <view class="row">
  32. <view class="left">出库类型</view>
  33. <view class="right">{{issueTypeVal}}</view>
  34. </view>
  35. </view>
  36. <div class="content1">
  37. <view class="title">
  38. 检斤信息
  39. </view>
  40. <view class="row row-bottom">
  41. <view class="left">皮重(公斤)</view>
  42. <view class="right">{{detailData.tare}}</view>
  43. </view>
  44. <view class="row row-bottom">
  45. <view class="left">毛重(公斤)</view>
  46. <view v-if='detailData.grossWeight' class="right">{{detailData.grossWeight}}</view>
  47. <view v-else class="right">未称重</view>
  48. </view>
  49. <view v-if='detailData.grossWeight' class="row row-bottom">
  50. <view class="left">净重(公斤)</view>
  51. <view class="right">{{detailData.netWeight}}</view>
  52. </view>
  53. <view v-if='detailData.grossWeight' class="content2">
  54. <view class="left">上传磅单</view>
  55. <image style='width:100px;height:100px;' :src="detailData.addressUrl" mode=""></image>
  56. </view>
  57. </div>
  58. <!-- <u-select v-model="isShowContractNo" :list="contractNoList" @confirm="confirmContractNo"></u-select> -->
  59. </view>
  60. </template>
  61. <script>
  62. import helper from '@/common/helper.js';
  63. export default {
  64. data() {
  65. return {
  66. // isShowContractNo: false,
  67. isShowBinNo: false,
  68. isShowIssueType: false,
  69. issueTypeVal: "销售出库",
  70. detailData: {},
  71. id:'',
  72. cangId:'',
  73. show1:false,
  74. show:false,
  75. contractNoList: [],
  76. positionList:[],
  77. binNoList: [],
  78. issueTypeList: [{
  79. value: '1',
  80. label: '销售出库'
  81. },
  82. {
  83. value: '2',
  84. label: '移库出库'
  85. },
  86. {
  87. value: '3',
  88. label: '暂存出库'
  89. },
  90. {
  91. value: '4',
  92. label: '贸易服务出库'
  93. },
  94. ]
  95. }
  96. },
  97. onShow() {},
  98. onLoad(options) {
  99. this.id = options.id
  100. this.cangId = options.cangId
  101. this.getWeighingManagement()
  102. },
  103. methods: {
  104. contractNopicker(e){
  105. this.detailData.goodsName=this.contractNoList[e[0]].goodsName
  106. this.detailData.contractNo=this.contractNoList[e[0]].contractNo
  107. },
  108. binNumberpicker(e){
  109. this.detailData.binNumber=this.positionList[e[0]].binNumber
  110. },
  111. getWeighingManagement(){
  112. this.$api.doRequest('get', '/weighingManagement/getWeighingManagement',
  113. {id: this.id}).then(res => {
  114. if(res.data.code==200){
  115. console.log(res)
  116. this.detailData = res.data.data
  117. }
  118. })
  119. this.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse',
  120. {id: this.cangId}).then(res => {
  121. if(res.data.code==200){
  122. this.positionList = res.data.data.warehousePositionInfoList
  123. }
  124. })
  125. this.$api.doRequest('get', '/warehouseBaseInfo/selectContractNoList',{
  126. compId: '',
  127. flag:5
  128. }).then(res => {
  129. if(res.data.code==200){
  130. this.contractNoList = res.data.data
  131. }
  132. })
  133. },
  134. contractNoClick() {
  135. uni.navigateTo({
  136. url:"selectContractNo?compId="+this.detailData.compId
  137. })
  138. },
  139. issueTypeClick() {
  140. this.isShowIssueType = true
  141. },
  142. confirmContractNo(e) {},
  143. confirmBinNo(e) {},
  144. submit(){
  145. if (!this.detailData.contractNo) {
  146. this.$api.msg('合同编号不能为空')
  147. return
  148. }
  149. if (!this.detailData.binNumber) {
  150. this.$api.msg('仓位号不能为空')
  151. return
  152. }
  153. if (!this.detailData.storageNumber) {
  154. this.$api.msg('囤位号不能为空')
  155. return
  156. }
  157. if (
  158. this.detailData.storageNumber.length < 1 ||
  159. this.detailData.storageNumber.length > 10
  160. ) {
  161. this.$api.msg('囤位号不超过10个字符!')
  162. return
  163. }
  164. if (!this.detailData.carNumber) {
  165. this.$api.msg('车牌号不能为空')
  166. return
  167. }
  168. if (this.detailData.carNumber.length != 7) {
  169. this.$api.msg('车牌号输入错误')
  170. return
  171. }
  172. if (!this.detailData.inOutType) {
  173. this.$api.msg('出库类型不能为空')
  174. return
  175. }
  176. this.detailData.weighingManagement=this.detailData
  177. var that = this
  178. uni.showModal({
  179. content:"确定提交检斤信息?",
  180. success(res) {
  181. if(res.confirm){
  182. that.$api.doRequest('post', '/warehouseInOutInfo/InOutWarehouse',
  183. that.detailData).then(res => {
  184. if(res.data.code==200){
  185. that.$api.msg('提交成功')
  186. uni.navigateBack()
  187. }
  188. })
  189. }
  190. }
  191. })
  192. }
  193. },
  194. }
  195. </script>
  196. <style scoped lang="scss">
  197. uni-page-body {
  198. overflow: hidden;
  199. }
  200. .warp {
  201. margin: 20rpx;
  202. }
  203. .content,
  204. .content1 {
  205. border-radius: 20rpx;
  206. background: white;
  207. padding: 20rpx;
  208. .title {
  209. font-size: 28rpx;
  210. font-weight: 600;
  211. color: #333333;
  212. }
  213. .row {
  214. display: flex;
  215. justify-content: space-between;
  216. padding: 31rpx 0;
  217. .right {
  218. font-size: 28rpx;
  219. color: #333333;
  220. }
  221. }
  222. .row-bottom {
  223. border: 0;
  224. .right-bottom {
  225. width: 300rpx;
  226. text-align: right;
  227. }
  228. }
  229. }
  230. .content1 {
  231. margin-top: 20rpx;
  232. }
  233. .footer{
  234. position: fixed;
  235. bottom:0;
  236. width:100%;
  237. padding:10px;
  238. background:#fff;
  239. .submit {
  240. width: 90%;
  241. background: #22C572;
  242. border-radius: 50rpx;
  243. }
  244. }
  245. .row input{
  246. font-size:14px;
  247. }
  248. </style>