index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. <template>
  2. <view>
  3. <view class="ordertop" v-if="type.refno4 == 'SJRK'">
  4. <view>
  5. <view class="iconblue"></view>
  6. <text class="license">基础信息</text>
  7. </view>
  8. <view class="line">
  9. <u-line color="#ccc" border-style='dashed' />
  10. </view>
  11. <view class="basic">
  12. <view>客户</view>
  13. <view>{{form.corpName}}</view>
  14. </view>
  15. <view class="basic">
  16. <view>提单号</view>
  17. <view>{{form.fMblno}}</view>
  18. </view>
  19. <view class="basic">
  20. <view>计划日期</view>
  21. <view>{{form.fMblno}}</view>
  22. </view>
  23. <view class="basic">
  24. <view>入库时间</view>
  25. <view>{{form.fBsdate}}</view>
  26. </view>
  27. <view class="basic">
  28. <view>品名</view>
  29. <view>{{form.goodsName}}</view>
  30. </view>
  31. <view class="basic">
  32. <view>仓库</view>
  33. <view>{{form.warehouseName}}</view>
  34. </view>
  35. <view class="basic">
  36. <view>计划件数</view>
  37. <view>{{form.fPlanqty}}</view>
  38. </view>
  39. <view class="basic">
  40. <view>计划净重(kg)</view>
  41. <view>{{form.fPlannetweight}}</view>
  42. </view>
  43. <view class="basic">
  44. <view>计划毛重(kg)</view>
  45. <view>{{form.fPlangrossweight}}</view>
  46. </view>
  47. <view class="basic">
  48. <view>备注</view>
  49. <view>{{form.remark}}</view>
  50. </view>
  51. <view class="basic" v-for="(item,index) in form.cntrsList" :key="index">
  52. <view>箱型/箱量</view>
  53. <view>{{form.fMblno}}{{form.fMblno}}</view>
  54. </view>
  55. </view>
  56. <view class="ordertop" v-if="type.refno4 == 'SJCK'">
  57. <view>
  58. <view class="iconblue"></view>
  59. <text class="license">基础信息</text>
  60. </view>
  61. <view class="line">
  62. <u-line color="#ccc" border-style='dashed' />
  63. </view>
  64. <view class="basic">
  65. <view>客户</view>
  66. <view>{{form.corpName}}</view>
  67. </view>
  68. <view class="basic">
  69. <view>结算方式</view>
  70. <view>{{form.stltypeName}}</view>
  71. </view>
  72. <view class="basic">
  73. <view>提单号</view>
  74. <view>{{form.fMblno}}</view>
  75. </view>
  76. <view class="basic">
  77. <view>业务日期</view>
  78. <view>{{form.fBstime}}</view>
  79. </view>
  80. <view class="basic">
  81. <view>仓管员</view>
  82. <view>{{form.fStorekeeper}}</view>
  83. </view>
  84. <view class="basic">
  85. <view>仓库</view>
  86. <view>{{form.warehouseName}}</view>
  87. </view>
  88. <view class="basic">
  89. <view>计划件数</view>
  90. <view>{{form.fPlanqty}}</view>
  91. </view>
  92. <view class="basic">
  93. <view>计划净重(kg)</view>
  94. <view>{{form.fPlannetweight}}</view>
  95. </view>
  96. <view class="basic">
  97. <view>计划毛重(kg)</view>
  98. <view>{{form.fPlangrossweight}}</view>
  99. </view>
  100. <view class="basic">
  101. <view>收费提示(kg)</view>
  102. <view>{{form.fRemarksFees}}</view>
  103. </view>
  104. <view class="basic">
  105. <view>备注</view>
  106. <view>{{form.remark}}</view>
  107. </view>
  108. <view class="basic" v-for="(item,index) in form.cntrsList" :key="index">
  109. <view>箱型/箱量</view>
  110. <view>{{form.fMblno}}{{form.fMblno}}</view>
  111. </view>
  112. </view>
  113. <view class="ordertop" v-if="type.refno4 == 'CKDB'">
  114. <view>
  115. <view class="iconblue"></view>
  116. <text class="license">基础信息</text>
  117. </view>
  118. <view class="line">
  119. <u-line color="#ccc" border-style='dashed' />
  120. </view>
  121. <view class="basic">
  122. <view>客户</view>
  123. <view>{{form.corpName}}</view>
  124. </view>
  125. <view class="basic">
  126. <view>作业类型</view>
  127. <view>{{form.businessTypeName}}</view>
  128. </view>
  129. <view class="basic">
  130. <view>提单号</view>
  131. <view>{{form.fMblno}}</view>
  132. </view>
  133. <view class="basic">
  134. <view>业务日期</view>
  135. <view>{{form.fBsdate}}</view>
  136. </view>
  137. <view class="basic">
  138. <view>业务时间</view>
  139. <view>{{form.updateTime}}</view>
  140. </view>
  141. <view class="basic">
  142. <view>仓管员</view>
  143. <view>{{form.fStorekeeper}}</view>
  144. </view>
  145. <view class="basic">
  146. <view>调入仓库</view>
  147. <view>{{form.inWarehouseName}}</view>
  148. </view>
  149. <view class="basic">
  150. <view>调出仓库</view>
  151. <view>{{form.warehouseName}}</view>
  152. </view>
  153. <view class="basic">
  154. <view>单据编号</view>
  155. <view>{{form.fBillno}}</view>
  156. </view>
  157. <view class="basic">
  158. <view>计划件数</view>
  159. <view>{{form.fPlanqty}}</view>
  160. </view>
  161. <view class="basic">
  162. <view>计划净重(kg)</view>
  163. <view>{{form.fPlannetweight}}</view>
  164. </view>
  165. <view class="basic">
  166. <view>计划毛重(kg)</view>
  167. <view>{{form.fPlangrossweight}}</view>
  168. </view>
  169. <view class="basic">
  170. <view>备注</view>
  171. <view>{{form.remark}}</view>
  172. </view>
  173. <view class="basic" v-for="(item,index) in form.cntrsList" :key="index">
  174. <view>箱型/箱量</view>
  175. <view>{{form.fMblno}}{{form.fMblno}}</view>
  176. </view>
  177. </view>
  178. <view class="ordertop" v-if="type.refno4 == 'HQZY'">
  179. <view>
  180. <view class="iconblue"></view>
  181. <text class="license">基础信息</text>
  182. </view>
  183. <view class="line">
  184. <u-line color="#ccc" border-style='dashed' />
  185. </view>
  186. <view class="basic">
  187. <view>客户</view>
  188. <view>{{form.corpName}}</view>
  189. </view>
  190. <view class="basic">
  191. <view>新客户</view>
  192. <view>{{form.toCorpName}}</view>
  193. </view>
  194. <view class="basic">
  195. <view>业务编号</view>
  196. <view>{{form.fBillno}}</view>
  197. </view>
  198. <view class="basic">
  199. <view>货转日期</view>
  200. <view>{{form.fBsdate}}</view>
  201. </view>
  202. <view class="basic">
  203. <view>仓储费日期</view>
  204. <view>{{form.fChargedate}}</view>
  205. </view>
  206. <view class="basic">
  207. <view>仓库</view>
  208. <view>{{form.warehouseName}}</view>
  209. </view>
  210. <view class="basic">
  211. <view>结算方式</view>
  212. <view>{{form.stltypeName}}</view>
  213. </view>
  214. <view class="basic">
  215. <view>计费单位</view>
  216. <view>{{form.feetunitName}}</view>
  217. </view>
  218. <view class="basic">
  219. <view>贸易方式</view>
  220. <view>{{form.newTrademodeName}}</view>
  221. </view>
  222. <view class="basic">
  223. <view>提单号</view>
  224. <view>{{form.fMblno}}</view>
  225. </view>
  226. <view class="basic">
  227. <view>品牌</view>
  228. <view>{{form.fMarks}}</view>
  229. </view>
  230. <view class="basic">
  231. <view>品名</view>
  232. <view>{{form.fProductName}}</view>
  233. </view>
  234. <view class="basic">
  235. <view>制单人</view>
  236. <view>{{form.createBy}}</view>
  237. </view>
  238. <view class="basic" v-for="(item,index) in form.cntrsList" :key="index">
  239. <view>箱型/箱量</view>
  240. <view>{{form.fMblno}}{{form.fMblno}}</view>
  241. </view>
  242. </view>
  243. <view class="ordertop" v-if="form.enclosureList != null">
  244. <view>
  245. <view class="iconblue"></view>
  246. <text class="license">附件</text>
  247. </view>
  248. <view class="line">
  249. <u-line color="#ccc" border-style='dashed'/>
  250. </view>
  251. <view class="basic" v-for="(item,index) in form.enclosureList" :key="index">
  252. <view>{{item.fName}}</view>
  253. <view>
  254. <u-button type="primary" :ripple="true" ripple-bg-color="#909399" size="mini" @click="previewDocx(item.fUrl)">查看</u-button>
  255. </view>
  256. </view>
  257. </view>
  258. <view style="width: 100%;position:fixed; bottom:0rpx;background-color: #FFFFFF;padding-left: 40rpx;padding-right: 40rpx;margin-bottom: 30rpx;margin-top: 100rpx;">
  259. <view style="float: left;width: 49%;">
  260. <u-button type="primary" @click="appToExamine(true)">审核通过</u-button>
  261. </view>
  262. <view style="float: right;width: 49%;">
  263. <u-button type="primary" @click="appToExamine(false)">审核拒绝</u-button>
  264. </view>
  265. </view>
  266. <u-modal v-model="showTwo" :title="titleTwo" :show-cancel-button="true" :content-style="{margin: '40rpx auto'}"
  267. @confirm="confirmTwo">
  268. <view class="slot-content">
  269. <!-- <rich-text v-if="ToExamineType == true && dataList.length > 0" :nodes="content" style="text-align: center;"></rich-text> -->
  270. <u-form v-if="ToExamineType == true" style="width: 90%;margin: 0 auto;">
  271. <u-form-item label="同意意见:" label-width="130rpx">
  272. <u-input height="20rpx" :clearable="false" type="textarea" v-model="valueTwo" />
  273. </u-form-item>
  274. </u-form>
  275. <u-form v-else style="width: 90%;margin: 0 auto;">
  276. <u-form-item label="拒绝理由:" label-width="130rpx">
  277. <u-input height="20rpx" :clearable="false" type="textarea" v-model="valueTwo" />
  278. </u-form-item>
  279. </u-form>
  280. </view>
  281. </u-modal>
  282. </view>
  283. </template>
  284. <script>
  285. export default {
  286. data() {
  287. return {
  288. titleTwo: '',
  289. showTwo: false,
  290. ToExamineType: '',
  291. valueTwo: '',
  292. type: {},
  293. form: {}
  294. }
  295. },
  296. onLoad: function(option) {
  297. this.type = JSON.parse(option.form)
  298. this.$u.get('warehouseBusiness/goodsTransfer/app?id=' + this.type.billId).then(res => {
  299. console.log(res.data)
  300. this.form = res.data
  301. if (this.form.cntrsList == null) this.form.cntrsList = []
  302. })
  303. },
  304. methods: {
  305. confirmTwo() {
  306. if (this.ToExamineType == false) {
  307. if (this.valueTwo) {
  308. this.$u.post('/warehouse/paths/approvalRejected', {
  309. actId: this.type.actId,
  310. auditItem: new Date().getFullYear() + '-' + Number(new Date().getMonth()+1) + '-' + new Date().getDate(),
  311. auditMsg: this.valueTwo,
  312. auditUserId: uni.getStorageSync('userId'),
  313. billId: this.form.fId,
  314. id: this.form.fId
  315. }).then(res => {
  316. uni.navigateBack();
  317. })
  318. } else {
  319. this.showTwo = true
  320. uni.showToast({
  321. icon: 'none',
  322. title: '请填写拒绝理由',
  323. position: "center"
  324. })
  325. }
  326. } else {
  327. // let tiem = moment(Date.parse(new Date())).format('YYYY-MM-DD')
  328. if (this.valueTwo) {
  329. this.$u.post('/warehouse/paths/approved', {
  330. actId: this.type.actId,
  331. auditItem: new Date().getFullYear() + '-' + Number(new Date().getMonth()+1) + '-' + new Date().getDate(),
  332. auditMsg: this.valueTwo,
  333. auditUserId: uni.getStorageSync('userId'),
  334. billId: this.form.fId,
  335. id: this.form.fId
  336. }).then(res => {
  337. uni.navigateBack();
  338. })
  339. } else {
  340. this.showTwo = true
  341. uni.showToast({
  342. icon: 'none',
  343. title: '请填写同意意见',
  344. position: "center"
  345. })
  346. }
  347. }
  348. },
  349. appToExamine(ToExamineType) {
  350. this.ToExamineType = ToExamineType
  351. this.showTwo = true
  352. if (ToExamineType == true) {
  353. this.titleTwo = '确认同意'
  354. } else {
  355. this.titleTwo = '确认拒绝'
  356. }
  357. },
  358. //预览
  359. previewDocx(item){
  360. if(item == null){
  361. uni.showToast({
  362. icon: 'none',
  363. title: '无附件',
  364. position: "bottom"
  365. })
  366. }else{
  367. uni.downloadFile({
  368. url: item,
  369. success: (res) => {
  370. if (res.statusCode === 200) {
  371. uni.openDocument({
  372. filePath: res.tempFilePath,
  373. // 如果文件名包含中文,建议使用escape(res.tempFilePath)转码,防止ios和安卓客户端导致的差异
  374. success: function(res) {
  375. uni.showToast({
  376. icon: 'none',
  377. title: '打开附件成功',
  378. position: "bottom"
  379. })
  380. },
  381. fail:function(res){
  382. uni.showToast({
  383. icon: 'none',
  384. title: '打开附件失败',
  385. position: "bottom"
  386. })
  387. }
  388. });
  389. }
  390. }
  391. })
  392. }
  393. },
  394. }
  395. }
  396. </script>
  397. <style scoped lang="scss">
  398. .ordertop {
  399. width: 96%;
  400. background-color: #fff;
  401. margin: 20rpx auto;
  402. border-radius: 20rpx;
  403. padding-top: 20rpx;
  404. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  405. padding-bottom: 10rpx;
  406. }
  407. .ordertop>view:nth-child(1) {
  408. width: 98%;
  409. margin-bottom: 60rpx;
  410. }
  411. .iconblue {
  412. width: 10rpx;
  413. height: 45rpx;
  414. float: left;
  415. background-color: #3a63cf;
  416. margin-right: 10rpx;
  417. }
  418. .various {
  419. float: right;
  420. width: 150rpx;
  421. border: 2rpx solid #3a63cf;
  422. text-align: center;
  423. border-radius: 100rpx;
  424. color: #3a63cf;
  425. }
  426. .line {
  427. width: 92%;
  428. margin: 0 auto;
  429. }
  430. .license {
  431. float: left;
  432. font-size: 32rpx;
  433. }
  434. .basic {
  435. width: 94%;
  436. margin: 10rpx auto;
  437. display: flex;
  438. justify-content: space-between;
  439. }
  440. .basic>view {
  441. margin-bottom: 10rpx;
  442. }
  443. .basic>view:nth-child(1) {
  444. color: #797979;
  445. }
  446. </style>