viseadd.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823
  1. <template>
  2. <view>
  3. <uni-forms ref="form" labelPosition="left" labelAlign="left" @submit="submitForm">
  4. <view class="uni-form-item uni-column">
  5. <view class="title"><text class="uni-form-item__title">签证编号</text></view>
  6. <view class="uni-input-wrapper">
  7. <input class="uni-input" focus placeholder="请填写签证编号" v-model="viseId" />
  8. </view>
  9. </view>
  10. <view class="uni-form-item uni-column">
  11. <view class="title"><text class="uni-form-item__title">签证名称</text></view>
  12. <view class="uni-input-wrapper">
  13. <input class="uni-input" focus placeholder="请填写签证名称" v-model="viseName" />
  14. </view>
  15. </view>
  16. <view class="uni-form-item uni-column">
  17. <view class="title"><text class="uni-form-item__title">申请单</text></view>
  18. <view class="uni-input-wrapper ">
  19. <input class="uni-input-small" v-model="requisitionName" />
  20. <a href='javascript:;' @click='getRequisition' class="uni-icon"><i class="fa fa-search" aria-hidden="true"></i></a>
  21. </view>
  22. </view>
  23. <view class="uni-form-item uni-column">
  24. <view class="title"><text class="uni-form-item__title">关联合同</text></view>
  25. <view class="uni-input-wrapper ">
  26. <input class="uni-input-small" disabled=true v-model="contractName" />
  27. <a href='javascript:;' @click='getRelationContract' class="uni-icon"><i class="fa fa-search" aria-hidden="true"></i></a>
  28. </view>
  29. </view>
  30. <view class="uni-form-item uni-column" v-show="contractName">
  31. <view class="title"><text class="uni-form-item__title">税率</text></view>
  32. <view class="uni-input-wrapper">
  33. {{contract.taxRate+'%'}}
  34. </view>
  35. </view>
  36. <view class="uni-form-item uni-column" v-show="contractName">
  37. <view class="title"><text class="uni-form-item__title">是否可抵扣</text></view>
  38. <view class="uni-input-wrapper" >
  39. {{contract.isDeduct==0?'否':'是'}}
  40. </view>
  41. </view>
  42. <view class="uni-form-item uni-column">
  43. <view class="title"><text class="uni-form-item__title">签证日期</text></view>
  44. <view class="uni-input-wrapper" style="justify-content: left;">
  45. <picker mode="date" @change="bindDateChange" v-model="viseDate" style="width: 100%;">
  46. <view class="uni-input">{{viseDate}}</view>
  47. </picker>
  48. </view>
  49. </view>
  50. <view class="uni-form-item uni-column">
  51. <view class="title"><text class="uni-form-item__title">办理期限</text></view>
  52. <view class="uni-input-wrapper" style="justify-content: left;">
  53. <picker mode="date" @change="bindDealDateChange" v-model="endDate" style="width: 100%;">
  54. <view class="uni-input">{{endDate}}</view>
  55. </picker>
  56. </view>
  57. </view>
  58. <view class="uni-form-item uni-column">
  59. <view class="title"><text class="uni-form-item__title">签证类型</text></view>
  60. <view class="uni-input-wrapper" style="justify-content: left;">
  61. <picker mode="selector" :value="index" :range="array" range-key="name" @change="bindPickerChange" v-model="viseType" style="width: 100%;">
  62. <view class="uni-input">{{array.length>0?array[index]:''}}</view>
  63. </picker>
  64. </view>
  65. </view>
  66. <view class="uni-form-item uni-column">
  67. <view class="title"><text class="uni-form-item__title">暂估金额</text></view>
  68. <view class="uni-input-wrapper">
  69. <input class="uni-input" focus value="0" v-model="estimateCash" type="digit" />
  70. </view>
  71. </view>
  72. <view class="uni-form-item uni-column">
  73. <view class="title"><text class="uni-form-item__title">报送金额</text></view>
  74. <view class="uni-input-wrapper">
  75. <input class="uni-input" focus value="0" v-model="reportCash" type="digit"/>
  76. </view>
  77. </view>
  78. <view class="uni-form-item uni-column">
  79. <view class="title"><text class="uni-form-item__title">签证原因</text></view>
  80. <view class="uni-textarea">
  81. <textarea focus placeholder="签证原因" v-model="reason" auto-height="true" />
  82. </view>
  83. </view>
  84. <view class="uni-form-item uni-column">
  85. <view class="title"><text class="uni-form-item__title">备注</text></view>
  86. <view class="uni-textarea">
  87. <textarea focus placeholder="请写备注" v-model="remark" auto-height="true" />
  88. </view>
  89. </view>
  90. <view class="uni-form-item uni-column">
  91. <view class="title" style="background-color: #efefef;"><text class="uni-form-item__title">上传文件</text></view>
  92. <view class="content">
  93. <g-upfile ref='gUpfile' :mode="imgList" @chooseFile='chooseFile' @imgDelete='imgDelete' :control='control'
  94. :columnNum="columnNum" :maxCount="maxCount" @limitFileSizeList='limitFileSizeList' @limitFileTypeList='limitFileTypeList' :maxFileSize="20000"></g-upfile>
  95. </view>
  96. </view>
  97. <uni-section title="费用明细" type="line"></uni-section>
  98. <uni-list>
  99. <uni-list-item v-if="costList" v-for="(item, index) in costList" :key="index">
  100. <view slot="body" class="slot-box">
  101. <view class="row">
  102. <view class="column-left">费用项:</view>
  103. <view class="column-right">{{item.costCodeName}}</view>
  104. </view>
  105. <view class="row">
  106. <view class="column-left">含税金额</view>
  107. <view class="column-right">
  108. <input class="uni-input-small" type="digit" v-model="item.cash" style="width: 240px;text-align: left;" @blur='countTaxtCash(item,index)' />
  109. </view>
  110. </view>
  111. <view class="row">
  112. <view class="column-left">税额</view>
  113. <view class="column-right" >
  114. <input class="uni-input-small" type="digit" disabled="true" v-model="item.rateCash" style="width: 240px;text-align: left;" />
  115. </view>
  116. </view>
  117. <view class="row">
  118. <view class="column-left">金额</view>
  119. <view class="column-right">
  120. <input class="uni-input-small" type="digit" disabled="true" v-model="item.noRateCash" style="width: 240px;text-align: left;" />
  121. </view>
  122. </view>
  123. <view class="row">
  124. <view class="column-left">备注:</view>
  125. <view class="column-right">
  126. <textarea focus v-model="item.remark" auto-height="true" style="width: 240px;text-align: left;" />
  127. </view>
  128. </view>
  129. <view class="row">
  130. <view class="column-left">操作:</view>
  131. <view class="column-right">
  132. <i class="fa fa-window-close" aria-hidden="true" @click="delRow(index)" style="font-size:20px;cursor: pointer;color: #999;margin-left:15px;" title="删除"></i>
  133. </view>
  134. </view>
  135. </view>
  136. </uni-list-item>
  137. </uni-list>
  138. <view style="margin-bottom: 120px;">
  139. </view>
  140. <view class="uni-btn-v uni-column">
  141. <button type="primary" form-type="submit" style="border-radius: 15px;" >提交</button>
  142. </view>
  143. </uni-forms>
  144. <topicon class="topicon" :iconWidth="50" :iconHeight="50" :startPostion="3" iconPath="../../../static/zhiding.png"
  145. :marginBottom="20" :marginTop="60" :marginLeft="5" :marginRight="5" @tapIcon="tapIcon"
  146. ></topicon>
  147. </view>
  148. </template>
  149. <script>
  150. import {GetQianzhengDropDown} from "@/common/api/requisitionApi.js";
  151. import {GetContract} from "@/common/api/commonApi.js";
  152. import {GetContractCostDTOs,InsertVise} from "@/common/api/viseApi.js";
  153. import {Decimal} from 'decimal.js'; //decimal计算
  154. import topicon from '@/components/gwh-backTopIcon/gwh-backTopIcon.vue'
  155. export default {
  156. components:{
  157. topicon
  158. },
  159. data() {
  160. return {
  161. needFormCach:false,
  162. viseId:'',
  163. viseName:'',
  164. requisitionCode:'', //申请单编号
  165. requisitionName:'', //申请单名称
  166. contractCode:'',
  167. contractName:'',
  168. contract:{}, //获取的关联合同信息
  169. viseDate:this.$util.getDate({
  170. format: true
  171. }),
  172. endDate:this.$util.getDate({
  173. format: true
  174. }),
  175. viseType:'',
  176. estimateCash:0.00,
  177. reportCash:0.00,
  178. reason:'',
  179. remark:'',
  180. costList:[], //费用明细
  181. imageList: [],
  182. countIndex: 5,
  183. count: [1, 2, 3, 4, 5],
  184. title1: 'picker',
  185. array: [],
  186. index: 0,
  187. date: this.$util.getDate({
  188. format: true
  189. }),
  190. startDate:this.$util.getDate('start'),
  191. endDate:this.$util.getDate('end'),
  192. control: true,
  193. columnNum: 3,
  194. imgList: [],
  195. urlList:[],
  196. maxCount:5
  197. }
  198. },
  199. onLoad(){
  200. //console.info(page.path);
  201. console.info(uni.getStorageSync('storage_state'));
  202. //console.info(this);
  203. this.$util.persistLogin(this);
  204. //console.info(this.$store.state.user);
  205. },
  206. onUnload() {
  207. this.imageList = [],
  208. this.countIndex = 5;
  209. },
  210. created: function() {
  211. this.GetDropDown();
  212. },
  213. updated:function(){
  214. },
  215. methods: {
  216. /**
  217. * 手动提交
  218. * @param {Object} form
  219. */
  220. submitForm(e) {
  221. console.info('submitForm');
  222. let _this=this;
  223. if(this.viseId==='')
  224. {
  225. uni.showToast({
  226. icon:"none",
  227. title:"请填写签证编号",
  228. duration:3000
  229. });
  230. return;
  231. }
  232. if(this.viseName==='')
  233. {
  234. uni.showToast({
  235. icon:"none",
  236. title:"请填写签证名称",
  237. duration:3000
  238. });
  239. return;
  240. }
  241. if(this.viseName.length>50)
  242. {
  243. uni.showToast({
  244. icon:"none",
  245. title:"签证名称不能多于50字",
  246. duration:3000
  247. });
  248. return;
  249. }
  250. // if(this.requisitionCode===""){
  251. // uni.showToast({
  252. // icon:"none",
  253. // title:"请选择申请单",
  254. // duration:3000
  255. // });
  256. // return;
  257. // }
  258. if(this.contractCode===""){
  259. uni.showToast({
  260. icon:"none",
  261. title:"请选择关联合同号",
  262. duration:3000
  263. });
  264. return;
  265. }
  266. if(this.viseDate===""){
  267. uni.showToast({
  268. icon:"none",
  269. title:"请选择签证日期",
  270. duration:3000
  271. });
  272. return;
  273. }
  274. if(this.endDate===""){
  275. uni.showToast({
  276. icon:"none",
  277. title:"请选择办理期限",
  278. duration:3000
  279. });
  280. return;
  281. }
  282. if(this.changeType===""){
  283. uni.showToast({
  284. icon:"none",
  285. title:"签证类型不能为空",
  286. duration:3000
  287. });
  288. return;
  289. }
  290. if(this.requisitionReason===""){
  291. uni.showToast({
  292. icon:"none",
  293. title:"原因不能为空",
  294. duration:3000
  295. });
  296. return;
  297. }
  298. if(this.reason!=""){
  299. if(this.reason.length>500){
  300. uni.showToast({
  301. icon:"none",
  302. title:"原因不能超过500字",
  303. duration:3000
  304. });
  305. return;
  306. }
  307. }
  308. if(this.remark!==""){
  309. if(this.remark.length>500){
  310. uni.showToast({
  311. icon:"none",
  312. title:"备注不能超过500字",
  313. duration:3000
  314. });
  315. return;
  316. }
  317. }
  318. if(this.costList.length<=0){
  319. uni.showToast({
  320. icon:"none",
  321. title:"费用明细不能为空",
  322. duration:3000
  323. });
  324. return;
  325. }
  326. let moneyType=this.contract.moneyType;
  327. let exchangeRate=this.contract.exchangeRate;
  328. let taxRate=this.contract.taxRate;
  329. let list1=this.costList; //费用明细
  330. let totalCash=0.00; //总含税金额
  331. let rateTotalCash=0.00; //税收总额
  332. let noRateTotalCash=0.00; //不含税总金额
  333. let viseCosts=[];
  334. list1.forEach(function(item,index,arr){
  335. totalCash+= item.cash-0.00;
  336. rateTotalCash+= item.rateCash;
  337. noRateTotalCash+= item.noRateCash;
  338. viseCosts.push({costCode:item.costCode,costBudgetSetCode:item.costBudgetSetCode,cash:item.cash-0.00,checkCash:0.00,moneyType:moneyType,exchangeRate:exchangeRate,money:item.cash-0.00,checkMoney:0.00,remark:item.remark,rate:taxRate,rateCash:item.rateCash,rateMoney:item.rateCash,noRateCash:item.noRateCash,noRateMoney:item.noRateCash});
  339. });
  340. //vise viseCosts
  341. var vise={viseId:this.viseId,viseName:this.viseName,viseType:this.viseType,person:this.$util.getState(this,'userCode'),unitCode:this.$store.state.departmentCode,viseDate:this.viseDate,endDate:this.endDate,remark:this.remark,reason:this.reason,projectCode:this.$store.state.projectCode,contractCode:this.contractCode,totalCash:totalCash,moneyType:moneyType,exchangeRate:exchangeRate,estimateCash:this.estimateCash-0,reportCash:this.reportCash-0,requisitionCode:this.requisitionCode,rate:taxRate,rateTotalCash:rateTotalCash,noRateTotalCash:noRateTotalCash };
  342. var data={vise:vise,viseCosts:viseCosts};
  343. console.info('data:',data);
  344. //return;
  345. InsertVise(data).then((res)=>{
  346. console.info("提交应答");
  347. console.info(res);
  348. if(res){
  349. //上传图片
  350. _this.uploadFileToServe(res) ;
  351. uni.navigateTo({
  352. url:'/pages/template/GetVises/GetVises'
  353. })
  354. }
  355. else{
  356. uni.showToast({
  357. title:'添加失败,重新操作',
  358. icon:'none',
  359. duration:3000
  360. })
  361. }
  362. });
  363. },
  364. /*
  365. 获取申请单
  366. */
  367. getRequisition() {
  368. let _this = this;
  369. _this.saveTemp(_this);
  370. //创建名字为fire的监听器,监听子页面传值事件
  371. uni.$on('requisition', function(data) {
  372. console.info("监听getRequisition子页面的传值", data);
  373. //console.info('监听',_this);
  374. _this.getTemp(_this);
  375. _this.requisitionCode=data[0].requisitionCode;
  376. _this.requisitionName=data[0].requisitionName;
  377. uni.setStorage({
  378. key:'requisitionCode',
  379. data:_this.requisitionCode
  380. });
  381. uni.setStorage({
  382. key:'requisitionName',
  383. data:_this.requisitionName
  384. });
  385. //uni.setst
  386. /* _this.$nextTick(function(){
  387. //更新dom
  388. }); */
  389. _this.needFormCach=true;
  390. //接收一次监听,一旦监听到回传值,则清除监听事件,若不清除,会占用资源
  391. uni.$off("requisition");
  392. });
  393. uni.navigateTo({
  394. url: '/pages/template/SelectRelationRequision/SelectRelationRequision?type=0'
  395. });
  396. },
  397. /*
  398. 获取关联合同
  399. */
  400. getRelationContract() {
  401. let _this = this;
  402. _this.saveTemp(_this);
  403. //创建名字为fire的监听器,监听子页面传值事件
  404. uni.$on('contract', function(data) {
  405. console.info("监听getRelationContract子页面的传值", data);
  406. //console.info('监听',_this);
  407. _this.getTemp(_this);
  408. _this.contractCode=data[0].contractCode;
  409. _this.contractName=data[0].contractName;
  410. _this.contract=data[0].contract;
  411. _this.getCostList();
  412. /* _this.$nextTick(function(){
  413. //更新dom
  414. }); */
  415. //接收一次监听,一旦监听到回传值,则清除监听事件,若不清除,会占用资源
  416. uni.$off("contract");
  417. });
  418. /* let requisitionCode=_this.requisitionCode;
  419. if(requisitionCode==""){
  420. uni.showToast({
  421. title:'请先选择申请单',
  422. icon:'none',
  423. duration:3000
  424. });
  425. return;
  426. } */
  427. uni.navigateTo({
  428. url: '/pages/template/SelectRelationContract/SelectRelationContract'
  429. });
  430. },
  431. /*
  432. 获取费用明细
  433. */
  434. getCostList() {
  435. let _this = this;
  436. _this.saveTemp(_this);
  437. if(_this.contractCode){
  438. GetContractCostDTOs(_this.contractCode).then(res=>{
  439. console.info('GetContractCostDTOs',res);
  440. if(res.length>0){
  441. res.forEach(function(item,index,arr){
  442. item.cash=0.00;
  443. item.rateCash=0.00;
  444. item.noRateCash=0.00;
  445. _this.$set(_this.costList,index,item);
  446. });
  447. }
  448. });
  449. }
  450. },
  451. delRow: function(index) {
  452. console.info("删除");
  453. console.info(this.costList[index]);
  454. this.costList.splice(index, 1);
  455. },
  456. /* 计算该行的税额 */
  457. countTaxtCash:function(item,index){
  458. let _this=this;
  459. //console.info("countTaxtCash",item);
  460. //console.info("countTaxtCash",index);
  461. //let value=event.detail.value;
  462. let taxRate=_this.contract.taxRate;
  463. item.rateCash=item.cash*taxRate;
  464. item.noRateCash=item.cash-item.rateCash;
  465. },
  466. bindPickerChange: function(e) {
  467. //console.log('picker发送选择改变,携带值为:' + e.detail.value);
  468. //console.info(e.detail);
  469. this.index = e.detail.value;
  470. this.viseType=this.array[this.index];
  471. console.info(this.viseType);
  472. },
  473. bindDateChange: function(e) {
  474. let date = e.detail.value;
  475. this.viseDate=date;
  476. console.info('bindDateChange',this.viseDate);
  477. },
  478. bindDealDateChange: function(e) {
  479. let date = e.detail.value;
  480. this.endDate=date;
  481. console.info('bindDealDateChange',this.endDate);
  482. },
  483. GetDropDown:function(){
  484. let that=this;
  485. GetQianzhengDropDown().then((res)=>{
  486. console.info('GetQianzhengDropDown:',res);
  487. res.forEach(function(item,index,array){
  488. that.$set(that.array,index,item);
  489. });
  490. //赋默认值
  491. that.viseType=that.array[0];
  492. console.info(that.viseType);
  493. if(that.needFormCach){
  494. that.getTemp(that);
  495. }
  496. });
  497. },
  498. /*
  499. 上传后返回的值:
  500. list:上传后图片数组
  501. v:返回当前上传图片的临时路径
  502. */
  503. chooseFile(list, v) {
  504. console.log("上传图片_list:", list)
  505. console.log("上传图片_v:", v);
  506. this.urlList=list;
  507. console.info("urlList",this.urlList);
  508. },
  509. /*
  510. 删除图片:
  511. list:删除返回删除后剩余的图片数组
  512. eq:返回删除的数组
  513. */
  514. imgDelete(list, eq) {
  515. console.log("删除图片_list:", list);
  516. console.log("删除图片_eq:", eq);
  517. this.urlList=list;
  518. console.info("urlList",this.urlList);
  519. },
  520. /*限制文件大小列表*/
  521. limitFileSizeList(list){
  522. console.info('limitFileSizeList:',list);
  523. if(list){
  524. if(list.length>0){
  525. uni.showModal({
  526. title:'警告',
  527. content: list.join()+' 文件大小超过2000KB',
  528. showCancel:false
  529. });
  530. }
  531. }
  532. },
  533. /*限制文件类型列表*/
  534. limitFileTypeList(list,allowFileType){
  535. console.info('limitFileTypeList:',list);
  536. console.info('limitFileTypeList:',allowFileType);
  537. if(list){
  538. if(list.length>0){
  539. uni.showModal({
  540. title:'警告',
  541. content: list.join()+' 文件类型必须是'+allowFileType.join(),
  542. showCancel:false
  543. });
  544. }
  545. }
  546. },
  547. /*
  548. 执行上传服务:
  549. urlList:要上传的图片:数组类型
  550. */
  551. uploadFileToServe(masterCode) {
  552. let _this=this;
  553. var urlList=_this.urlList;
  554. if (!urlList || urlList.length <= 0) {
  555. return;
  556. };
  557. //console.info(urlList);
  558. //return;
  559. for (let i = 0; i < urlList.length; i++) {
  560. uni.uploadFile({
  561. url: '/api/Common/UploadImage',
  562. filePath: urlList[i],
  563. name: 'file',
  564. formData: {
  565. createPerson:_this.$store.state.user.userCode,
  566. masterCode:masterCode,
  567. attachMentType:'Vise'
  568. },
  569. headers: {
  570. 'Content-Type': 'multipart/form-data; boundary = ' + new Date().getTime()
  571. //这里要把content-type设置为multipard/form-data,同时还要设置boundary
  572. },
  573. success: (uploadFileRes) => {
  574. console.log("图片上传:",uploadFileRes.data);
  575. }
  576. });
  577. }
  578. },
  579. saveTemp(_this){ //临时存
  580. uni.setStorage({
  581. key:'viseId',
  582. data:_this.viseId
  583. });
  584. uni.setStorage({
  585. key:'viseName',
  586. data:_this.viseName
  587. });
  588. uni.setStorage({
  589. key:'requisitionCode',
  590. data:_this.requisitionCode
  591. });
  592. uni.setStorage({
  593. key:'requisitionName',
  594. data:_this.requisitionName
  595. });
  596. uni.setStorage({
  597. key:'contractName',
  598. data:_this.contractName
  599. });
  600. uni.setStorage({
  601. key:'contractCode',
  602. data:_this.contractCode
  603. });
  604. uni.setStorage({
  605. key:'viseDate',
  606. data:_this.viseDate
  607. });
  608. uni.setStorage({
  609. key:'endDate',
  610. data:_this.endDate
  611. });
  612. uni.setStorage({
  613. key:'viseType',
  614. data:_this.viseType
  615. });
  616. uni.setStorage({
  617. key:'estimateCash',
  618. data:_this.estimateCash
  619. });
  620. uni.setStorage({
  621. key:'reportCash',
  622. data:_this.reportCash
  623. });
  624. uni.setStorage({
  625. key:'reason',
  626. data:_this.reason
  627. });
  628. uni.setStorage({
  629. key:'remark',
  630. data:_this.remark
  631. });
  632. },
  633. getTemp(_this){ //获取缓存,重新给表单赋值
  634. _this.viseId=uni.getStorageSync('viseId');
  635. _this.viseName=uni.getStorageSync('viseName');
  636. _this.requisitionCode=uni.getStorageSync('requisitionCode');
  637. _this.requisitionName=uni.getStorageSync('requisitionName');
  638. _this.contractName=uni.getStorageSync('contractName');
  639. _this.contractCode=uni.getStorageSync('contractCode');
  640. _this.viseDate=uni.getStorageSync('viseDate');
  641. _this.endDate=uni.getStorageSync('endDate');
  642. _this.viseType=uni.getStorageSync('viseType');
  643. _this.estimateCash=uni.getStorageSync('estimateCash');
  644. _this.reportCash=uni.getStorageSync('reportCash');
  645. _this.reason=uni.getStorageSync('reason');
  646. _this.remark=uni.getStorageSync('remark');
  647. },
  648. tapIcon(e){
  649. console.log('you tap icon');
  650. document.documentElement.scrollTop = document.body.scrollTop = 0;
  651. }
  652. }
  653. }
  654. </script>
  655. <style scoped>
  656. /* 头条小程序组件内不能引入字体 */
  657. /* #ifdef MP-TOUTIAO */
  658. @font-face {
  659. font-family: uniicons;
  660. font-weight: normal;
  661. font-style: normal;
  662. src: url("~@/static/uni.ttf") format("truetype");
  663. }
  664. /* #endif */
  665. page {
  666. display: flex;
  667. flex-direction: column;
  668. box-sizing: border-box;
  669. background-color: #efeff4;
  670. min-height: 100%;
  671. height: auto;
  672. }
  673. view {
  674. font-size: 14px;
  675. line-height: inherit;
  676. }
  677. .uni-form-item__title {
  678. font-size: 16px;
  679. line-height: 24px;
  680. }
  681. .uni-input-wrapper {
  682. /* #ifndef APP-NVUE */
  683. display: flex;
  684. /* #endif */
  685. padding: 8px 13px;
  686. flex-direction: row;
  687. flex-wrap: nowrap;
  688. background-color: #FFFFFF;
  689. }
  690. .title{
  691. background-color: #efefef;
  692. }
  693. .uni-input {
  694. height: 28px;
  695. line-height: 28px;
  696. font-size: 15px;
  697. padding: 0px;
  698. flex: 1;
  699. background-color: #FFFFFF;
  700. }
  701. .uni-icon {
  702. font-family: uniicons;
  703. font-size: 24px;
  704. font-weight: normal;
  705. font-style: normal;
  706. width: 24px;
  707. height: 24px;
  708. line-height: 24px;
  709. margin-left:15px;
  710. color: #999999;
  711. }
  712. .uni-eye-active {
  713. color: #007AFF;
  714. }
  715. .uni-btn-v{
  716. position: fixed;
  717. bottom: 0;
  718. width:100%;
  719. }
  720. .header-slot-box {
  721. font-size:15px;
  722. margin: 5px 5px;
  723. width:20%;
  724. justify-content: center;
  725. }
  726. .body-slot-box {
  727. font-size:15px;
  728. margin: 5px 5px;
  729. width:40%;
  730. justify-content: center;
  731. }
  732. .footer-slot-box {
  733. font-size:15px;
  734. margin: 5px 5px;
  735. width:40%;
  736. justify-content: center;
  737. }
  738. .uni-textarea textarea{
  739. font-size:15px;
  740. }
  741. .content {
  742. padding: 40rpx;
  743. background-color: #fff;
  744. }
  745. /* 上传控件 */
  746. .uploadControl {
  747. border: 1rpx solid #eee;
  748. border-radius: 10rpx;
  749. width: 130rpx;
  750. display: block;
  751. height: 130rpx;
  752. text-align: center;
  753. line-height: 130rpx;
  754. font-size: 30rpx;
  755. color: #888;
  756. background-color: #eeeeee;
  757. }
  758. .topicon >>> .icon{
  759. border: #4CD964 2upx solid;
  760. }
  761. </style>