移动端
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.
 
 

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