移动端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

456 řádky
14 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 readonly label="事项类型" :value="majorTypeFormat(form.majorType)"
  29. input-align="right" label-width="auto"/>
  30. <van-field
  31. readonly
  32. clickable
  33. required
  34. :rules="[{ required: true , message:'请选择发生日期' }]"
  35. v-model="form.eventTime"
  36. label="发生日期"
  37. placeholder="请选择发生日期"
  38. @click="showlasj = true"
  39. input-align="right"
  40. right-icon="arrow-down"
  41. />
  42. <van-popup v-model="showlasj" position="bottom">
  43. <van-datetime-picker
  44. v-model="currentDate"
  45. type="date"
  46. title="选择年月日"
  47. :min-date="minDate"
  48. :max-date="maxDate"
  49. @confirm="onConfirmLasj"
  50. @cancel="showlasj = false"
  51. />
  52. </van-popup>
  53. <van-field readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)"
  54. input-align="right" label-width="auto"/>
  55. <van-field label="*事项内容" input-align="right" label-width="auto" readonly/>
  56. <div id="eventContentOpenContent" style="padding-left: 10px;padding-right: 10px;"></div>
  57. <van-field label="*理事会提议/村党支部提议" input-align="right" label-width="auto" readonly />
  58. <div id="dzbtyOpenContent" style="padding-left: 10px;padding-right: 10px;"></div>
  59. <van-field label="*村党支部和理事会商议/两委会商议" input-align="right" label-width="auto" readonly />
  60. <div id="lwhsyOpenContent" style="padding-left: 10px;padding-right: 10px;"></div>
  61. <van-field label="*党员会审议/党群议事会审议和决议" input-align="right" label-width="auto" readonly />
  62. <div id="dqyshsyhjyOpenContent" style="padding-left: 10px;padding-right: 10px;"></div>
  63. <van-field label="*成员(代表)会决议/党群议事会审议和决议" input-align="right" label-width="auto" readonly />
  64. <div id="cydbhjyOpenContent" style="padding-left: 10px;padding-right: 10px;"></div>
  65. <van-field label="*决策结果公开" input-align="right" label-width="auto" readonly />
  66. <div id="jcjggkOpenContent" style="padding-left: 10px;padding-right: 10px;"></div>
  67. <van-field label="*实施情况公开" input-align="right" label-width="auto" readonly />
  68. <div id="ssqkgkOpenContent" style="padding-left: 10px;padding-right: 10px;"></div>
  69. <van-field label="备注" input-align="right" label-width="auto"/>
  70. <van-field v-model="form.remark" type="textarea" placeholder="请输入备注" rows="2"/>
  71. </div>
  72. <p style="margin-top:20px;padding: 0 10px">附件{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p>
  73. <van-cell v-for="(item,index) in fileList" :key="index">
  74. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  75. </van-cell>
  76. </van-form>
  77. <div class="main_box examine_box">
  78. <van-row type="flex" justify="space-between" align="center">
  79. <van-col span="5">审批<br/>意见</van-col>
  80. <van-col span="19">
  81. <van-radio-group v-model="pass" direction="horizontal" :disabled="!isAudit">
  82. <van-radio name="true">同意</van-radio>
  83. <van-radio name="false">驳回</van-radio>
  84. </van-radio-group>
  85. <van-field :readonly="!isAudit" rows="2" autosize v-model="comment" type="textarea" placeholder="请输入审批意见"/>
  86. </van-col>
  87. </van-row>
  88. </div>
  89. <div style="margin: 16px 2%;" v-if="isAudit">
  90. <van-row>
  91. <van-col span="24" align="center">
  92. <van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button>
  93. </van-col>
  94. </van-row>
  95. <div class="clear"></div>
  96. </div>
  97. </div>
  98. </template>
  99. <script>
  100. import { addMajorevent , getMajorevent , attachmentList , updateMajorevent,approval,listTemplate,selectApprovalByTemplateId } from "@/api/onlineHome/bankAgriculture/paymentApproval";
  101. import request from '@/utils/request';
  102. import Dialog from "vant/lib/dialog";
  103. import Editor from '@/components/Editor';
  104. import {A_auditHistoryDetail} from "@/api/audit/aauditpipeline";
  105. export default {
  106. name: "approvalApproval13",
  107. components: {
  108. Editor,
  109. },
  110. data() {
  111. return {
  112. showtemplate:false,
  113. majorType:'',
  114. majorTypeOptions:[],
  115. templateList:[],
  116. title:false,
  117. showcapital:false,
  118. showpayee:false,
  119. showlasj:false,
  120. showbankType:false,
  121. showproject:false,
  122. showFundType:false,
  123. showpayer:false,
  124. buttonType:'a',
  125. minDate: new Date(2000, 1, 1),
  126. maxDate: new Date(2050, 12, 31),
  127. currentDate: new Date(),
  128. form:{},
  129. fileList:[],
  130. capitalExpenditureType:'',
  131. payee:'',
  132. bankType:'',
  133. wfydlxDictionaries:[],
  134. jglxDictionaries:[],
  135. sysDictionaries:[],
  136. capitalExpenditureTypeOptions:[],
  137. bankTypeDictionaries:[],
  138. projectList:[],
  139. projectFundTypeOptions:[],
  140. projectFundTypeDictionaries:[],
  141. projectListShow:[],
  142. payerOptions:[],
  143. chargeItme:[],
  144. chargeItmeShow:[],
  145. payeeList:[],
  146. // 查询参数
  147. queryParams: {
  148. transferType:"",
  149. orderByColumn: "id",
  150. isAsc: "desc",
  151. },
  152. capitalExpenditureOpen:false,
  153. projectForm:{
  154. projectId:null,
  155. projectName:null,
  156. projectContractor:null,
  157. projectAmount:null,
  158. projectBillNum:null,
  159. projectFundType:'1',
  160. outId:null,
  161. ynType:'2'
  162. },
  163. projectFundType:'',
  164. uploadFiles:[],
  165. // 审核意见默认值
  166. pass: "true",
  167. comment: "同意",
  168. templateList:[],
  169. };
  170. },
  171. created() {
  172. this.reset();
  173. this.getForm();
  174. this.getFileList();
  175. this.getDictionaries();
  176. this.getTemplateList();
  177. },
  178. methods: {
  179. // 表单重置
  180. reset() {
  181. this.form = {
  182. majorType: null,
  183. dzbty: null,
  184. lwhsy: null,
  185. dqyshsyhjy: null,
  186. cydbhjy: null,
  187. jcjggk: null,
  188. ssqkgk: null,
  189. approvalTemplateId: null,
  190. id: null,
  191. upId: null,
  192. downId: null,
  193. orderId: null,
  194. cashierId: null,
  195. transferType: '3',
  196. accountType: '2',
  197. explainSituation: null,
  198. succeedAmount: null,
  199. payer: null,
  200. payerAccount: null,
  201. operatorCode: null,
  202. enterpriseCode: null,
  203. expenditureAmount: null,
  204. capitalExpenditureType: '1',
  205. remark: null,
  206. transferStatus: "0",
  207. auditStatus: "0",
  208. paymentState: "1",
  209. bankPriority: "0",
  210. clientPriority: "0"
  211. };
  212. this.processList = {}
  213. this.projectForm={
  214. projectId:null,
  215. projectName:null,
  216. projectContractor:null,
  217. projectAmount:null,
  218. projectBillNum:null,
  219. projectFundType:'1',
  220. outId:null,
  221. ynType:'1'
  222. }
  223. },
  224. getForm(){
  225. getMajorevent(this.$route.query.id).then(response => {
  226. this.form = response.data;
  227. document.getElementById('eventContentOpenContent').innerHTML = response.data.eventContent;
  228. document.getElementById('dzbtyOpenContent').innerHTML = response.data.dzbty;
  229. document.getElementById('lwhsyOpenContent').innerHTML = response.data.lwhsy;
  230. document.getElementById('dqyshsyhjyOpenContent').innerHTML = response.data.dqyshsyhjy;
  231. document.getElementById('cydbhjyOpenContent').innerHTML = response.data.cydbhjy;
  232. document.getElementById('jcjggkOpenContent').innerHTML = response.data.jcjggk;
  233. document.getElementById('ssqkgkOpenContent').innerHTML = response.data.ssqkgk;
  234. if(!this.isAudit)
  235. {
  236. A_auditHistoryDetail(this.$route.query.taskId).then((resp) => {
  237. this.pass = resp.data.auditStatus === '3' ? "true" : 'false';
  238. this.comment = resp.data.auditRemark;
  239. });
  240. }
  241. });
  242. },
  243. goFlow(){
  244. window.location='approvalProcess13?id='+this.$route.query.approvalTemplateId;
  245. },
  246. getChange(){
  247. updateMajorevent(this.form).then(response => {
  248. this.$toast.success('修改成功');
  249. setTimeout(function(){
  250. history.go(-1)
  251. },2000)
  252. });
  253. },
  254. getDictionaries(){
  255. this.getDicts("major_type").then((res) => {
  256. for (var i = 0; i < res.data.length; i++) {
  257. this.majorTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  258. }
  259. });
  260. },
  261. getTemplateList(){
  262. let templateQueryParams = {
  263. // 分页
  264. pageNum: 1,
  265. pageSize: 999,
  266. type:'5'
  267. };
  268. listTemplate(templateQueryParams).then(response => {
  269. this.templateList = response.rows;
  270. });
  271. },
  272. tempalteFormat(id) {
  273. let name = ""
  274. this.templateList.map(res => {
  275. if (res.id == id) {
  276. console.log(res.name)
  277. name = res.name
  278. }
  279. })
  280. return name
  281. },
  282. majorTypeFormat(id) {
  283. let name = ""
  284. this.majorTypeOptions.map(res => {
  285. if (res.value == id) {
  286. console.log("majorTypeFormat"+res.text)
  287. name = res.text
  288. }
  289. })
  290. return name
  291. },
  292. onConfirmTemplate(data){
  293. selectApprovalByTemplateId(data.id).then(res => {
  294. this.showtemplate = false;
  295. if(res.approvalDetails.length>0){
  296. this.form.approvalTemplateName = data.name
  297. this.form.approvalTemplateId = data.id
  298. }else{
  299. this.form.approvalTemplateName = null
  300. this.form.approvalTemplateId = null
  301. this.$notify({ type: 'danger', message: '此流程无节点,无法选择!' });
  302. }
  303. })
  304. },
  305. onConfirmCapital(data){
  306. this.majorType = data.text;
  307. this.form.majorType = data.value;
  308. this.showcapital = false;
  309. },
  310. getError(e){
  311. console.log(e)
  312. this.$notify({ type: 'danger', message: e.errors[0].message });
  313. },
  314. onConfirmLasj(data){
  315. this.form.eventTime = this.getNowFormatDate(data).substr(0,10);
  316. this.showlasj = false;
  317. },
  318. beforeRead(file) {
  319. this.uploadFiles.push(file.file);
  320. },
  321. deleteFile(file){
  322. this.uploadFiles.map((response,index) => {
  323. if(file.file == response){
  324. this.uploadFiles.splice(index,1)
  325. }
  326. })
  327. },
  328. getFileList(){
  329. let oData= {
  330. tableId: this.$route.query.id,
  331. tableName: 't_yinnong_majorevent',
  332. bizPath: "yinnong",
  333. fileType: "",
  334. }
  335. attachmentList(oData).then(res => {
  336. res.rows.map(r => {
  337. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  338. // this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  339. this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  340. console.log(r)
  341. })
  342. })
  343. },
  344. goBack(){
  345. window.history.go(-1)
  346. },
  347. //删除家庭成员
  348. deleteChargeItme(index){
  349. this.chargeItme.splice(index,1)
  350. },
  351. /** 提交按钮 */
  352. submitForm() {
  353. const data = {
  354. taskId: this.$route.query.taskId,
  355. auditbatchNo: this.$route.query.auditbatchNo,
  356. remark: this.comment,
  357. pass: this.pass === "true",
  358. deptId: this.form.deptId
  359. };
  360. approval(data).then((response) => {
  361. if(response.code==200){
  362. this.$toast.success("操作成功");
  363. setTimeout(function(){
  364. history.go(-1)
  365. },2000)
  366. } else{
  367. this.$toast.success("操作失败");
  368. }
  369. });
  370. },
  371. },
  372. watch: {
  373. pass: function (val) {
  374. if(this.isAudit)
  375. this.comment = val === "true" ? "同意" : "驳回";
  376. },
  377. },
  378. computed: {
  379. isAudit() {
  380. return this.$route.query.type != 'done';
  381. }
  382. }
  383. }
  384. </script>
  385. <style scoped lang="scss">
  386. .app-container {
  387. padding: 2% 0;
  388. }
  389. .main_title{
  390. font-size: 0.4rem;
  391. color: #1D6FE9;
  392. margin: 0.2rem 6%;
  393. position: relative;
  394. }
  395. .main_box{
  396. width: 96%;
  397. margin: 0 auto;
  398. border-radius: 6px;
  399. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  400. overflow: hidden;
  401. background-color: #FFF;
  402. }
  403. .submitButton{
  404. width: 96%;
  405. margin: 0 auto;
  406. }
  407. .addFamily{
  408. position: absolute;
  409. top: -2px;
  410. right: 0;
  411. border-radius: 50%;
  412. }
  413. .deleteFamily{
  414. position: absolute;
  415. top: 0rem;
  416. right: 6%;
  417. z-index: 9;
  418. border-radius: 50%;
  419. }
  420. .examine_box{
  421. background-color: #1D6FE9!important;
  422. padding: 0.18rem!important;
  423. padding-left: 0!important;
  424. border-radius: 0.15rem!important;
  425. margin-top: 0.3rem!important;
  426. }
  427. .examine_box .van-col:first-child{
  428. color: #FFF!important;
  429. font-size: 0.45rem!important;
  430. text-align: center!important;
  431. }
  432. .examine_box .van-col:last-child{
  433. background-color: #FFF!important;
  434. border-radius: 0.15rem!important;
  435. overflow: hidden!important;
  436. .van-radio-group--horizontal{
  437. padding: 0.2rem 0;
  438. border-bottom: 1px solid #eee;
  439. }
  440. }
  441. /deep/.van-radio--horizontal{
  442. margin-left: 20px;
  443. margin-right: 0;
  444. }
  445. </style>