移动端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

391 righe
11 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. left-arrow
  5. fixed
  6. placeholder
  7. @click-left="$router.back(-1)"
  8. >
  9. <template #title>
  10. <p style="font-weight: bold;">重大事项</p>
  11. </template>
  12. <template #right>
  13. <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/>
  14. </template>
  15. </van-nav-bar>
  16. <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first readonly>
  17. <p class="main_title">基础信息</p>
  18. <div class="main_box">
  19. <van-field
  20. label="事项名称"
  21. v-model="form.eventName"
  22. placeholder="事项名称"
  23. input-align="right"
  24. label-width="auto"
  25. required
  26. :rules="[{ required: true , message:'事项名称' }]"
  27. />
  28. <van-field
  29. readonly
  30. clickable
  31. required
  32. :rules="[{ required: true , message:'发生日期' }]"
  33. v-model="form.eventTime"
  34. label="发生日期"
  35. placeholder="发生日期"
  36. input-align="right"
  37. right-icon="arrow-down"
  38. />
  39. <van-popup v-model="showlasj" position="bottom">
  40. <van-datetime-picker
  41. v-model="currentDate"
  42. type="date"
  43. title="选择年月日"
  44. :min-date="minDate"
  45. :max-date="maxDate"
  46. @confirm="onConfirmLasj"
  47. @cancel="showlasj = false"
  48. />
  49. </van-popup>
  50. </div>
  51. <div class="main_box" style="margin-top: 10px;">
  52. <van-field
  53. label="事项内容"
  54. input-align="right"
  55. label-width="auto"
  56. readonly
  57. />
  58. <van-field
  59. v-model="form.eventContent"
  60. type="textarea"
  61. placeholder="事项内容"
  62. rows="8"
  63. required
  64. :rules="[{ required: true , message:'事项内容' }]"
  65. />
  66. <!-- <editor v-model="form.eventContent" :min-height="192"/>-->
  67. <!-- <quill-editors @ChangeText="(text)=>{form.eventContent=text}" :title="title" />-->
  68. </div>
  69. <div class="main_box" style="margin-top: 10px;">
  70. <van-field
  71. label="备注"
  72. v-model="form.remark"
  73. type="textarea"
  74. placeholder="备注"
  75. input-align="right"
  76. rows="3"
  77. label-width="auto"
  78. />
  79. </div>
  80. <!-- <p class="main_title">上传附件</p>
  81. <div class="main_box" style="padding: 5px 0 0 8px;">
  82. <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>
  83. </div> -->
  84. <p style="margin-top:20px;padding: 0 10px">附件{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p>
  85. <van-cell v-for="(item,index) in fileList" :key="index">
  86. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  87. </van-cell>
  88. </van-form>
  89. <div class="main_box examine_box">
  90. <van-row type="flex" justify="space-between" align="center">
  91. <van-col span="5">审批<br/>意见</van-col>
  92. <van-col span="19">
  93. <van-radio-group v-model="pass" direction="horizontal" :disabled="!isAudit">
  94. <van-radio name="true">同意</van-radio>
  95. <van-radio name="false">驳回</van-radio>
  96. </van-radio-group>
  97. <van-field :readonly="!isAudit" rows="2" autosize v-model="comment" type="textarea" placeholder="请输入审批意见"/>
  98. </van-col>
  99. </van-row>
  100. </div>
  101. <div style="margin: 16px 2%;" v-if="isAudit">
  102. <van-row>
  103. <van-col span="24" align="center">
  104. <van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button>
  105. </van-col>
  106. </van-row>
  107. <div class="clear"></div>
  108. </div>
  109. </div>
  110. </template>
  111. <script>
  112. import { addMajorevent , getMajorevent , attachmentList , updateMajorevent,approval } from "@/api/onlineHome/bankAgriculture/paymentApproval";
  113. import request from '@/utils/request';
  114. import Dialog from "vant/lib/dialog";
  115. import Editor from '@/components/Editor';
  116. import {A_auditHistoryDetail} from "@/api/audit/aauditpipeline";
  117. export default {
  118. name: "approvalApproval13",
  119. components: {
  120. Editor,
  121. },
  122. data() {
  123. return {
  124. title:false,
  125. showcapital:false,
  126. showpayee:false,
  127. showlasj:false,
  128. showbankType:false,
  129. showproject:false,
  130. showFundType:false,
  131. showpayer:false,
  132. buttonType:'a',
  133. minDate: new Date(2000, 1, 1),
  134. maxDate: new Date(2050, 12, 31),
  135. currentDate: new Date(),
  136. form:{},
  137. fileList:[],
  138. capitalExpenditureType:'',
  139. payee:'',
  140. bankType:'',
  141. wfydlxDictionaries:[],
  142. jglxDictionaries:[],
  143. sysDictionaries:[],
  144. capitalExpenditureTypeOptions:[],
  145. bankTypeDictionaries:[],
  146. projectList:[],
  147. projectFundTypeOptions:[],
  148. projectFundTypeDictionaries:[],
  149. projectListShow:[],
  150. payerOptions:[],
  151. chargeItme:[],
  152. chargeItmeShow:[],
  153. payeeList:[],
  154. // 查询参数
  155. queryParams: {
  156. transferType:"",
  157. orderByColumn: "id",
  158. isAsc: "desc",
  159. },
  160. capitalExpenditureOpen:false,
  161. projectForm:{
  162. projectId:null,
  163. projectName:null,
  164. projectContractor:null,
  165. projectAmount:null,
  166. projectBillNum:null,
  167. projectFundType:'1',
  168. outId:null,
  169. ynType:'2'
  170. },
  171. projectFundType:'',
  172. uploadFiles:[],
  173. // 审核意见默认值
  174. pass: "true",
  175. comment: "同意",
  176. templateList:[],
  177. };
  178. },
  179. created() {
  180. this.reset();
  181. this.getForm();
  182. this.getFileList();
  183. },
  184. methods: {
  185. // 表单重置
  186. reset() {
  187. this.form = {
  188. id: null,
  189. upId: null,
  190. downId: null,
  191. orderId: null,
  192. cashierId: null,
  193. transferType: '3',
  194. accountType: '2',
  195. explainSituation: null,
  196. succeedAmount: null,
  197. payer: null,
  198. payerAccount: null,
  199. operatorCode: null,
  200. enterpriseCode: null,
  201. expenditureAmount: null,
  202. capitalExpenditureType: '1',
  203. remark: null,
  204. transferStatus: "0",
  205. auditStatus: "0",
  206. paymentState: "1",
  207. bankPriority: "0",
  208. clientPriority: "0"
  209. };
  210. this.processList = {}
  211. this.projectForm={
  212. projectId:null,
  213. projectName:null,
  214. projectContractor:null,
  215. projectAmount:null,
  216. projectBillNum:null,
  217. projectFundType:'1',
  218. outId:null,
  219. ynType:'1'
  220. }
  221. },
  222. getForm(){
  223. getMajorevent(this.$route.query.id).then(response => {
  224. this.form = response.data;
  225. if(!this.isAudit)
  226. {
  227. A_auditHistoryDetail(this.$route.query.taskId).then((resp) => {
  228. this.pass = resp.data.auditStatus === '3' ? "true" : 'false';
  229. this.comment = resp.data.auditRemark;
  230. });
  231. }
  232. });
  233. },
  234. goFlow(){
  235. window.location='approvalProcess13?id='+this.$route.query.auditbatchNo;
  236. },
  237. getChange(){
  238. updateMajorevent(this.form).then(response => {
  239. this.$toast.success('修改成功');
  240. setTimeout(function(){
  241. history.go(-1)
  242. },2000)
  243. });
  244. },
  245. getError(e){
  246. console.log(e)
  247. this.$notify({ type: 'danger', message: e.errors[0].message });
  248. },
  249. onConfirmLasj(data){
  250. this.form.eventTime = this.getNowFormatDate(data).substr(0,10);
  251. this.showlasj = false;
  252. },
  253. beforeRead(file) {
  254. this.uploadFiles.push(file.file);
  255. },
  256. deleteFile(file){
  257. this.uploadFiles.map((response,index) => {
  258. if(file.file == response){
  259. this.uploadFiles.splice(index,1)
  260. }
  261. })
  262. },
  263. getFileList(){
  264. let oData= {
  265. tableId: this.$route.query.id,
  266. tableName: 't_yinnong_majorevent',
  267. bizPath: "yinnong",
  268. fileType: "",
  269. }
  270. attachmentList(oData).then(res => {
  271. res.rows.map(r => {
  272. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  273. // this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  274. this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  275. console.log(r)
  276. })
  277. })
  278. },
  279. goBack(){
  280. window.history.go(-1)
  281. },
  282. //删除家庭成员
  283. deleteChargeItme(index){
  284. this.chargeItme.splice(index,1)
  285. },
  286. /** 提交按钮 */
  287. submitForm() {
  288. const data = {
  289. taskId: this.$route.query.taskId,
  290. auditbatchNo: this.$route.query.auditbatchNo,
  291. remark: this.comment,
  292. pass: this.pass === "true",
  293. deptId: this.form.deptId
  294. };
  295. approval(data).then((response) => {
  296. if(response.code==200){
  297. this.$toast.success("操作成功");
  298. setTimeout(function(){
  299. history.go(-1)
  300. },2000)
  301. } else{
  302. this.$toast.success("操作失败");
  303. }
  304. });
  305. },
  306. },
  307. watch: {
  308. pass: function (val) {
  309. if(this.isAudit)
  310. this.comment = val === "true" ? "同意" : "驳回";
  311. },
  312. },
  313. computed: {
  314. isAudit() {
  315. return this.$route.query.type != 'done';
  316. }
  317. }
  318. }
  319. </script>
  320. <style scoped lang="scss">
  321. .app-container {
  322. padding: 2% 0;
  323. }
  324. .main_title{
  325. font-size: 0.4rem;
  326. color: #1D6FE9;
  327. margin: 0.2rem 6%;
  328. position: relative;
  329. }
  330. .main_box{
  331. width: 96%;
  332. margin: 0 auto;
  333. border-radius: 6px;
  334. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  335. overflow: hidden;
  336. background-color: #FFF;
  337. }
  338. .submitButton{
  339. width: 96%;
  340. margin: 0 auto;
  341. }
  342. .addFamily{
  343. position: absolute;
  344. top: -2px;
  345. right: 0;
  346. border-radius: 50%;
  347. }
  348. .deleteFamily{
  349. position: absolute;
  350. top: 0rem;
  351. right: 6%;
  352. z-index: 9;
  353. border-radius: 50%;
  354. }
  355. .examine_box{
  356. background-color: #1D6FE9!important;
  357. padding: 0.18rem!important;
  358. padding-left: 0!important;
  359. border-radius: 0.15rem!important;
  360. margin-top: 0.3rem!important;
  361. }
  362. .examine_box .van-col:first-child{
  363. color: #FFF!important;
  364. font-size: 0.45rem!important;
  365. text-align: center!important;
  366. }
  367. .examine_box .van-col:last-child{
  368. background-color: #FFF!important;
  369. border-radius: 0.15rem!important;
  370. overflow: hidden!important;
  371. .van-radio-group--horizontal{
  372. padding: 0.2rem 0;
  373. border-bottom: 1px solid #eee;
  374. }
  375. }
  376. /deep/.van-radio--horizontal{
  377. margin-left: 20px;
  378. margin-right: 0;
  379. }
  380. </style>