移动端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

315 行
8.8 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. v-model="form.eventTime"
  31. label="发生日期"
  32. placeholder="请选择发生日期"
  33. @click="showlasj = true"
  34. input-align="right"
  35. right-icon="arrow-down"
  36. />
  37. <van-popup v-model="showlasj" position="bottom">
  38. <van-datetime-picker
  39. v-model="currentDate"
  40. type="date"
  41. title="选择年月日"
  42. :min-date="minDate"
  43. :max-date="maxDate"
  44. @confirm="onConfirmLasj"
  45. @cancel="showlasj = false"
  46. />
  47. </van-popup>
  48. </div>
  49. <div class="main_box" style="margin-top: 10px;">
  50. <van-field
  51. label="事项内容"
  52. input-align="right"
  53. label-width="auto"
  54. readonly
  55. />
  56. <van-field
  57. v-model="form.eventContent"
  58. type="textarea"
  59. placeholder="请输入事项内容"
  60. rows="8"
  61. required
  62. :rules="[{ required: true , message:'请输入事项内容' }]"
  63. />
  64. <!-- <editor v-model="form.eventContent" :min-height="192"/>-->
  65. <!-- <quill-editors @ChangeText="(text)=>{form.eventContent=text}" :title="title" />-->
  66. </div>
  67. <div class="main_box" style="margin-top: 10px;">
  68. <van-field
  69. label="备注"
  70. v-model="form.remark"
  71. type="textarea"
  72. placeholder="请输入备注"
  73. input-align="right"
  74. rows="3"
  75. label-width="auto"
  76. />
  77. </div>
  78. <!-- <p class="main_title">上传附件</p>-->
  79. <!-- <div class="main_box" style="padding: 5px 0 0 8px;">-->
  80. <!-- <van-uploader v-model="fileList" :after-read="beforeRead" @delete="deleteFile"></van-uploader>-->
  81. <!-- </div>-->
  82. <div style="padding: 16px 0;">
  83. <van-row>
  84. <van-col span="6"></van-col>
  85. <van-col span="12" align="center">
  86. <!-- @click="goUpdate"-->
  87. <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
  88. </van-col>
  89. <!-- <van-col span="12" align="center">-->
  90. <!-- &lt;!&ndash; @click="goAdd"&ndash;&gt;-->
  91. <!-- <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button>-->
  92. <!-- </van-col>-->
  93. </van-row>
  94. <div class="clear"></div>
  95. </div>
  96. </van-form>
  97. </div>
  98. </template>
  99. <script>
  100. import { addMajorevent , getMajorevent , attachmentList , updateMajorevent } 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. export default {
  105. name: "approvalAdd3",
  106. components: {
  107. Editor,
  108. },
  109. data() {
  110. return {
  111. title:false,
  112. showcapital:false,
  113. showpayee:false,
  114. showlasj:false,
  115. showbankType:false,
  116. showproject:false,
  117. showFundType:false,
  118. showpayer:false,
  119. buttonType:'a',
  120. minDate: new Date(2000, 1, 1),
  121. maxDate: new Date(2050, 12, 31),
  122. currentDate: new Date(),
  123. form:{},
  124. fileList:[],
  125. capitalExpenditureType:'',
  126. payee:'',
  127. bankType:'',
  128. wfydlxDictionaries:[],
  129. jglxDictionaries:[],
  130. sysDictionaries:[],
  131. capitalExpenditureTypeOptions:[],
  132. bankTypeDictionaries:[],
  133. projectList:[],
  134. projectFundTypeOptions:[],
  135. projectFundTypeDictionaries:[],
  136. projectListShow:[],
  137. payerOptions:[],
  138. chargeItme:[],
  139. chargeItmeShow:[],
  140. payeeList:[],
  141. // 查询参数
  142. queryParams: {
  143. transferType:"",
  144. orderByColumn: "id",
  145. isAsc: "desc",
  146. },
  147. capitalExpenditureOpen:false,
  148. projectForm:{
  149. projectId:null,
  150. projectName:null,
  151. projectContractor:null,
  152. projectAmount:null,
  153. projectBillNum:null,
  154. projectFundType:'1',
  155. outId:null,
  156. ynType:'2'
  157. },
  158. projectFundType:'',
  159. uploadFiles:[],
  160. };
  161. },
  162. created() {
  163. this.reset();
  164. this.getForm();
  165. },
  166. methods: {
  167. // 表单重置
  168. reset() {
  169. this.form = {
  170. id: null,
  171. upId: null,
  172. downId: null,
  173. orderId: null,
  174. cashierId: null,
  175. transferType: '3',
  176. accountType: '2',
  177. explainSituation: null,
  178. succeedAmount: null,
  179. payer: null,
  180. payerAccount: null,
  181. operatorCode: null,
  182. enterpriseCode: null,
  183. expenditureAmount: null,
  184. capitalExpenditureType: '1',
  185. remark: null,
  186. transferStatus: "0",
  187. auditStatus: "0",
  188. paymentState: "1",
  189. bankPriority: "0",
  190. clientPriority: "0"
  191. };
  192. this.processList = {}
  193. this.projectForm={
  194. projectId:null,
  195. projectName:null,
  196. projectContractor:null,
  197. projectAmount:null,
  198. projectBillNum:null,
  199. projectFundType:'1',
  200. outId:null,
  201. ynType:'1'
  202. }
  203. },
  204. getForm(){
  205. getMajorevent(this.$route.query.id).then(response => {
  206. this.form = response.data;
  207. });
  208. },
  209. goFlow(){
  210. if(this.form.approvalMode == '1' && this.form.approvalTemplateId != undefined && this.form.approvalTemplateId != "undefined"){
  211. window.location='approvalProcess3?approvalTemplateId='+this.form.approvalTemplateId+'&approvalMode='+this.form.approvalMode;
  212. }else{
  213. this.$notify({ type: 'danger', message: '无审批流程!' });
  214. }
  215. },
  216. getChange(){
  217. updateMajorevent(this.form).then(response => {
  218. this.$toast.success('修改成功');
  219. setTimeout(function(){
  220. history.go(-1)
  221. },2000)
  222. });
  223. },
  224. getError(e){
  225. console.log(e)
  226. this.$notify({ type: 'danger', message: e.errors[0].message });
  227. },
  228. onConfirmLasj(data){
  229. this.form.eventTime = this.getNowFormatDate(data).substr(0,10);
  230. this.showlasj = false;
  231. },
  232. beforeRead(file) {
  233. this.uploadFiles.push(file.file);
  234. },
  235. deleteFile(file){
  236. this.uploadFiles.map((response,index) => {
  237. if(file.file == response){
  238. this.uploadFiles.splice(index,1)
  239. }
  240. })
  241. },
  242. getFileList(){
  243. let oData= {
  244. tableId: this.$route.query.id,
  245. tableName: "t_yinnong_majorevent",
  246. bizPath: "yinnong",
  247. fileType: "",
  248. }
  249. attachmentList(oData).then(res => {
  250. console.log(res)
  251. console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
  252. res.rows.map(r => {
  253. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  254. this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})})
  255. console.log(r)
  256. })
  257. })
  258. },
  259. goBack(){
  260. window.history.go(-1)
  261. },
  262. //删除家庭成员
  263. deleteChargeItme(index){
  264. this.chargeItme.splice(index,1)
  265. },
  266. },
  267. }
  268. </script>
  269. <style scoped lang="scss">
  270. .app-container {
  271. padding: 2% 0;
  272. }
  273. .main_title{
  274. font-size: 0.4rem;
  275. color: #1D6FE9;
  276. margin: 0.2rem 6%;
  277. position: relative;
  278. }
  279. .main_box{
  280. width: 96%;
  281. margin: 0 auto;
  282. border-radius: 6px;
  283. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  284. overflow: hidden;
  285. background-color: #FFF;
  286. }
  287. .submitButton{
  288. width: 80%;
  289. margin: 0 auto;
  290. background-color: #1D6FE9;
  291. }
  292. .addFamily{
  293. position: absolute;
  294. top: -2px;
  295. right: 0;
  296. border-radius: 50%;
  297. }
  298. .deleteFamily{
  299. position: absolute;
  300. top: 0rem;
  301. right: 6%;
  302. z-index: 9;
  303. border-radius: 50%;
  304. }
  305. </style>