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

380 行
14 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header_main">
  4. 产业信息新增
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. </div>
  7. <van-form @submit="onSubmit">
  8. <div class="list_main">
  9. <div class="titBox">
  10. <img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/>
  11. <p class="tit">基本信息</p>
  12. </div>
  13. <van-field required :rules="[{ required: true }]" v-model="form.industryCode" label="产业编码" placeholder="产业编码" input-align="right" :border="false" :maxlength="20"/>
  14. <van-field required :rules="[{ required: true }]" v-model="form.industryName" label="产业名称" placeholder="产业名称" input-align="right" :border="false" :maxlength="100"/>
  15. <van-field
  16. readonly
  17. clickable
  18. label="产业权属"
  19. placeholder="请选择"
  20. v-model="industryRights"
  21. @click="showIndustryRights = true"
  22. input-align="right"
  23. right-icon="arrow-down"
  24. label-width="auto"
  25. required
  26. :border="false"
  27. :rules="[{ required: true }]"
  28. />
  29. <van-popup v-model="showIndustryRights" position="bottom">
  30. <van-picker
  31. show-toolbar
  32. :columns="industryRightsOptions"
  33. @confirm="onConfirmIndustryRights"
  34. @cancel="showIndustryRights = false"
  35. />
  36. </van-popup>
  37. <van-field v-model="form.industryRightsOther" label="其他权属" placeholder="其他权属" input-align="right" :border="false" :maxlength="100"/>
  38. <van-field
  39. readonly
  40. clickable
  41. label="产业类型"
  42. placeholder="请选择"
  43. v-model="industryType"
  44. @click="showIndustryType = true"
  45. input-align="right"
  46. right-icon="arrow-down"
  47. label-width="auto"
  48. required
  49. :border="false"
  50. :rules="[{ required: true }]"
  51. />
  52. <van-popup v-model="showIndustryType" position="bottom">
  53. <van-picker
  54. show-toolbar
  55. :columns="industryTypeOptions"
  56. @confirm="onConfirmIndustryType"
  57. @cancel="showIndustryType = false"
  58. />
  59. </van-popup>
  60. <van-field v-model="form.industryTypeOther" label="其他产业" placeholder="其他产业" input-align="right" :border="false" :maxlength="100"/>
  61. <van-field v-model="form.productName" label="主要产品" placeholder="主要产品" required :rules="[{ required: true }]" input-align="right" :border="false" :maxlength="100"/>
  62. <van-field
  63. readonly
  64. clickable
  65. label="占用土地"
  66. placeholder="请选择"
  67. v-model="occupyLand"
  68. @click="showOccupyLand = true"
  69. input-align="right"
  70. right-icon="arrow-down"
  71. label-width="auto"
  72. :border="false"
  73. required
  74. :rules="[{ required: true }]"
  75. />
  76. <van-popup v-model="showOccupyLand" position="bottom">
  77. <van-picker
  78. show-toolbar
  79. :columns="sysYesNoOptions"
  80. @confirm="onConfirmOccupyLand"
  81. @cancel="showOccupyLand = false"
  82. />
  83. </van-popup>
  84. <van-field v-model="form.occupyLandArea" label="占地面积(亩)" placeholder="占地面积(亩)" type="number" input-align="right" :border="false" :maxlength="15"/>
  85. <van-field
  86. readonly
  87. clickable
  88. label="占用类型"
  89. placeholder="请选择"
  90. v-model="occupyLandType"
  91. @click="showOccupyLandType = true"
  92. input-align="right"
  93. right-icon="arrow-down"
  94. label-width="auto"
  95. :border="false"
  96. />
  97. <van-popup v-model="showOccupyLandType" position="bottom">
  98. <van-picker
  99. show-toolbar
  100. :columns="occupyLandTypeOptions"
  101. @confirm="onConfirmOccupyLandType"
  102. @cancel="showOccupyLandType = false"
  103. />
  104. </van-popup>
  105. <van-field v-model="form.occupyLandTypeOther" label="其他占用" placeholder="其他占用" input-align="right" :border="false" :maxlength="100"/>
  106. <van-field
  107. readonly
  108. clickable
  109. label="土地来源"
  110. placeholder="请选择"
  111. v-model="landSource"
  112. @click="showLandSource = true"
  113. input-align="right"
  114. right-icon="arrow-down"
  115. label-width="auto"
  116. :border="false"
  117. />
  118. <van-popup v-model="showLandSource" position="bottom">
  119. <van-picker
  120. show-toolbar
  121. :columns="landSourceOptions"
  122. @confirm="onConfirmLandSource"
  123. @cancel="showLandSource = false"
  124. />
  125. </van-popup>
  126. <van-field v-model="form.landSourceOther" label="其他来源" placeholder="其他来源" input-align="right" :border="false" :maxlength="100"/>
  127. <van-field v-model="form.investmentAmount" label="产业投资金额(万)" placeholder="产业投资金额(万)" required :rules="[{ required: true }]" type="number" input-align="right" :border="false" :maxlength="15" label-width="120px"/>
  128. <van-field v-model="form.industryValuation" label="产业估值(万)" placeholder="产业估值(万)" required :rules="[{ required: true }]" type="number" input-align="right" :border="false" :maxlength="15"/>
  129. <van-field v-model="form.yearSaleAmount" label="年销售额(万)" placeholder="年销售额(万)" type="number" input-align="right" :border="false" :maxlength="15"/>
  130. <van-field v-model="form.yearProfitAmount" label="年利润(万)" placeholder="年利润(万)" type="number" input-align="right" :border="false" :maxlength="15"/>
  131. <van-field
  132. readonly
  133. clickable
  134. label="有贷款需求"
  135. placeholder="请选择"
  136. v-model="isLoan"
  137. @click="showIsLoan = true"
  138. input-align="right"
  139. right-icon="arrow-down"
  140. label-width="auto"
  141. :border="false"
  142. />
  143. <van-popup v-model="showIsLoan" position="bottom">
  144. <van-picker
  145. show-toolbar
  146. :columns="sysYesNoOptions"
  147. @confirm="onConfirmIsLoan"
  148. @cancel="showIsLoan = false"
  149. />
  150. </van-popup>
  151. <van-field v-model="form.loanAmount" label="计划贷款金额(万)" placeholder="计划贷款金额(万)" type="number" input-align="right" :border="false" :maxlength="15" label-width="120px"/>
  152. <van-field v-model="form.industryBz" label="备注" placeholder="备注" input-align="right" :border="false" :maxlength="500"/>
  153. </div>
  154. <div style="margin: 16px auto;width: 50%;">
  155. <van-button round block type="primary" native-type="submit">
  156. 保存
  157. </van-button>
  158. </div>
  159. </van-form>
  160. </div>
  161. </template>
  162. <script>
  163. import {addIndustry} from "@/api/sunVillage_info/industry";
  164. export default {
  165. name: "certificateList",
  166. data() {
  167. return {
  168. // 资产分类字典
  169. industryRightsOptions: [],
  170. industryTypeOptions: [],
  171. showIndustryRights:false,
  172. industryRights:'村集体产业',
  173. showIndustryType:false,
  174. industryType:'种植业',
  175. form:{
  176. id: null,
  177. bookId: null,
  178. deptId: null,
  179. industryCode: null,
  180. industryName: null,
  181. industryRights: "1",
  182. industryRightsOther: null,
  183. industryType: "1",
  184. industryTypeOther: null,
  185. productName: null,
  186. occupyLand: "Y",
  187. occupyLandArea: null,
  188. occupyLandType: "1",
  189. occupyLandTypeOther: null,
  190. landSource: "1",
  191. landSourceOther: null,
  192. investmentAmount: null,
  193. industryValuation: null,
  194. yearSaleAmount: null,
  195. yearProfitAmount: null,
  196. isLoan: "Y",
  197. loanAmount: null,
  198. industryBz: null,
  199. theGeom: null,
  200. createBy: null,
  201. createTime: null,
  202. updateBy: null,
  203. updateTime: null
  204. },
  205. showOccupyLand:false,
  206. occupyLand:'是',
  207. sysYesNoOptions:[],
  208. showOccupyLandType:false,
  209. occupyLandTypeOptions:[],
  210. occupyLandType:'耕地',
  211. showLandSource:false,
  212. landSourceOptions:[],
  213. landSource:'集体',
  214. landSourceTypeOptions:[],
  215. showIsLoan:false,
  216. isLoan:'是',
  217. loading: false,
  218. finished: false,
  219. listLength:'0',
  220. searchInput:'',
  221. queryParams:{
  222. pageNum:1,
  223. pageSize:10,
  224. orderByColumn:'createTime',
  225. isAsc:'desc',
  226. industryName:'',
  227. },
  228. buildTime:new Date()
  229. };
  230. },
  231. created() {
  232. this.houseGetDicts("sys_yes_no").then((response) => {
  233. for(var i = 0 ; i < response.data.length ; i++){
  234. this.sysYesNoOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  235. }
  236. });
  237. this.houseGetDicts("industry_rights_type").then((response) => {
  238. for(var i = 0 ; i < response.data.length ; i++){
  239. this.industryRightsOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  240. }
  241. });
  242. this.houseGetDicts("occupy_land_type").then((response) => {
  243. for(var i = 0 ; i < response.data.length ; i++){
  244. this.occupyLandTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  245. }
  246. });
  247. this.houseGetDicts("land_source").then((response) => {
  248. for(var i = 0 ; i < response.data.length ; i++){
  249. this.landSourceOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  250. }
  251. });
  252. this.houseGetDicts("purpose_type").then((response) => {
  253. for(var i = 0 ; i < response.data.length ; i++){
  254. this.industryTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
  255. }
  256. });
  257. },
  258. methods: {
  259. onConfirmIndustryRights(data){
  260. this.industryRights = data.text;
  261. this.form.industryRights = data.value;
  262. this.showIndustryRights = false;
  263. },
  264. onConfirmIndustryType(data){
  265. this.industryType = data.text;
  266. this.form.industryType = data.value;
  267. this.showIndustryType = false;
  268. },
  269. onConfirmOccupyLandType(data){
  270. this.occupyLandType = data.text;
  271. this.form.occupyLandType = data.value;
  272. this.showOccupyLandType = false;
  273. },
  274. onConfirmOccupyLand(data){
  275. this.occupyLand = data.text;
  276. this.form.occupyLand = data.value;
  277. this.showOccupyLand = false;
  278. },
  279. onConfirmLandSource(data){
  280. this.landSource = data.text;
  281. this.form.landSource = data.value;
  282. this.showLandSource = false;
  283. },
  284. onConfirmIsLoan(data){
  285. this.isLoan = data.text;
  286. this.form.isLoan = data.value;
  287. this.showIsLoan = false;
  288. },
  289. onSubmit(){
  290. addIndustry(this.form).then(response => {
  291. if (response.code == 200){
  292. this.$notify({ type: 'success', message: '新增成功' });
  293. setTimeout(function(){
  294. history.back(-1);
  295. },2000)
  296. }
  297. });
  298. }
  299. },
  300. }
  301. </script>
  302. <style scoped lang="scss">
  303. /deep/ .van-button--primary{
  304. background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;
  305. background-size: 100% 100%;
  306. border: none;
  307. }
  308. .home_wrapper{
  309. background: #e9e9e9;
  310. min-height: 100vh;
  311. width: 100vw;
  312. .header_main {
  313. height: 116px;
  314. background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
  315. background-size: 100% 100%;
  316. position: fixed;
  317. top: 0;
  318. left: 0;
  319. width: 100%;
  320. font-size: 36px;
  321. line-height: 116px;
  322. text-align: center;
  323. color: #fff;
  324. position: relative;
  325. .return_btn {
  326. width: 24px;
  327. height: 43.2px;
  328. background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  329. background-size: 20px 36px;
  330. position: absolute;
  331. left: 38px;
  332. top: 36px;
  333. }
  334. .add_btn {
  335. width: 56.4px;
  336. height: 40.8px;
  337. background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  338. background-size: 47px 34px;
  339. position: absolute;
  340. right: 38px;
  341. top: 36px;
  342. }
  343. }
  344. .list_main{
  345. padding:25px;
  346. background: #ffffff;
  347. width: 94%;
  348. margin: 25px auto 0;
  349. border-radius: 15PX;
  350. box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
  351. }
  352. .titBox{
  353. display: flex;
  354. align-items: center;
  355. }
  356. .tit{
  357. font-size: 36px;
  358. font-weight: bold;
  359. }
  360. /deep/ .van-cell{
  361. padding-left: 0!important;
  362. padding-right: 0!important;
  363. padding-bottom: 0!important;
  364. }
  365. /deep/ .van-field__label{
  366. padding-left: 10PX;
  367. width: 8.2em;
  368. }
  369. /deep/ .van-cell--required::before{
  370. left: 0;
  371. }
  372. }
  373. </style>