移动端
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

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