移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

434 regels
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. </van-nav-bar>
  13. <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first>
  14. <p class="main_title">基础信息</p>
  15. <div class="main_box">
  16. <van-field
  17. label="事项名称"
  18. v-model="form.eventName"
  19. placeholder="请输入事项名称"
  20. input-align="right"
  21. label-width="auto"
  22. required
  23. :rules="[{ required: true , message:'请输入事项名称' }]"
  24. />
  25. <van-field
  26. readonly
  27. clickable
  28. required
  29. :rules="[{ required: true , message:'请选择事项类型' }]"
  30. label="事项类型"
  31. placeholder="请选择"
  32. v-model="majorType"
  33. @click="showcapital = true"
  34. input-align="right"
  35. right-icon="arrow-down"
  36. label-width="auto"
  37. />
  38. <van-popup v-model="showcapital" position="bottom">
  39. <van-picker
  40. show-toolbar
  41. :columns="majorTypeOptions"
  42. @confirm="onConfirmCapital"
  43. @cancel="showcapital = false"
  44. />
  45. </van-popup>
  46. <van-field
  47. readonly
  48. clickable
  49. required
  50. :rules="[{ required: true , message:'请选择发生日期' }]"
  51. v-model="form.eventTime"
  52. label="发生日期"
  53. placeholder="请选择发生日期"
  54. @click="showlasj = true"
  55. input-align="right"
  56. right-icon="arrow-down"
  57. />
  58. <van-popup v-model="showlasj" position="bottom">
  59. <van-datetime-picker
  60. v-model="currentDate"
  61. type="date"
  62. title="选择年月日"
  63. :min-date="minDate"
  64. :max-date="maxDate"
  65. @confirm="onConfirmLasj"
  66. @cancel="showlasj = false"
  67. />
  68. </van-popup>
  69. <van-field
  70. readonly
  71. clickable
  72. label="审批流程"
  73. placeholder="请选择"
  74. v-model="form.approvalTemplateName"
  75. @click="showtemplate = true"
  76. input-align="right"
  77. right-icon="arrow-down"
  78. required
  79. :rules="[{ required: true , message:'请选择审批流程' }]"
  80. />
  81. <van-popup v-model="showtemplate" position="bottom">
  82. <van-picker
  83. show-toolbar
  84. value-key="name"
  85. :columns="templateList"
  86. @confirm="onConfirmTemplate"
  87. @cancel="showtemplate = false"
  88. />
  89. </van-popup>
  90. <van-field label="*事项内容" input-align="right" label-width="auto" readonly/>
  91. <vue-html5-editor :content="form.eventContent" :height="200" @change="eventContentUpdateData"></vue-html5-editor>
  92. <!-- <van-field v-model="form.eventContent" type="textarea" placeholder="请输入事项内容" rows="4" required :rules="[{ required: true , message:'请输入事项内容' }]"/> -->
  93. <van-field label="*理事会提议/村党支部提议" input-align="right" label-width="auto" readonly />
  94. <vue-html5-editor :content="form.dzbty" :height="200" @change="dzbtyUpdateData"></vue-html5-editor>
  95. <van-field label="*村党支部和理事会商议/两委会商议" input-align="right" label-width="auto" readonly />
  96. <vue-html5-editor :content="form.lwhsy" :height="200" @change="lwhsyUpdateData"></vue-html5-editor>
  97. <van-field label="*党员会审议/党群议事会审议和决议" input-align="right" label-width="auto" readonly />
  98. <vue-html5-editor :content="form.dqyshsyhjy" :height="200" @change="dqyshsyhjyUpdateData"></vue-html5-editor>
  99. <van-field label="*成员(代表)会决议/党群议事会审议和决议" input-align="right" label-width="auto" readonly />
  100. <vue-html5-editor :content="form.cydbhjy" :height="200" @change="cydbhjyUpdateData"></vue-html5-editor>
  101. <van-field label="*决策结果公开" input-align="right" label-width="auto" readonly />
  102. <vue-html5-editor :content="form.jcjggk" :height="200" @change="jcjggkUpdateData"></vue-html5-editor>
  103. <van-field label="*实施情况公开" input-align="right" label-width="auto" readonly />
  104. <vue-html5-editor :content="form.ssqkgk" :height="200" @change="ssqkgkUpdateData"></vue-html5-editor>
  105. <!-- <van-field label="实施情况公开" input-align="right" label-width="auto" readonly />
  106. <van-field v-model="form.ssqkgk" type="textarea" placeholder="请输入实施情况公开" rows="2" required :rules="[{ required: true , message:'请输入实施情况公开' }]" /> -->
  107. <van-field label="备注" input-align="right" label-width="auto"/>
  108. <van-field v-model="form.remark" type="textarea" placeholder="请输入备注" rows="2"/>
  109. </div>
  110. <!-- <p class="main_title">上传附件</p>-->
  111. <!-- <div class="main_box" style="padding: 5px 0 0 8px;">-->
  112. <!-- <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>-->
  113. <!-- </div>-->
  114. <div style="padding: 16px 0;">
  115. <van-row>
  116. <van-col span="6"></van-col>
  117. <van-col span="12" align="center">
  118. <!-- @click="goUpdate"-->
  119. <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
  120. </van-col>
  121. <!-- <van-col span="12" align="center">-->
  122. <!-- &lt;!&ndash; @click="goAdd"&ndash;&gt;-->
  123. <!-- <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button>-->
  124. <!-- </van-col>-->
  125. </van-row>
  126. <div class="clear"></div>
  127. </div>
  128. </van-form>
  129. </div>
  130. </template>
  131. <script>
  132. import { addMajorevent , getMajorevent , attachmentList , updateMajorevent,listTemplate,selectApprovalByTemplateId } from "@/api/onlineHome/bankAgriculture/paymentApproval";
  133. import request from '@/utils/request';
  134. import Dialog from "vant/lib/dialog";
  135. import Editor from '@/components/Editor';
  136. export default {
  137. name: "approvalAdd3",
  138. components: {
  139. Editor,
  140. },
  141. data() {
  142. return {
  143. title:false,
  144. showtemplate:false,
  145. showcapital:false,
  146. showpayee:false,
  147. showlasj:false,
  148. showbankType:false,
  149. showproject:false,
  150. showFundType:false,
  151. showpayer:false,
  152. buttonType:'a',
  153. minDate: new Date(2000, 1, 1),
  154. maxDate: new Date(2050, 12, 31),
  155. currentDate: new Date(),
  156. form:{},
  157. fileList:[],
  158. capitalExpenditureType:'',
  159. payee:'',
  160. bankType:'',
  161. majorType:'',
  162. wfydlxDictionaries:[],
  163. jglxDictionaries:[],
  164. sysDictionaries:[],
  165. capitalExpenditureTypeOptions:[],
  166. bankTypeDictionaries:[],
  167. projectList:[],
  168. projectFundTypeOptions:[],
  169. projectFundTypeDictionaries:[],
  170. majorTypeOptions:[],
  171. templateList:[],
  172. projectListShow:[],
  173. payerOptions:[],
  174. chargeItme:[],
  175. chargeItmeShow:[],
  176. payeeList:[],
  177. // 查询参数
  178. queryParams: {
  179. transferType:"",
  180. orderByColumn: "id",
  181. isAsc: "desc",
  182. },
  183. capitalExpenditureOpen:false,
  184. projectForm:{
  185. projectId:null,
  186. projectName:null,
  187. projectContractor:null,
  188. projectAmount:null,
  189. projectBillNum:null,
  190. projectFundType:'1',
  191. outId:null,
  192. ynType:'2'
  193. },
  194. projectFundType:'',
  195. uploadFiles:[],
  196. };
  197. },
  198. created() {
  199. this.reset();
  200. this.getTemplateList();
  201. this.getForm();
  202. },
  203. methods: {
  204. eventContentUpdateData(e = ''){
  205. let c1 = e.replace(/<img width="100%"/g, '<img');
  206. let c2 = c1.replace(/<img/g, '<img width="100%"');
  207. this.form.eventContent = c2;
  208. },
  209. dzbtyUpdateData(e = ''){
  210. let c1 = e.replace(/<img width="100%"/g, '<img');
  211. let c2 = c1.replace(/<img/g, '<img width="100%"');
  212. this.form.dzbty = c2;
  213. },
  214. lwhsyUpdateData(e = ''){
  215. let c1 = e.replace(/<img width="100%"/g, '<img');
  216. let c2 = c1.replace(/<img/g, '<img width="100%"');
  217. this.form.lwhsy = c2;
  218. },
  219. dqyshsyhjyUpdateData(e = ''){
  220. let c1 = e.replace(/<img width="100%"/g, '<img');
  221. let c2 = c1.replace(/<img/g, '<img width="100%"');
  222. this.form.dqyshsyhjy = c2;
  223. },
  224. cydbhjyUpdateData(e = ''){
  225. let c1 = e.replace(/<img width="100%"/g, '<img');
  226. let c2 = c1.replace(/<img/g, '<img width="100%"');
  227. this.form.cydbhjy = c2;
  228. },
  229. jcjggkUpdateData(e = ''){
  230. let c1 = e.replace(/<img width="100%"/g, '<img');
  231. let c2 = c1.replace(/<img/g, '<img width="100%"');
  232. this.form.jcjggk = c2;
  233. },
  234. ssqkgkUpdateData(e = ''){
  235. let c1 = e.replace(/<img width="100%"/g, '<img');
  236. let c2 = c1.replace(/<img/g, '<img width="100%"');
  237. this.form.ssqkgk = c2;
  238. },
  239. // 表单重置
  240. reset() {
  241. this.form = {
  242. id: null,
  243. upId: null,
  244. downId: null,
  245. orderId: null,
  246. cashierId: null,
  247. transferType: '3',
  248. accountType: '2',
  249. explainSituation: null,
  250. succeedAmount: null,
  251. payer: null,
  252. payerAccount: null,
  253. operatorCode: null,
  254. enterpriseCode: null,
  255. expenditureAmount: null,
  256. capitalExpenditureType: '1',
  257. majorType: null,
  258. dzbty: null,
  259. lwhsy: null,
  260. dqyshsyhjy: null,
  261. cydbhjy: null,
  262. jcjggk: null,
  263. ssqkgk: null,
  264. remark: null,
  265. transferStatus: "0",
  266. auditStatus: "0",
  267. paymentState: "1",
  268. bankPriority: "0",
  269. clientPriority: "0",
  270. approvalTemplateId: null
  271. };
  272. this.processList = {}
  273. this.projectForm={
  274. projectId:null,
  275. projectName:null,
  276. projectContractor:null,
  277. projectAmount:null,
  278. projectBillNum:null,
  279. projectFundType:'1',
  280. outId:null,
  281. ynType:'1'
  282. }
  283. },
  284. getForm(){
  285. getMajorevent(this.$route.query.id).then(response => {
  286. this.form = response.data;
  287. this.getDicts("major_type").then((res) => {
  288. this.majorType = this.selectDictLabel(res.data, response.data.majorType);
  289. for (var i = 0; i < res.data.length; i++) {
  290. this.majorTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  291. }
  292. });
  293. this.templateList.map(ra => {
  294. if (ra.id == response.data.approvalTemplateId) {
  295. this.form.approvalTemplateName = ra.name
  296. }
  297. })
  298. });
  299. },
  300. goFlow(){
  301. if(this.form.approvalMode == '1' && this.form.approvalTemplateId != undefined && this.form.approvalTemplateId != "undefined"){
  302. window.location='approvalProcess3?approvalTemplateId='+this.form.approvalTemplateId+'&approvalMode='+this.form.approvalMode;
  303. }else{
  304. this.$notify({ type: 'danger', message: '无审批流程!' });
  305. }
  306. },
  307. getChange(){
  308. updateMajorevent(this.form).then(response => {
  309. this.$toast.success('修改成功');
  310. setTimeout(function(){
  311. history.go(-1)
  312. },2000)
  313. });
  314. },
  315. getTemplateList(){
  316. let templateQueryParams = {
  317. // 分页
  318. pageNum: 1,
  319. pageSize: 999,
  320. type:'5'
  321. };
  322. listTemplate(templateQueryParams).then(response => {
  323. this.templateList = response.rows;
  324. });
  325. },
  326. onConfirmTemplate(data){
  327. selectApprovalByTemplateId(data.id).then(res => {
  328. this.showtemplate = false;
  329. if(res.approvalDetails.length>0){
  330. this.form.approvalTemplateName = data.name
  331. this.form.approvalTemplateId = data.id
  332. }else{
  333. this.form.approvalTemplateName = null
  334. this.form.approvalTemplateId = null
  335. this.$notify({ type: 'danger', message: '此流程无节点,无法选择!' });
  336. }
  337. })
  338. },
  339. onConfirmCapital(data){
  340. this.majorType = data.text;
  341. this.form.majorType = data.value;
  342. this.showcapital = false;
  343. },
  344. getError(e){
  345. console.log(e)
  346. this.$notify({ type: 'danger', message: e.errors[0].message });
  347. },
  348. onConfirmLasj(data){
  349. this.form.eventTime = this.getNowFormatDate(data).substr(0,10);
  350. this.showlasj = false;
  351. },
  352. beforeRead(file) {
  353. this.uploadFiles.push(file.file);
  354. },
  355. deleteFile(file){
  356. this.uploadFiles.map((response,index) => {
  357. if(file.file == response){
  358. this.uploadFiles.splice(index,1)
  359. }
  360. })
  361. },
  362. getFileList(){
  363. let oData= {
  364. tableId: this.$route.query.id,
  365. tableName: "t_yinnong_majorevent",
  366. bizPath: "yinnong",
  367. fileType: "",
  368. }
  369. attachmentList(oData).then(res => {
  370. console.log(res)
  371. console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
  372. res.rows.map(r => {
  373. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  374. this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  375. console.log(r)
  376. })
  377. })
  378. },
  379. goBack(){
  380. window.history.go(-1)
  381. },
  382. //删除家庭成员
  383. deleteChargeItme(index){
  384. this.chargeItme.splice(index,1)
  385. },
  386. },
  387. }
  388. </script>
  389. <style scoped lang="scss">
  390. .app-container {
  391. padding: 2% 0;
  392. }
  393. .main_title{
  394. font-size: 0.4rem;
  395. color: #1D6FE9;
  396. margin: 0.2rem 6%;
  397. position: relative;
  398. }
  399. .main_box{
  400. width: 96%;
  401. margin: 0 auto;
  402. border-radius: 6px;
  403. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  404. overflow: hidden;
  405. background-color: #FFF;
  406. }
  407. .submitButton{
  408. width: 80%;
  409. margin: 0 auto;
  410. background-color: #1D6FE9;
  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. </style>