designchangesedit.vue 22 KB

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