addcontract.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. <template>
  2. <view :style="'padding-bottom:' + bottom ">
  3. <view class='zhanline'></view>
  4. <uni-forms class='inform ' ref="form" :rules="rules" :value="datainfo" v-show="type==1">
  5. <view class="info_tit">签约信息</view>
  6. <uni-forms-item name="xmmc" style='margin-bottom: 0;'>
  7. <view class="flexc infolist">
  8. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>项目名称</view>
  9. <input placeholder="请输入项目名称" v-model="datainfo.xmmc" class="f16 c34 flex1 txr"/>
  10. </view>
  11. </uni-forms-item>
  12. <view class="tice">填写新注册企业名称+已办项目</view>
  13. <uni-forms-item name="dfqyr" style='margin-bottom: 0;'>
  14. <view class="flexc infolist">
  15. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>对方签约人</view>
  16. <input placeholder="请输入对方签约人信息" v-model="datainfo.dfqyr" class="f16 c34 flex1 txr"/>
  17. </view>
  18. </uni-forms-item>
  19. <view class="tice">填写信息包含单位名称、职务及姓名,用“;”隔开</view>
  20. <uni-forms-item name="wfqyr" style='margin-bottom: 0;'>
  21. <view class="flexc infolist">
  22. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>我方签约人</view>
  23. <input placeholder="请输入我方签约人信息" v-model="datainfo.wfqyr" class="f16 c34 flex1 txr"/>
  24. </view>
  25. </uni-forms-item>
  26. <view class="tice">填写信息包含单位名称、职务及姓名,用“;”隔开</view>
  27. <uni-forms-item name="qyrq" style='margin-bottom: 0;'>
  28. <view class="flexc infolist">
  29. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>签约日期</view>
  30. <picker mode="date" :value="datainfo.qyrq" :end="currentdate" class="infolist_a" @change='bindDateChangetimea'>
  31. <view :class="datainfo.qyrq?'':'f16 co80'">{{datainfo.qyrq||"请选择签约日期"}}</view>
  32. </picker>
  33. </view>
  34. </uni-forms-item>
  35. <view class="tice">实际合同签订日期</view>
  36. <uni-forms-item name="tbrq" style='margin-bottom: 0;'>
  37. <view class="flexc infolist">
  38. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>填报日期</view>
  39. <picker mode="date" :value="datainfo.tbrq" :end="currentdate" class="infolist_a" @change='bindDateChangetimeb'>
  40. <view :class="datainfo.tbrq?'':'f16 co80'">{{datainfo.tbrq||"请选择填报日期"}}</view>
  41. </picker>
  42. </view>
  43. </uni-forms-item>
  44. <uni-forms-item name="xytzely" style='margin-bottom: 0;'>
  45. <view class="flexc infolist">
  46. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>协议投资类型</view>
  47. <picker range-key='dictLabel' :value="incaindex" :range="investmentca" class="infolist_a" @change='bindDateChangedanb'>
  48. <view :class="datainfo.xytzely?'':'f16 co80'">{{datainfo.xytzely||"请选择协议投资类型"}}</view>
  49. </picker>
  50. </view>
  51. </uni-forms-item>
  52. <uni-forms-item name="xytze" style='margin-bottom: 0;'>
  53. <view class="flexc infolist">
  54. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>协议投资额(万元)</view>
  55. <input placeholder="请输入协议投资额" type="number" v-model="datainfo.xytze" class="f16 c34 flex1 txr"/>
  56. </view>
  57. </uni-forms-item>
  58. <uni-forms-item name="swzj" style='margin-bottom: 0;'>
  59. <view class="flexc infolist">
  60. <view class="f16 fw c34 flex0 pr pl12">市外资金(万元)</view>
  61. <input placeholder="请输入市外资金" type="number" v-model="datainfo.swzj" class="f16 c34 flex1 txr"/>
  62. </view>
  63. </uni-forms-item>
  64. <uni-forms-item name="gdzctze" style='margin-bottom: 0;'>
  65. <view class="flexc infolist">
  66. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>固定资产投资额(万元)</view>
  67. <input placeholder="请输入固定资产投资额" type="number" v-model="datainfo.gdzctze" class="f16 c34 flex1 txr"/>
  68. </view>
  69. </uni-forms-item>
  70. <uni-forms-item name="xmgjrxm" style='margin-bottom: 0;'>
  71. <view class="flexc infolist">
  72. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>项目跟进人</view>
  73. <input placeholder="请输入项目跟进人" v-model="datainfo.xmgjrxm" class="f16 c34 flex1 txr"/>
  74. </view>
  75. </uni-forms-item>
  76. <uni-forms-item name="xmgjrzw" style='margin-bottom: 0;'>
  77. <view class="flexc infolist">
  78. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>项目跟进人职务</view>
  79. <input placeholder="请输入项目跟进人职务" v-model="datainfo.xmgjrzw" class="f16 c34 flex1 txr"/>
  80. </view>
  81. </uni-forms-item>
  82. <uni-forms-item name="xmgjrsjh" style='margin-bottom: 0;'>
  83. <view class="flexc infolist">
  84. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>项目跟进人联系方式</view>
  85. <input placeholder="请输入项目跟进人联系方式" v-model="datainfo.xmgjrsjh" class="f16 c34 flex1 txr"/>
  86. </view>
  87. </uni-forms-item>
  88. <uni-forms-item name="xmszd" style='margin-bottom: 0;'>
  89. <view class="flexc infolist">
  90. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>项目所在地</view>
  91. <input placeholder="请输入项目所在地" v-model="datainfo.xmszd" class="f16 c34 flex1 txr"/>
  92. </view>
  93. </uni-forms-item>
  94. <view class="tice">园区或乡镇</view>
  95. <uni-forms-item name="sshy" style='margin-bottom: 0;'>
  96. <view class="flexc infolist">
  97. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>所属行业</view>
  98. <picker range-key='dictLabel' :value="industryindex" :range="industry" class="infolist_a" @change='bindDateChangedana'>
  99. <view :class="datainfo.sshy?'':'f16 co80'">{{datainfo.sshy||"请选择所属行业"}}</view>
  100. </picker>
  101. </view>
  102. </uni-forms-item>
  103. <uni-forms-item name="tzfs" style='margin-bottom: 0;'>
  104. <view class="flexc infolist">
  105. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>投资方式</view>
  106. <picker range-key='dictLabel' :value="inmoindex" :range="investmentmode" class="infolist_a" @change='bindDateChangedanc'>
  107. <view :class="datainfo.tzfs?'':'f16 co80'">{{datainfo.tzfs||"请选择投资方式"}}</view>
  108. </picker>
  109. </view>
  110. </uni-forms-item>
  111. <uni-forms-item name="jsfs" style='margin-bottom: 0;'>
  112. <view class="flexc infolist">
  113. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>建设方式</view>
  114. <picker range-key='dictLabel' :value="constindex" :range="construction" class="infolist_a" @change='bindDateChangedand'>
  115. <view :class="datainfo.jsfs?'':'f16 co80'">{{datainfo.jsfs||"请选择建设方式"}}</view>
  116. </picker>
  117. </view>
  118. </uni-forms-item>
  119. <uni-forms-item name="sfys" style='margin-bottom: 0;'>
  120. <view class="flexc infolist">
  121. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>是否宜商</view>
  122. <picker range-key='dictLabel' :value="cyindex" :range="cylist" class="infolist_a" @change='bindDateChangeb'>
  123. <view :class="sfys?'':'f16 co80'">{{sfys||"请选择是/否"}}</view>
  124. </picker>
  125. </view>
  126. </uni-forms-item>
  127. <uni-forms-item name="jsnr" style='margin-bottom: 0;'>
  128. <view class="flexc infolist">
  129. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>建设内容</view>
  130. <input placeholder="请输入建设内容" v-model="datainfo.jsnr" class="f16 c34 flex1 txr"/>
  131. </view>
  132. </uni-forms-item>
  133. <uni-forms-item name="zlcf" style='margin-bottom: 0;'>
  134. <view class="flexc infolist">
  135. <view class="f16 fw c34 flex0 pr pl12">租赁厂房(平方米)</view>
  136. <input placeholder="请输入租赁厂房面积" type="number" v-model="datainfo.zlcf" class="f16 c34 flex1 txr"/>
  137. </view>
  138. </uni-forms-item>
  139. <uni-forms-item name="gdmj" style='margin-bottom: 0;'>
  140. <view class="flexc infolist">
  141. <view class="f16 fw c34 flex0 pr pl12">供地面积(亩)</view>
  142. <input placeholder="请输入供地面积" type="number" v-model="datainfo.gdmj" class="f16 c34 flex1 txr"/>
  143. </view>
  144. </uni-forms-item>
  145. <uni-forms-item name="lxrq" style='margin-bottom: 0;'>
  146. <view class="flexc infolist">
  147. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>立项日期</view>
  148. <picker mode="date" :value="datainfo.lxrq" class="infolist_a" @change='bindDateChangetimec'>
  149. <view :class="datainfo.lxrq?'':'f16 co80'">{{datainfo.lxrq||"请选择立项日期"}}</view>
  150. </picker>
  151. </view>
  152. </uni-forms-item>
  153. <uni-forms-item name="nkgrq" style='margin-bottom: 0;'>
  154. <view class="flexc infolist">
  155. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>拟开工日期</view>
  156. <picker mode="date" :value="datainfo.nkgrq" class="infolist_a" @change='bindDateChangetimed'>
  157. <view :class="datainfo.nkgrq?'':'f16 co80'">{{datainfo.nkgrq||"请选择拟开工日期"}}</view>
  158. </picker>
  159. </view>
  160. </uni-forms-item>
  161. <uni-forms-item name="czwt" style='margin-bottom: 0;'>
  162. <view class="flexc infolist" style="align-items: flex-start;">
  163. <view class="f16 fw c34 flex0 pr pl12">存在问题</view>
  164. <uni-easyinput :inputBorder='false' type="textarea" v-model="datainfo.czwt" placeholder="请输入存在问题" placeholderStyle='text-align: right;font-size:32rpx;color:#808080'></uni-easyinput>
  165. </view>
  166. </uni-forms-item>
  167. <view class="infobtn flexcc cf f16 f500" @click="getNext">下一步</view>
  168. </uni-forms>
  169. <!-- 下一步 -->
  170. <uni-forms class='inform' ref="twoform" :rules="tworules" :value="datainfo" v-show="type==2">
  171. <view class="info_tit">企业信息</view>
  172. <uni-forms-item name="zcqymc" style='margin-bottom: 0;'>
  173. <view class="flexc infolist">
  174. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>在潜注册公司名称</view>
  175. <input placeholder="请输入在潜注册公司名称" v-model="datainfo.zcqymc" class="f16 c34 flex1 txr"/>
  176. </view>
  177. </uni-forms-item>
  178. <uni-forms-item name="zcrq" style='margin-bottom: 0;'>
  179. <view class="flexc infolist">
  180. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>注册日期</view>
  181. <picker mode="date" :value="datainfo.zcrq" :end="currentdate" class="infolist_a" @change='bindDateChangetimee'>
  182. <view :class="datainfo.zcrq?'':'f16 co80'">{{datainfo.zcrq||"请选择注册日期"}}</view>
  183. </picker>
  184. </view>
  185. </uni-forms-item>
  186. <uni-forms-item name="zczb" style='margin-bottom: 0;'>
  187. <view class="flexc infolist">
  188. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>注册资本(万元)</view>
  189. <input placeholder="请输入注册资本" type="number" v-model="datainfo.zczb" class="f16 c34 flex1 txr"/>
  190. </view>
  191. </uni-forms-item>
  192. <uni-forms-item name="frdb" style='margin-bottom: 0;'>
  193. <view class="flexc infolist">
  194. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>法人代表</view>
  195. <input placeholder="请输入法人代表" v-model="datainfo.frdb" class="f16 c34 flex1 txr"/>
  196. </view>
  197. </uni-forms-item>
  198. <uni-forms-item name="lxfs" style='margin-bottom: 0;'>
  199. <view class="flexc infolist">
  200. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>联系方式</view>
  201. <input placeholder="请输入联系方式" v-model="datainfo.lxfs" class="f16 c34 flex1 txr"/>
  202. </view>
  203. </uni-forms-item>
  204. <uni-forms-item name="jyfw" style='margin-bottom: 0;'>
  205. <view class="flexc infolist">
  206. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>经营范围</view>
  207. <input placeholder="请输入经营范围" v-model="datainfo.jyfw" class="f16 c34 flex1 txr"/>
  208. </view>
  209. </uni-forms-item>
  210. <view class="border"></view>
  211. <!-- <uni-forms-item name="remark" style='margin-bottom: 0;'>
  212. <view class="flexc infolist">
  213. <view class="f16 fw c34 flex0 pr pl12">备注</view>
  214. <input placeholder="请输入备注信息" v-model="datainfo.remark" class="f16 c34 flex1 txr"/>
  215. </view>
  216. </uni-forms-item> -->
  217. <uni-forms-item name="zsyzFjList" style='margin-bottom: 0;'>
  218. <view class="flexc infolist">
  219. <view class="f16 fw c34 flex0 pr pl12"><text class="cir">*</text>附件</view>
  220. <view class="infolist_a co28">
  221. <lsj-upload
  222. ref="lsjUpload"
  223. childId="upload1"
  224. :width="width"
  225. :height="height"
  226. :option="option"
  227. :size="size"
  228. :formats="formats"
  229. :debug="debug"
  230. :instantly="instantly"
  231. @progress=""
  232. @uploadEnd="onuploadEnd" >
  233. <view class="btn" :style="{width: width,height: height}">选择附件</view>
  234. </lsj-upload>
  235. </view>
  236. </view>
  237. </uni-forms-item>
  238. <view class=" cldelistbf" v-for="(ite,idx) in filelist" :key='idx'>
  239. <view class="flext f15 c6" @click="getDown(ite.path)">
  240. <view class="imgl"><image :src="wimg" ></image></view>
  241. <view>{{ite.fjName}}</view>
  242. </view>
  243. <!-- 删除 -->
  244. <view class="delimg flex0" @click.stop="getDelFj(idx)">
  245. <image :src="delimg"></image>
  246. </view>
  247. </view>
  248. <view class="infolist_b"><text>*</text>请上传大小不超过<text>100MB</text>格式为<text>doc/xls/ppt/txt/pdf/zip/rar/word</text>的文件</view>
  249. <view class="infobtn flexcc cf f16 f500" v-if="checkPermi(['projectV2:qyxx:add','projectV2:qyxx:edit'])" @click="getSubmit">提交</view>
  250. </uni-forms>
  251. </view>
  252. </template>
  253. <script>
  254. import { getDictionaryFn} from '@/api/work/index.js'
  255. import {selectDictLabel} from "@/utils/common.js"
  256. import {getsqyxxAddFn,getsqyxxPutFn} from "@/api/work/addclue.js"
  257. import {getqyxxtail} from "@/api/work/clue.js"
  258. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  259. import config from '@/config'
  260. const baseUrl = config.baseUrl
  261. import { getToken } from '@/utils/auth'
  262. export default {
  263. data() {
  264. return {
  265. //附件
  266. option: {
  267. // 上传服务器地址,需要替换为你的接口地址
  268. url: baseUrl+'/common/upload', // 该地址非真实路径,需替换为你项目自己的接口地址
  269. // 上传附件的key
  270. name: 'file',
  271. // 根据你接口需求自定义请求头,默认不要写content-type,让浏览器自适配
  272. header: {
  273. // 示例参数可删除
  274. 'Authorization': 'Bearer ' + getToken(),
  275. },
  276. // 根据你接口需求自定义body参数
  277. formData: {
  278. }
  279. },
  280. // 选择文件后是否立即自动上传,true=选择后立即上传
  281. instantly: true,
  282. // 必传宽高且宽高应与slot宽高保持一致
  283. width: '',
  284. height: '48rpx',
  285. // 限制允许上传的格式,空串=不限制,默认为空
  286. formats: 'doc,docx,xls,ppt,txt,pdf,zip,rar,word',
  287. // 文件上传大小限制
  288. size: 100,
  289. // 文件数量限制 默认10
  290. count: 5,
  291. // 文件回显列表
  292. files: new Map(),
  293. // 微信小程序Map对象for循环不显示,所以转成普通数组,不要问为什么,我也不知道
  294. wxFiles: [],
  295. // 是否打印日志
  296. debug: false,
  297. filelist:[],
  298. selectDate: '',
  299. defaultPhoneHeight: '', //屏幕默认高度
  300. nowPhoneHeight: '', //屏幕现在的高度
  301. bottom:0,
  302. type:1,
  303. datainfo:{
  304. "xmId":"",//项目ID
  305. "xmbh":"",//项目编号
  306. "xmmc":"",//项目名称
  307. "dfqyr":"",//对方签约人
  308. "wfqyr":"",//我方签约人
  309. "tbrq":"",//通报日期
  310. "qyrq":"",//签约日期
  311. "xytzely":"",//协议投资额来源
  312. "xytze":"",//协议投资额
  313. "swzj":"",//市外资金
  314. "gdzctze":"",//固定资产投资额(万元)
  315. "xmgjrxm":"",//项目跟进人姓名
  316. "xmgjrzw":"",//项目跟进人职务
  317. "xmgjrsjh":"",//项目跟进人手机号
  318. "xmszd":"",//项目所在地
  319. "sshy":"",//所属行业 字典
  320. "tzfs":"",//投资方式(1:独资,2:合资,3:合作,4:收购,5:参股,6:兼并,7:其他)
  321. "jsfs":"",//建设方式(1:新建,2:改建,3:扩建,4:租赁)
  322. "sfys":"",//是否宜商(1:是,2:否)
  323. "jsnr":"",//建设内容
  324. "zlcf":"",//租赁厂房(平方米)
  325. "gdmj":"",//供地面积(亩)
  326. "zcqymc":"",//注册企业名称
  327. "zcrq":"",//注册日期
  328. "zczb":"",//注册资本(万元)
  329. "frdb":"",//法人代表
  330. "lxfs":"",//联系方式
  331. "jyfw":"",//经营范围
  332. "lxrq":"",//立项日期
  333. "nkgrq":"",//拟开工日期
  334. 'czwt':'',//存在问题
  335. "path":"",//文件地址
  336. zsyzFjList:[],//附件地址
  337. },
  338. tanfalg:false,
  339. addimg:require("@/static/images/mine/add.png"),
  340. delimg:require("@/static/images/mine/del.png"),
  341. checknimg:require("@/static/images/mine/jnicon.png"),
  342. gcheckimg:require("@/static/images/mine/jicon.png"),
  343. closeimg:require('@/static/images/close.png'),
  344. wimg:require('@/static/images/index/wicon.png'),
  345. downimg:require('@/static/images/index/down.png'),
  346. rules: {
  347. xmmc: {rules: [{required: true,errorMessage: '请输入项目名称'}]},
  348. dfqyr: {rules: [{required: true,errorMessage: '请输入对方签约人信息',}]},
  349. wfqyr: {rules: [{required: true,errorMessage: '请输入我方签约人信息' } ]},
  350. qyrq: {rules: [{required: true,errorMessage: '请选择签约日期'} ]},
  351. tbrq: {rules: [{required: true,errorMessage: '请选择填报日期'} ]},
  352. xytzely: {rules: [{required: true,errorMessage: '请选择协议投资类型'} ]},
  353. xytze: {rules: [{required: true,errorMessage: '请输入协议投资额'} ]},
  354. gdzctze: {rules: [{required: true,errorMessage: '请输入固定资产投资额'} ]},
  355. xmgjrxm: {rules: [{required: true,errorMessage: '请输入项目跟进人姓名'} ]},
  356. xmgjrzw: {rules: [{required: true,errorMessage: '请输入项目跟进人职务'} ]},
  357. xmgjrsjh: {rules: [{required: true,errorMessage: '请输入项目跟进人联系方式'},{pattern:/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,errorMessage: '请输入正确的手机号码'} ]},
  358. xmszd: {rules: [{required: true,errorMessage: '请输入项目所在地'} ]},
  359. sshy: {rules: [{required: true,errorMessage: '请选择所属行业'} ]},
  360. tzfs: {rules: [{required: true,errorMessage: '请选择投资方式'} ]},
  361. jsfs: {rules: [{required: true,errorMessage: '请选择建设方式'} ]},
  362. sfys: {rules: [{required: true,errorMessage: '请选择是/否'} ]},
  363. jsnr: {rules: [{required: true,errorMessage: '请输入建设内容'} ]},
  364. lxrq: {rules: [{required: true,errorMessage: '请选择立项日期'} ]},
  365. nkgrq: {rules: [{required: true,errorMessage: '请选择拟开工日期'} ]},
  366. },
  367. tworules:{
  368. zcqymc: {rules: [{required: true,errorMessage: '请输入在潜注册公司名称'} ]},
  369. zcrq: {rules: [{required: true,errorMessage: '请选择注册日期'} ]},
  370. zczb: {rules: [{required: true,errorMessage: '请输入注册资本'} ]},
  371. frdb: {rules: [{required: true,errorMessage: '请输入法人代表'} ]},
  372. lxfs: {rules: [{required: true,errorMessage: '请输入联系方式'},{pattern:/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,errorMessage: '请输入正确的手机号码'}]},
  373. jyfw: {rules: [{required: true,errorMessage: '请输入经营范围'} ]},
  374. zsyzFjList: {rules: [{required: true,errorMessage: '请上传附件'} ]},
  375. },
  376. lhindex:0,
  377. cyindex:0,
  378. cylist:[{dictLabel:'是',dictValue:'Y'},{dictLabel:'否',dictValue:'N'}],//宜商
  379. // map:{text:'dictLabel',value:'dictValue'},
  380. currentdate:'',//当天日期
  381. industry:[],//所属行业bindDateChangedana
  382. industryindex:0,
  383. investmentca:[],//投资类别bindDateChangedanb
  384. incaindex:0,
  385. investmentmode:[],//投资方式bindDateChangedanc
  386. inmoindex:0,
  387. construction:[],//建设方式bindDateChangedand
  388. constindex:0,
  389. pagetype:'add',
  390. sfys:'',//是否宜商
  391. }
  392. },
  393. onLoad(e) {
  394. this.currentdate = this.getNowFormatDate();
  395. var newObj=JSON.parse(decodeURIComponent(e.data))
  396. this.pagetype=newObj.pagetype||'add';
  397. this.getinvestmentarea();
  398. this.datainfo.xmId=newObj.xmId;
  399. this.datainfo.xmbh=newObj.xmbh;
  400. this.datainfo.xmmc=newObj.xmmc;
  401. if(this.pagetype=='update'){
  402. // 获取详情 修改
  403. this.getDataFn()
  404. }else{
  405. this.datainfo.qyrq=this.currentdate;
  406. this.datainfo.tbrq=this.currentdate;
  407. this.datainfo.zcrq=this.currentdate;
  408. this.datainfo.lxrq=this.currentdate;
  409. }
  410. // #ifdef APP
  411. uni.onKeyboardHeightChange(res=> { //监听键盘高度变化
  412. const res_keyboard = uni.getSystemInfoSync();
  413. let key_height = res.height - (res_keyboard.screenHeight - res_keyboard.windowHeight)
  414. // let key_height = res.height - (res_keyboard.screenHeight - res_keyboard.windowHeight + res_keyboard.safeAreaInsets.bottom)
  415. this.bottom = `${ key_height>0 ? key_height : 0}px`;
  416. })
  417. // #endif
  418. },
  419. onHide() {
  420. // #ifdef APP-PLUS
  421. uni.offKeyboardHeightChange(); // 取消监听键盘高度变化事件,避免内存消耗
  422. // #endif
  423. },
  424. onReady() {
  425. // this.$refs.form.setRules(this.rules)
  426. },
  427. methods: {
  428. checkPermi, checkRole,
  429. // 项目详情
  430. getDataFn(){
  431. var that=this;
  432. getqyxxtail(this.datainfo.xmId).then(res=>{
  433. if(res.code==200){
  434. this.datainfo=res.data;
  435. this.sfys=res.data.sfys=='Y'?'是':'否';
  436. this.cyindex=res.data.sfys=='Y'?0:1;
  437. if(res.data.zsyzFjList&&res.data.zsyzFjList.length){
  438. this.filelist=JSON.parse(JSON.stringify(res.data.zsyzFjList))
  439. }
  440. // 协议投资类型
  441. for(var i=0;i<that.investmentca.length;i++){
  442. if(that.investmentca[i].dictLabel==this.datainfo.xytzely){
  443. this.incaindex=Number(i)
  444. break;
  445. }
  446. }
  447. //所属行业
  448. for(var i=0;i<that.industry.length;i++){
  449. if(that.industry[i].dictLabel==this.datainfo.sshy){
  450. this.industryindex=Number(i)
  451. break;
  452. }
  453. }
  454. //投资方式
  455. for(var i=0;i<that.investmentmode.length;i++){
  456. if(that.investmentmode[i].dictLabel==this.datainfo.tzfs){
  457. this.inmoindex=Number(i)
  458. break;
  459. }
  460. }
  461. //建设方式
  462. for(var i=0;i<that.construction.length;i++){
  463. if(that.construction[i].dictLabel==this.datainfo.jsfs){
  464. this.constindex=Number(i)
  465. break;
  466. }
  467. }
  468. }else{
  469. this.$toast(res.msg)
  470. }
  471. })
  472. },
  473. // 字典值
  474. getinvestmentarea(){
  475. // 所属行业
  476. getDictionaryFn('industry').then(res=>{
  477. if(res.code==200){
  478. this.industry=res.data
  479. }
  480. })
  481. // 投资类别
  482. getDictionaryFn('investment_category').then(res=>{
  483. if(res.code==200){
  484. this.investmentca=res.data
  485. }
  486. })
  487. //投资方式
  488. getDictionaryFn('investment_mode').then(res=>{
  489. if(res.code==200){
  490. this.investmentmode=res.data
  491. }
  492. })
  493. //建设方式
  494. getDictionaryFn('construction_method').then(res=>{
  495. if(res.code==200){
  496. this.construction=res.data
  497. }
  498. })
  499. },
  500. getNowFormatDate(){
  501. let date = new Date();
  502. let y = date.getFullYear();
  503. let m = date.getMonth() + 1;
  504. m = m < 10 ? "0" + m : m;
  505. let d = date.getDate();
  506. d = d < 10 ? "0" + d : d;
  507. const timeday = y + "-" + m + "-" + d;
  508. return timeday;
  509. },
  510. bindDateChangetimea(e){//签约日期
  511. this.datainfo.qyrq=e.detail.value
  512. },
  513. bindDateChangetimeb(e){//填报日期
  514. this.datainfo.tbrq=e.detail.value
  515. },
  516. bindDateChangetimec(e){//立项日期
  517. this.datainfo.lxrq=e.detail.value
  518. },
  519. bindDateChangetimed(e){//拟开工日期
  520. this.datainfo.nkgrq=e.detail.value
  521. },
  522. bindDateChangetimee(e){//注册日期
  523. this.datainfo.zcrq=e.detail.value
  524. },
  525. bindDateChangeb(e){
  526. var val=e.detail.value;
  527. this.sfys=this.cylist[val].dictLabel;
  528. this.datainfo.sfys=this.cylist[val].dictValue
  529. },
  530. bindDateChangedana(e){
  531. var val=e.detail.value;
  532. this.datainfo.sshy=this.industry[val].dictLabel
  533. },
  534. bindDateChangedanb(e){
  535. var val=e.detail.value;
  536. this.datainfo.xytzely=this.investmentca[val].dictLabel
  537. },
  538. bindDateChangedanc(e){
  539. var val=e.detail.value;
  540. this.datainfo.tzfs=this.investmentmode[val].dictLabel
  541. },
  542. bindDateChangedand(e){
  543. var val=e.detail.value;
  544. this.datainfo.jsfs=this.construction[val].dictLabel
  545. },
  546. getNext(){
  547. this.$refs.form.validate().then(res => {
  548. if(!this.datainfo.zlcf&&!this.datainfo.gdmj){
  549. this.$toast('请输入租赁厂房或供地面积')
  550. return
  551. }else{
  552. this.type=2;
  553. }
  554. })
  555. },
  556. getSubmit() {
  557. var that=this;
  558. this.datainfo.zsyzFjList=JSON.parse(JSON.stringify(this.filelist));
  559. this.$refs.twoform.validate().then(res => {
  560. var params=this.datainfo;
  561. if(this.pagetype=='add'){
  562. getsqyxxAddFn(params).then(res=>{
  563. if(res.code==200){
  564. this.$toast('上报签约成功')
  565. setTimeout(function() {
  566. uni.$emit('refreshdata');
  567. uni.navigateBack({delta: 1});
  568. },1500);
  569. }else{
  570. this.$toast(res.msg)
  571. }
  572. })
  573. }else{
  574. getsqyxxPutFn(params).then(res=>{
  575. if(res.code==200){
  576. this.$toast('修改签约成功')
  577. setTimeout(function() {
  578. uni.$emit('refreshdata');
  579. uni.navigateBack({delta: 1});
  580. },1500);
  581. }else{
  582. this.$toast(res.msg)
  583. }
  584. })
  585. }
  586. // params.zsyzFjList=this.filelist
  587. })
  588. },
  589. onuploadEnd(item) {
  590. var newobj={}
  591. var responseText=JSON.parse(item.responseText)
  592. newobj.fjName=responseText.originalFilename;
  593. newobj.path=responseText.fileName;
  594. this.filelist.push(newobj)
  595. this.datainfo.zsyzFjList=JSON.parse(JSON.stringify(this.filelist))
  596. },
  597. getDelFj(idx){
  598. this.filelist.splice(idx,1)
  599. this.datainfo.zsyzFjList=JSON.parse(JSON.stringify(this.filelist))
  600. },
  601. getDown(e){
  602. uni.showLoading({
  603. title: '加载中'
  604. });
  605. var url=baseUrl+e;
  606. uni.downloadFile({
  607. url: url,//文件的下载路径
  608. success(result) {
  609. uni.hideLoading()
  610. var filePath = result.tempFilePath;
  611. uni.openDocument({
  612. filePath: filePath,
  613. showMenu: true,
  614. success: function (res) {
  615. }
  616. });
  617. },
  618. fail(res) {uni.hideLoading()}
  619. })
  620. },
  621. }
  622. }
  623. </script>
  624. <style lang="scss" scoped>
  625. .inform{padding-top: 30rpx; padding-bottom: 160rpx;}
  626. .infolist{padding: 30rpx 32rpx 30rpx 24rpx;position: relative;
  627. .cir{position: absolute;font-size: 36rpx;font-weight: bold;color: #FE5706;left: 0rpx;}
  628. }
  629. .delimg{width: 40rpx;height:40rpx;margin-left: 16rpx;display: flex;align-items: center;justify-content: center;
  630. image{width: 30rpx;height: 30rpx;}
  631. }
  632. .infobtn{width: 100%;height: 88rpx;background: #FA5F03;line-height: 88rpx;position: fixed;left: 0;right: 0;bottom: 0;z-index: 3;}
  633. .input_ye image{width: 34rpx;height: 18rpx;}
  634. .info_tit{font-size: 32rpx;color: #FE5706;padding: 30rpx 26rpx;font-weight: bold;}
  635. .infolist_a{height: 44rpx;flex: 1;text-align: right;font-size: 32rpx;color: #343434;}
  636. .inform /deep/ .uni-forms-item__error{margin-top: -30rpx;margin-left: 24rpx;}
  637. .inform .pl12{margin-right: 10rpx;}
  638. .fixedbox .pl12{margin-right: 10rpx;}
  639. </style>