task_detail_ck.vue 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046
  1. <template>
  2. <view :class="showAutograph?'indexFixed container':'container '" >
  3. <view class="c-list">
  4. <view class="cu-form-group c-row b-b">
  5. <text class="tit">公司名头</text>
  6. <view class="con-list">
  7. {{companyName}}—{{companyPhone}}
  8. </view>
  9. </view>
  10. <view class="c-row b-b">
  11. <text class="tit">姓名</text>
  12. <view class="con-list">
  13. {{userName}}
  14. </view>
  15. </view>
  16. <view class="c-row b-b">
  17. <text class="tit">车牌号</text>
  18. <view class="con-list">
  19. <text>{{carNo}}</text>
  20. </view>
  21. </view>
  22. <view class="c-row b-b">
  23. <text class="tit">箱号</text>
  24. <view class="con-list">
  25. <text>{{boxNo}}</text>
  26. </view>
  27. </view>
  28. <view class="c-row b-b">
  29. <text class="tit">封号</text>
  30. <view class="con-list">
  31. <text>{{titleNo}}</text>
  32. </view>
  33. </view>
  34. <view class="c-row b-b">
  35. <text class="tit">包装要求</text>
  36. <view class="con-list">
  37. <text>{{remark}}</text>
  38. </view>
  39. </view>
  40. <!-- <view class="c-row b-b">
  41. <text class="tit">目的地</text>
  42. <view class="con-list">
  43. {{address}}
  44. </view>
  45. </view> -->
  46. <!-- <view class="c-row b-b">
  47. <text class="tit">任务量</text>
  48. <view class="con-list">
  49. {{count}}
  50. </view>
  51. </view>
  52. <view class="c-row b-b">
  53. <text class="tit">未发运数量</text>
  54. <view class="con-list">
  55. {{notCount}}
  56. </view>
  57. </view> -->
  58. <view class="d-header">
  59. <text v-if="taskType == '出库任务'">出库任务</text>
  60. </view>
  61. <view class="c-row b-b">
  62. <text class="tit">毛重(吨)</text>
  63. <view class="con-list">
  64. <input placeholder="请填写毛重" name="input" v-model="grossWeight" @input="grossWeightInput"></input>
  65. </view>
  66. </view>
  67. <view class="c-row b-b">
  68. <text class="tit">皮重(吨)</text>
  69. <view class="con-list">
  70. <input placeholder="请填写皮重" name="input" v-model="skinWeight" @input="skinWeightInput"></input>
  71. </view>
  72. </view>
  73. <view class="c-row b-b">
  74. <text class="tit">净重(自动计算)</text>
  75. <view class="con-list">
  76. <text>{{numFilter(netWeight)}}</text>
  77. </view>
  78. </view>
  79. <view class="c-row b-b" style='justify-content: space-between;'>
  80. <text class="tit">仓位号</text>
  81. <view>
  82. <button class='cu-btn bg-green shadow' style='margin-right:10rpx;' @click="changewarehouse">添加仓位号</button>
  83. <button class='cu-btn shadow' @click="clearWarehouse">清空</button>
  84. </view>
  85. </view>
  86. <view>
  87. <view style='text-align: center;padding: 15rpx;' v-for='item in warehouses'>
  88. <view>{{item}}</view>
  89. </view>
  90. </view>
  91. <view class="c-row b-b">
  92. <text class="tit">蛋白</text>
  93. <view class="con-list">
  94. <input placeholder="请填写蛋白" name="input" v-model="protein" ></input>
  95. </view>
  96. </view>
  97. <view class="c-row b-b">
  98. <text class="tit">水分</text>
  99. <view class="con-list">
  100. <input placeholder="请填写水分" name="input" v-model="waterContent" ></input>
  101. </view>
  102. </view>
  103. <view class="c-row b-b">
  104. <text class="tit">件数</text>
  105. <view class="con-list">
  106. <input placeholder="请填写件数" name="input" v-model="memo" ></input>
  107. </view>
  108. </view>
  109. <view class="cu-form-group margin-top">
  110. <view class="title">出库方式</view>
  111. <picker @change="OutModeChange" :value="outModeeIndex" :range="outMode">
  112. <view class="picker">
  113. {{outModeIndex>-1?outMode[outModeIndex]:'请选择'}}
  114. </view>
  115. </picker>
  116. </view>
  117. <!-- <view class="c-row b-b">
  118. <text class="tit">出库费用(元/吨)</text>
  119. <view class="con-list">
  120. <input placeholder="请填写出库费用" name="input" v-model="price" ></input>
  121. </view>
  122. </view> -->
  123. <view class="cu-bar bg-white ">
  124. <view class="action">
  125. 磅单照片
  126. </view>
  127. </view>
  128. <view class="cu-form-group">
  129. <view class="grid col-2 grid-square flex-sub">
  130. <view class="bg-img" v-if="poundImg != ''" @tap="ViewImage" :data-url="poundImg">
  131. <image :src="poundImg" mode="aspectFit"></image>
  132. <view class="cu-tag bg-red" @tap.stop="DelImg" >
  133. <text class='cuIcon-close'></text>
  134. </view>
  135. </view>
  136. <view class="solids" @tap="ChooseImage" v-if="poundImg == ''">
  137. <text class='cuIcon-cameraadd'></text>
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. <u-modal v-model="showPopup"
  143. :mask-close-able="true"
  144. title="填写仓位号"
  145. show-cancel-button="true"
  146. confirm-text="确定"
  147. cancel-text="取消"
  148. @confirm="addwarehouse"
  149. @cancel="showPopup=false">
  150. <view class="cu-form-group">
  151. <view class="title">仓位号</view>
  152. <input placeholder="请输入仓位号" v-model="warehouse"></input>
  153. </view>
  154. </u-modal>
  155. <view class="cu-modal" :class="modalName=='workModal'?'show':''" @tap="hideModal">
  156. <scroll-view scroll-y class="cu-dialog" :style="userStyle" @tap.stop="">
  157. <view class="cu-list menu text-center" >
  158. <view class="cu-item" v-for="(item,index) in userList" :key="index" @click="selectInPerson(item)">
  159. <label class="flex justify-between align-center flex-sub">
  160. <view class="flex-sub">{{item.userName}}</view>
  161. </label>
  162. </view>
  163. </view>
  164. </scroll-view>
  165. </view>
  166. <!-- <view class="cu-modal" :class="modalName=='userModal'?'show':''" @tap="hideModal">
  167. <scroll-view scroll-y class="cu-dialog" :style="userStyle" @tap.stop="">
  168. <view class="cu-list menu text-center" >
  169. <view class="cu-item" v-for="(item,index) in userList" :key="index" @click="mygaipai(item.id)">
  170. <label class="flex justify-between align-center flex-sub">
  171. <view class="flex-sub">{{item.userName}}</view>
  172. </label>
  173. </view>
  174. </view>
  175. </scroll-view>
  176. </view> -->
  177. <view class="wrapper" v-if="showAutograph">
  178. <view class="handCenter">
  179. <canvas class="handWriting" disable-scroll="true" @touchstart="uploadScaleStart" @touchmove="uploadScaleMove"
  180. @touchend="uploadScaleEnd" @tap="mouseDown" canvas-id="handWriting">
  181. </canvas>
  182. </view>
  183. <view class="buttons">
  184. <button @click="retDraw" class="delBtn">重写</button>
  185. <button @click="subCanvas" class="subBtn">保存</button>
  186. </view>
  187. </view>
  188. <view class="page-bottom">
  189. <view class="action-btn-group">
  190. <button type="primary" class=" action-btn no-border buy-now-btn" @click="save">保存</button>
  191. <button type="primary" class=" action-btn no-border add-cart-btn" @click="finish">完成</button>
  192. <!-- <button type="primary" class=" action-btn no-border add-cart-btn" @click="gaipai">改派</button> -->
  193. </view>
  194. </view>
  195. </view>
  196. </template>
  197. <script>
  198. import uploadImage from '@/components/ossutil/uploadFile.js';
  199. import Handwriting from '@/components/ossutil/signature.js';
  200. import {
  201. mapState
  202. } from 'vuex';
  203. export default {
  204. data() {
  205. return {
  206. carInfo:[],
  207. poundImg:'',
  208. grossWeight:'',
  209. skinWeight:'',
  210. netWeight:'',
  211. taskStatus:'',
  212. userStyle:'',
  213. modalName:'',
  214. userList:[],
  215. inPersonId:'',
  216. taskType:'',
  217. taskId:'',
  218. companyName:'',
  219. companyPhone:'',
  220. carNo:'',
  221. price:'',
  222. userName:'',
  223. count:'',
  224. alreadyCount:0,
  225. notCount:'',
  226. protein:'',
  227. waterContent:'',
  228. warehouse:'',
  229. warehouses:[],
  230. outMode: ['散装', '袋装'],
  231. outModeIndex:0,
  232. price:'',
  233. address:'',
  234. memo:'',
  235. showPopup:false,
  236. boxNo:'',
  237. titleNo:'',
  238. remark:''
  239. };
  240. },
  241. computed: {
  242. ...mapState(['hasLogin','userInfo'])
  243. },
  244. onShow() {
  245. },
  246. onLoad(options) {
  247. const that = this
  248. this.taskStatus = options.taskStatus
  249. this.taskType = options.taskType
  250. this.taskId = options.taskId
  251. uni.showLoading({
  252. title: '正在加载',
  253. mask:true
  254. })
  255. that.$api.request('task', 'getTaskInfoCK', {
  256. taskId:options.taskId
  257. }, failres => {
  258. that.$api.msg(failres.errmsg)
  259. uni.hideLoading()
  260. }).then(res => {
  261. that.carInfo = res.data
  262. that.grossWeight = that.carInfo.grossWeight
  263. that.skinWeight = that.carInfo.skinWeight
  264. that.netWeight = that.carInfo.netWeight
  265. that.poundImg = that.carInfo.poundImg
  266. that.price=that.carInfo.price
  267. that.protein=that.carInfo.protein
  268. if(that.carInfo.warehouse){
  269. that.warehouses=that.carInfo.warehouse.split(',')
  270. }
  271. that.waterContent=that.carInfo.waterContent
  272. that.titleNo = that.carInfo.titleNo
  273. that.companyName=that.carInfo.companyName
  274. that.companyPhone=that.carInfo.companyPhone
  275. that.userName=that.carInfo.userName
  276. that.carNo=that.carInfo.carNo
  277. that.boxNo = that.carInfo.boxNo
  278. that.count=that.carInfo.count
  279. that.alreadyCount=that.carInfo.alreadyCount
  280. that.notCount=that.carInfo.notCount
  281. that.address=that.carInfo.address
  282. that.memo=that.carInfo.memo
  283. that.remark = that.carInfo.remark
  284. uni.hideLoading()
  285. })
  286. },
  287. onReady(){
  288. },
  289. methods: {
  290. numFilter (value) {
  291. if(!value){
  292. return 0
  293. }
  294. // 截取当前数据到小数点后两位
  295. let realVal = parseFloat(value).toFixed(2)
  296. return realVal
  297. },
  298. uploadScaleStart(event){
  299. this.handwriting.uploadScaleStart(event)
  300. },
  301. uploadScaleMove(event){
  302. this.handwriting.uploadScaleMove(event)
  303. },
  304. uploadScaleEnd(event){
  305. this.handwriting.uploadScaleEnd(event)
  306. },
  307. OutModeChange(e) {
  308. this.outModeIndex = e.detail.value
  309. this.outMode1 = this.outMode[this.outModeIndex]
  310. },
  311. retDraw() {
  312. this.handwriting.retDraw()
  313. },
  314. changewarehouse(){
  315. this.showPopup=true
  316. },
  317. addwarehouse(){
  318. if(this.warehouse){
  319. console.log(this.warehouse)
  320. this.warehouses.push(this.warehouse)
  321. this.warehouse=''
  322. this.modalName=''
  323. }
  324. else{
  325. this.$api.msg('仓位号不能为空')
  326. }
  327. },
  328. clearWarehouse(){
  329. this.warehouses = []
  330. },
  331. subCanvas(){
  332. this.handwriting.saveCanvas().then(res=>{
  333. let that = this;
  334. console.log(res)
  335. uploadImage(res, 'signImg/',
  336. result => {
  337. that.signImg = result
  338. that.showAutograph = false
  339. uni.hideLoading();
  340. }
  341. )
  342. }).catch(err=>{
  343. console.log(err);
  344. });
  345. },
  346. hideModal(e) {
  347. this.modalName = null
  348. },
  349. ViewImage(e) {
  350. var img = [];
  351. img = e.currentTarget.dataset.url.split(' ')
  352. uni.previewImage({
  353. current:0,
  354. urls: img
  355. });
  356. },
  357. ViewSignImage(e) {
  358. let imgsArray = [];
  359. imgsArray[0] = e.currentTarget.dataset.url;
  360. uni.previewImage({
  361. current: 0,
  362. urls: imgsArray,
  363. });
  364. },
  365. DelSignImg(e){
  366. uni.showModal({
  367. title: '提示',
  368. content: '确定要删除签名吗?',
  369. cancelText: '取消',
  370. confirmText: '确定',
  371. success: res => {
  372. if (res.confirm) {
  373. this.signImg = "";
  374. }
  375. }
  376. })
  377. },
  378. DelImg(e) {
  379. uni.showModal({
  380. title: '提示',
  381. content: '确定要删除该磅单照片吗?',
  382. cancelText: '取消',
  383. confirmText: '确定',
  384. success: res => {
  385. if (res.confirm) {
  386. this.poundImg = "";
  387. }
  388. }
  389. })
  390. },
  391. ChooseImage() {
  392. uni.chooseImage({
  393. count: 1, //默认9
  394. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  395. sourceType: ['album','camera'], //从相册选择
  396. success: (res) => {
  397. //上传图片
  398. //图片路径可自行修改
  399. uploadImage(res.tempFilePaths[0], 'carNoImg/',
  400. result => {
  401. this.poundImg = result
  402. uni.hideLoading();
  403. }
  404. )
  405. }
  406. });
  407. },
  408. grossWeightInput(e) {
  409. this.grossWeight = e.detail.value
  410. if(this.grossWeight && this.skinWeight){
  411. this.netWeight = this.numFilter(this.grossWeight - this.skinWeight)
  412. if(this.netWeight > this.carInfo.num){
  413. this.addNumStatus = true
  414. }
  415. }
  416. },
  417. skinWeightInput(e) {
  418. this.skinWeight = e.detail.value
  419. if(this.grossWeight && this.skinWeight){
  420. this.netWeight = this.numFilter(this.grossWeight - this.skinWeight)
  421. if(this.netWeight > this.carInfo.num){
  422. this.addNumStatus = true
  423. }
  424. else{
  425. this.addNumStatus = false
  426. }
  427. }
  428. },
  429. save(){
  430. const that = this
  431. uni.showLoading({
  432. title: '正在加载',
  433. mask:true
  434. })
  435. that.warehouse=that.warehouses.toString()
  436. that.$api.request('task', 'saveTaskInfoCK', {
  437. grossWeight:!that.grossWeight?'':that.grossWeight,
  438. skinWeight:!that.skinWeight?'':that.skinWeight,
  439. netWeight:!that.netWeight?'':that.netWeight,
  440. poundImg:!that.poundImg?'':that.poundImg,
  441. taskId:!that.taskId?'':that.taskId,
  442. protein:!that.protein?'':that.protein,
  443. price:!that.price?'':that.price,
  444. warehouse:!that.warehouse?'':that.warehouse,
  445. waterContent:!that.waterContent?'':that.waterContent,
  446. companyName:!that.companyName?'':that.companyName,
  447. companyPhone:!that.companyPhone?'':that.companyPhone,
  448. carNo:!that.carNo?'':that.carNo,
  449. userName:!that.userName?'':that.userName,
  450. count:!that.count?'':that.count,
  451. alreadyCount:!that.alreadyCount?'':that.alreadyCount,
  452. address:!that.address?'':that.address,
  453. outMode:!that.outMode1?'':that.outMode1,
  454. memo:!that.memo?'':that.memo,
  455. titleNo:!that.titleNo?'':that.titleNo,
  456. }, failres => {
  457. that.$api.msg(failres.errmsg)
  458. uni.hideLoading()
  459. }).then(res => {
  460. that.$api.msg('保存成功')
  461. uni.hideLoading()
  462. })
  463. },
  464. selectInPerson(item){
  465. this.modalName = null
  466. var that = this
  467. if(!that.grossWeight){
  468. this.$api.msg('请填写毛重');
  469. return;
  470. }
  471. if(!that.skinWeight){
  472. this.$api.msg('请填写皮重');
  473. return;
  474. }
  475. if(!that.poundImg){
  476. this.$api.msg('请上传磅单照片');
  477. return;
  478. }
  479. // if(!that.price){
  480. // this.$api.msg('请上传出库费用');
  481. // return;
  482. // }
  483. if(!that.protein){
  484. this.$api.msg('请填写蛋白');
  485. return;
  486. }
  487. if(that.warehouses.length == 0){
  488. this.$api.msg('请填写仓位号');
  489. return;
  490. }
  491. if(!that.waterContent){
  492. this.$api.msg('请填写水分');
  493. return;
  494. }
  495. if(!that.memo){
  496. this.$api.msg('请填写件数');
  497. return;
  498. }
  499. uni.showLoading({
  500. title: '正在加载',
  501. mask:true
  502. })
  503. that.warehouse=that.warehouses.toString()
  504. that.$api.request('task', 'finishTaskInfoCK', {
  505. grossWeight:!that.grossWeight?'':that.grossWeight,
  506. skinWeight:!that.skinWeight?'':that.skinWeight,
  507. netWeight:!that.netWeight?'':that.netWeight,
  508. poundImg:!that.poundImg?'':that.poundImg,
  509. taskId:!that.taskId?'':that.taskId,
  510. protein:!that.protein?'':that.protein,
  511. price:!that.price?'':that.price,
  512. warehouse:!that.warehouse?'':that.warehouse,
  513. waterContent:!that.waterContent?'':that.waterContent,
  514. companyName:!that.companyName?'':that.companyName,
  515. companyPhone:!that.companyPhone?'':that.companyPhone,
  516. carNo:!that.carNo?'':that.carNo,
  517. userName:!that.userName?'':that.userName,
  518. count:!that.count?'':that.count,
  519. alreadyCount:!that.alreadyCount?'':that.alreadyCount,
  520. address:!that.address?'':that.address,
  521. outMode:!that.outMode1?'':that.outMode1,
  522. memo:!that.memo?'':that.memo,
  523. titleNo:!that.titleNo?'':that.titleNo,
  524. nextUserId:item.id
  525. }, failres => {
  526. that.$api.msg(failres.errmsg)
  527. uni.hideLoading()
  528. }).then(res => {
  529. that.$api.msg('完成成功')
  530. setTimeout(()=>{uni.navigateBack()},1000);
  531. uni.hideLoading()
  532. })
  533. },
  534. finish(){
  535. var that =this
  536. that.warehouse=that.warehouses.toString()
  537. if(!that.grossWeight){
  538. this.$api.msg('请填写毛重');
  539. return;
  540. }
  541. if(!that.skinWeight){
  542. this.$api.msg('请填写皮重');
  543. return;
  544. }
  545. if(this.outMode[this.outModeIndex] == "散装" && !that.poundImg){
  546. this.$api.msg('请上传磅单照片');
  547. return;
  548. }
  549. // if(!that.price){
  550. // this.$api.msg('请上传出库费用');
  551. // return;
  552. // }
  553. if(!that.protein){
  554. this.$api.msg('请填写蛋白');
  555. return;
  556. }
  557. if(that.warehouses.length == 0){
  558. this.$api.msg('请填写仓位号');
  559. return;
  560. }
  561. if(!that.waterContent){
  562. this.$api.msg('请填写水分');
  563. return;
  564. }
  565. if(!that.memo){
  566. this.$api.msg('请填写件数');
  567. return;
  568. }
  569. uni.showLoading({
  570. title: '正在加载',
  571. mask:true
  572. })
  573. that.warehouse=that.warehouses.toString()
  574. that.$api.request('task', 'finishTaskInfoCK', {
  575. grossWeight:!that.grossWeight?'':that.grossWeight,
  576. skinWeight:!that.skinWeight?'':that.skinWeight,
  577. netWeight:!that.netWeight?'':that.netWeight,
  578. poundImg:!that.poundImg?'':that.poundImg,
  579. taskId:!that.taskId?'':that.taskId,
  580. protein:!that.protein?'':that.protein,
  581. price:!that.price?'':that.price,
  582. warehouse:!that.warehouse?'':that.warehouse,
  583. waterContent:!that.waterContent?'':that.waterContent,
  584. companyName:!that.companyName?'':that.companyName,
  585. companyPhone:!that.companyPhone?'':that.companyPhone,
  586. carNo:!that.carNo?'':that.carNo,
  587. userName:!that.userName?'':that.userName,
  588. count:!that.count?'':that.count,
  589. alreadyCount:!that.alreadyCount?'':that.alreadyCount,
  590. address:!that.address?'':that.address,
  591. outMode:!that.outMode1?'':that.outMode1,
  592. memo:!that.memo?'':that.memo,
  593. titleNo:!that.titleNo?'':that.titleNo,
  594. nextUserId:-1
  595. }, failres => {
  596. that.$api.msg(failres.errmsg)
  597. uni.hideLoading()
  598. }).then(res => {
  599. that.$api.msg('完成成功')
  600. setTimeout(()=>{uni.navigateBack()},1000);
  601. uni.hideLoading()
  602. })
  603. },
  604. selectPerson(){
  605. const that = this
  606. uni.showLoading({
  607. title: '正在加载',
  608. mask:true
  609. })
  610. that.$api.request('user', 'getUserList', {
  611. role:'库管'
  612. }, failres => {
  613. that.$api.msg(failres.errmsg)
  614. uni.hideLoading()
  615. }).then(res => {
  616. that.userList = res.data
  617. if(that.userList.length == 0){
  618. that.$api.msg('暂无库管信息')
  619. }
  620. else{
  621. var height = that.userList.length * 100
  622. var width = 500
  623. that.userStyle = "height:"+height+"rpx;width:" + width+"rpx"
  624. that.modalName = 'inModal'
  625. }
  626. uni.hideLoading()
  627. })
  628. },
  629. applyAddNum(){
  630. const that = this
  631. if(!that.addNum){
  632. this.$api.msg('请填写申请运量');
  633. return;
  634. }
  635. uni.showLoading({
  636. title: '正在加载',
  637. mask:true
  638. })
  639. that.$api.request('task', 'applyNum', {
  640. id:that.taskId,
  641. sendCarNo:that.carInfo.sendCarNo,
  642. tranNum:that.addNum
  643. }, failres => {
  644. that.$api.msg(failres.errmsg)
  645. uni.hideLoading()
  646. }).then(res => {
  647. that.task = res.data
  648. that.$api.msg('运量申请成功')
  649. uni.hideLoading()
  650. })
  651. },
  652. // gaipai(){
  653. // const that = this
  654. // uni.showLoading({
  655. // title: '正在加载'
  656. // })
  657. // that.$api.request('user', 'getUserList', {
  658. // role:'库管'
  659. // }, failres => {
  660. // that.$api.msg(failres.errmsg)
  661. // uni.hideLoading()
  662. // }).then(res => {
  663. // that.userList = res.data
  664. // if(that.userList.length == 0){
  665. // that.$api.msg('暂无库管信息')
  666. // }
  667. // else{
  668. // var height = that.userList.length * 100
  669. // var width = 500
  670. // that.userStyle = "height:"+height+"rpx;width:" + width+"rpx"
  671. // that.modalName = 'userModal'
  672. // }
  673. // uni.hideLoading()
  674. // })
  675. // },
  676. // mygaipai(id){
  677. // var that = this
  678. // that.$api.request('tran', 'gaipai',{
  679. // taskId: that.taskId,
  680. // outPersonId:id,
  681. // taskType:that.taskType
  682. // },failres => {
  683. // that.$api.msg(failres.errmsg)
  684. // that.modalName = null
  685. // uni.hideLoading()
  686. // }).then(res => {
  687. // that.modalName = null
  688. // uni.navigateBack({
  689. // delta: 2
  690. // })
  691. // uni.hideLoading()
  692. // })
  693. // },
  694. },
  695. }
  696. </script>
  697. <style lang='scss' scoped="true">
  698. .cu-modal-item{
  699. background:#fff;
  700. position: absolute;
  701. left: 50%;
  702. top: 50%;
  703. transform: translate(-50%,-50%);
  704. padding: 10rpx;
  705. border-radius: 7rpx;
  706. }
  707. .container{
  708. padding-bottom: 160upx;
  709. }
  710. .d-header {
  711. display: flex;
  712. justify-content: center;
  713. align-items: center;
  714. height: 80upx;
  715. font-size: $font-base + 2upx;
  716. color: $font-color-dark;
  717. position: relative;
  718. text {
  719. padding: 0 20upx;
  720. background: #fff;
  721. position: relative;
  722. z-index: 1;
  723. }
  724. &:after {
  725. position: absolute;
  726. left: 50%;
  727. top: 50%;
  728. transform: translateX(-50%);
  729. width: 300upx;
  730. height: 0;
  731. content: '';
  732. border-bottom: 1px solid #ccc;
  733. }
  734. }
  735. .c-list {
  736. font-size: $font-sm + 2upx;
  737. color: $font-color-base;
  738. background: #fff;
  739. .c-row {
  740. display: flex;
  741. align-items: center;
  742. padding: 20upx 30upx;
  743. position: relative;
  744. }
  745. .tit {
  746. width: 220upx;
  747. }
  748. .con {
  749. flex: 1;
  750. color: $font-color-dark;
  751. .selected-text {
  752. margin-right: 10upx;
  753. }
  754. }
  755. .bz-list {
  756. height: 40upx;
  757. font-size: $font-sm+2upx;
  758. color: $font-color-dark;
  759. text {
  760. display: inline-block;
  761. margin-right: 30upx;
  762. }
  763. }
  764. .con-list {
  765. flex: 1;
  766. display: flex;
  767. flex-direction: column;
  768. color: $font-color-dark;
  769. line-height: 40upx;
  770. text-align: right;
  771. padding-right: 20upx;
  772. }
  773. .red {
  774. color: $uni-color-primary;
  775. }
  776. }
  777. /* 底部操作菜单 */
  778. .page-bottom {
  779. position: fixed;
  780. left: 30upx;
  781. bottom: 30upx;
  782. z-index: 95;
  783. display: flex;
  784. justify-content: center;
  785. align-items: center;
  786. width: 690upx;
  787. height: 100upx;
  788. background: rgba(255, 255, 255, .9);
  789. box-shadow: 0 0 20upx 0 rgba(0, 0, 0, .5);
  790. border-radius: 16upx;
  791. .p-b-btn {
  792. display: flex;
  793. flex-direction: column;
  794. align-items: center;
  795. justify-content: center;
  796. font-size: $font-sm;
  797. color: $font-color-base;
  798. width: 96upx;
  799. height: 80upx;
  800. .yticon {
  801. font-size: 40upx;
  802. line-height: 48upx;
  803. color: $font-color-light;
  804. }
  805. &.active,
  806. &.active .yticon {
  807. color: $uni-color-primary;
  808. }
  809. .icon-fenxiang2 {
  810. font-size: 42upx;
  811. transform: translateY(-2upx);
  812. }
  813. .icon-shoucang {
  814. font-size: 46upx;
  815. }
  816. }
  817. .action-btn-group {
  818. .action-btn {
  819. width: 33.3333%;
  820. }
  821. }
  822. }
  823. @mixin playcenter {
  824. display: flex;
  825. align-items: center;
  826. justify-content: center;
  827. }
  828. .xsh-start {
  829. width: 105rpx;
  830. height: 105rpx;
  831. background: #FFFFFF;
  832. border-radius: 50%;
  833. font-size: 29rpx;
  834. color: #4135EB;
  835. @include playcenter;
  836. flex-wrap: wrap;
  837. }
  838. .x-modal {
  839. width: 100%;
  840. .x-m-title {
  841. width: 100%;
  842. height: 90rpx;
  843. padding: 0 38rpx 0 31rpx;
  844. box-sizing: border-box;
  845. font-size: 29rpx;
  846. color: #333333;
  847. border-bottom: 1px dashed #999;
  848. @include playcenter;
  849. justify-content: space-between;
  850. .xm-t-clear {
  851. font-size: 25rpx;
  852. color: #341DB7;
  853. @include playcenter;
  854. >image {
  855. width: 28rpx;
  856. height: 28rpx;
  857. display: block;
  858. margin-right: 8rpx;
  859. }
  860. }
  861. }
  862. .x-m-con {
  863. width: 100%;
  864. padding: 0 31rpx 18rpx;
  865. margin-top: 5rpx;
  866. box-sizing: border-box;
  867. }
  868. }
  869. .wrapper {
  870. width: 100%;
  871. height: 100%;
  872. margin: 30upx 0;
  873. overflow: hidden;
  874. display: flex;
  875. align-content: center;
  876. flex-direction: column;
  877. justify-content: center;
  878. font-size: 28upx;
  879. }
  880. .handWriting {
  881. background: #fff;
  882. width: 100%;
  883. height: 350upx;
  884. }
  885. .handRight {
  886. align-items: center;
  887. }
  888. .handCenter {
  889. border: 4upx dashed #e9e9e9;
  890. flex: 5;
  891. overflow: hidden;
  892. box-sizing: border-box;
  893. width: 90%;
  894. margin: 0 auto;
  895. }
  896. .handTitle {
  897. flex: 1;
  898. color: #666;
  899. justify-content: center;
  900. font-size: 30upx;
  901. }
  902. .handBtn {
  903. flex-direction: column;
  904. padding: 40upx 20upx;
  905. }
  906. .buttons{
  907. width: 100%;
  908. margin-top: 20upx;
  909. justify-content: space-between;
  910. }
  911. .buttons>button{
  912. font-size: 30upx;
  913. height: 80upx;
  914. }
  915. .delBtn {
  916. background: #23df02;
  917. color: #fff;
  918. }
  919. .color{
  920. align-items: center;
  921. }
  922. .color>text{
  923. margin-right: 20upx;
  924. }
  925. .subBtn {
  926. background: #008ef6;
  927. color: #fff;
  928. text-align: center;
  929. justify-content: center;
  930. }
  931. .black-select {
  932. width: 60upx;
  933. height: 60upx;
  934. }
  935. .black-select.color_select {
  936. width: 90upx;
  937. height: 90upx;
  938. }
  939. .red-select {
  940. width: 60upx;
  941. height: 60upx;
  942. }
  943. .red-select.color_select {
  944. width: 90upx;
  945. height: 90upx;
  946. }
  947. .slide-wrapper {
  948. align-items: center;
  949. margin-bottom: 20upx;
  950. }
  951. .slider{
  952. width: 400upx;
  953. padding-left: 20upx;
  954. }
  955. .drop {
  956. width: 50upx;
  957. height: 50upx;
  958. border-radius: 50%;
  959. background: #FFF;
  960. position: absolute;
  961. left: 0upx;
  962. top: -10upx;
  963. box-shadow: 0px 1px 5px #888888;
  964. }
  965. .slide {
  966. width: 250upx;
  967. height: 30upx;
  968. }
  969. .showimg{
  970. border: 4upx solid #e9e9e9;
  971. overflow: hidden;
  972. width: 90%;
  973. margin: 0 auto;
  974. background: #eee;
  975. height: 350upx;
  976. margin-top: 40upx;
  977. align-items: center;
  978. justify-content: center;
  979. }
  980. .showimg>image{
  981. width: 100%;
  982. height: 100%;
  983. }
  984. .showimg>text{
  985. font-size: 40upx;
  986. color: #888;
  987. }
  988. .indexFixed{
  989. position: fixed;
  990. left:0;
  991. bottom:0;
  992. right:0;
  993. }
  994. /* 源码 */
  995. .btn-toolbar:before,
  996. .btn-toolbar:after{
  997. display:table;
  998. content:" ";
  999. }
  1000. .btn-toolbar:after{
  1001. clear:both;
  1002. }
  1003. .btn-toolbar {
  1004. margin-left: -5px;
  1005. }
  1006. .btn-toolbar .btn,
  1007. .btn-toolbar .btn-group,
  1008. .btn-toolbar .input-group {
  1009. float: left;
  1010. }
  1011. .btn-toolbar > .btn,
  1012. .btn-toolbar > .btn-group,
  1013. .btn-toolbar > .input-group {
  1014. margin-left: 5px;
  1015. }
  1016. </style>