task_detail_ck.vue 25 KB

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