detail.vue 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822
  1. <template>
  2. <basic-container>
  3. <div>
  4. <el-tabs
  5. v-model="activeType"
  6. :before-leave="beforeLeave"
  7. >
  8. <!-- 合同段信息 -->
  9. <el-tab-pane
  10. label="合同段信息"
  11. name="1"
  12. :disabled="btnLoad"
  13. >
  14. <div>
  15. <el-form
  16. :model="contractForm"
  17. :rules="contractRules"
  18. ref="contractForm"
  19. label-width="auto"
  20. >
  21. <el-form-item label="项目名称">
  22. <el-input
  23. v-model="projectInfo.projectName"
  24. disabled
  25. ></el-input>
  26. </el-form-item>
  27. <el-row>
  28. <el-col :span="12">
  29. <el-form-item
  30. label="合同段类型"
  31. prop="contractType"
  32. >
  33. <el-select
  34. :disabled="contractForm.id?true:false"
  35. v-model="contractForm.contractType"
  36. placeholder="请选择"
  37. class="w-100p"
  38. >
  39. <el-option
  40. v-for="item in contractTypeList"
  41. :key="item.id"
  42. :label="item.dictValue"
  43. :value="item.dictKey"
  44. ></el-option>
  45. </el-select>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="12">
  49. <el-form-item
  50. label="合同段编号"
  51. prop="contractNumber"
  52. >
  53. <el-input v-model="contractForm.contractNumber"></el-input>
  54. </el-form-item>
  55. </el-col>
  56. </el-row>
  57. <el-row>
  58. <el-col :span="12">
  59. <el-form-item
  60. label="合同段名称"
  61. prop="contractName"
  62. >
  63. <el-input v-model="contractForm.contractName"></el-input>
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="12">
  67. <el-form-item
  68. label="参与方进场日期"
  69. prop="contractorJoinTime"
  70. >
  71. <el-date-picker
  72. v-model="contractForm.contractorJoinTime"
  73. type="date"
  74. format="yyyy 年 MM 月 dd 日"
  75. value-format="yyyy-MM-dd HH:mm:ss"
  76. placeholder="选择日期"
  77. ></el-date-picker>
  78. </el-form-item>
  79. </el-col>
  80. </el-row>
  81. <div class="flexBetween">
  82. <el-form-item
  83. :label="isShowDq?'是否开启电签':'认证设置'"
  84. prop="isElectronicSignature"
  85. >
  86. <el-radio-group v-model="contractForm.isElectronicSignature">
  87. <el-radio :label="0">关闭</el-radio>
  88. <el-radio :label="1">开启</el-radio>
  89. </el-radio-group>
  90. </el-form-item>
  91. <el-form-item
  92. label="模板引用"
  93. prop="templateType"
  94. >
  95. <el-radio-group v-model="contractForm.templateType">
  96. <el-radio :label="1">模板节点</el-radio>
  97. <el-radio :label="2">底层节点</el-radio>
  98. </el-radio-group>
  99. </el-form-item>
  100. <el-form-item
  101. label="是否开启试验模块"
  102. prop="isTestModule"
  103. >
  104. <el-radio-group v-model="contractForm.isTestModule">
  105. <el-radio :label="0">关闭</el-radio>
  106. <el-radio :label="1">开启</el-radio>
  107. </el-radio-group>
  108. </el-form-item>
  109. <el-form-item
  110. label="是否强制引用记录/报告编号:"
  111. prop="isTestRecord"
  112. v-if="contractForm.isTestModule === 1"
  113. >
  114. <el-radio-group v-model="contractForm.isTestRecord">
  115. <el-radio :label="0">关闭</el-radio>
  116. <el-radio :label="1">开启</el-radio>
  117. </el-radio-group>
  118. </el-form-item>
  119. <!-- <el-form-item
  120. style="width:25%;"
  121. label="是否开启复制数据"
  122. prop="isCopyData"
  123. v-if="contractForm.contractType==1"
  124. >
  125. <el-radio-group v-model="contractForm.isCopyData">
  126. <el-radio :label="0">否</el-radio>
  127. <el-radio :label="1">是</el-radio>
  128. </el-radio-group>
  129. </el-form-item>
  130. <div v-else style="width:25%;">
  131. </div> -->
  132. </div>
  133. <div class="flexBetween">
  134. <el-form-item
  135. style="width:50%;"
  136. label="是否引用编号"
  137. prop="isReferenceNumber"
  138. >
  139. <el-radio-group v-model="contractForm.isReferenceNumber">
  140. <el-radio :label="0">否</el-radio>
  141. <el-radio :label="1">是</el-radio>
  142. </el-radio-group>
  143. </el-form-item>
  144. <el-form-item
  145. style="width:50%;"
  146. label="是否允许超计"
  147. prop="isReferenceNumber"
  148. >
  149. <el-radio-group v-model="contractForm.isOverMeter">
  150. <el-radio :label="0">否</el-radio>
  151. <el-radio :label="1">是</el-radio>
  152. </el-radio-group>
  153. </el-form-item>
  154. </div>
  155. <el-row>
  156. <el-col :span="12">
  157. <el-form-item
  158. label="计划开工日期"
  159. prop="planStartTime"
  160. >
  161. <el-date-picker
  162. v-model="contractForm.planStartTime"
  163. type="date"
  164. format="yyyy 年 MM 月 dd 日"
  165. value-format="yyyy-MM-dd HH:mm:ss"
  166. placeholder="选择日期"
  167. ></el-date-picker>
  168. </el-form-item>
  169. </el-col>
  170. <el-col :span="12">
  171. <el-form-item
  172. label="计划完工日期"
  173. prop="planEndTime"
  174. >
  175. <el-date-picker
  176. v-model="contractForm.planEndTime"
  177. type="date"
  178. format="yyyy 年 MM 月 dd 日"
  179. value-format="yyyy-MM-dd HH:mm:ss"
  180. placeholder="选择日期"
  181. ></el-date-picker>
  182. </el-form-item>
  183. </el-col>
  184. </el-row>
  185. <el-row>
  186. <el-col :span="12">
  187. <el-form-item
  188. label="实际开工日期"
  189. prop="actualStartTime"
  190. >
  191. <el-date-picker
  192. v-model="contractForm.actualStartTime"
  193. type="date"
  194. format="yyyy 年 MM 月 dd 日"
  195. value-format="yyyy-MM-dd HH:mm:ss"
  196. placeholder="选择日期"
  197. ></el-date-picker>
  198. </el-form-item>
  199. </el-col>
  200. <el-col :span="12">
  201. <el-form-item
  202. label="实际完工日期"
  203. prop="actualEndTime"
  204. >
  205. <el-date-picker
  206. v-model="contractForm.actualEndTime"
  207. type="date"
  208. format="yyyy 年 MM 月 dd 日"
  209. value-format="yyyy-MM-dd HH:mm:ss"
  210. placeholder="选择日期"
  211. ></el-date-picker>
  212. </el-form-item>
  213. </el-col>
  214. </el-row>
  215. <el-row>
  216. <el-col :span="12">
  217. <el-form-item
  218. label="业主单位名称"
  219. v-if="contractForm.contractType==1"
  220. prop="contractorUnitName"
  221. >
  222. <el-input v-model="contractForm.contractorUnitName"></el-input>
  223. </el-form-item>
  224. <el-form-item
  225. v-if="contractForm.contractType==2"
  226. label="监理单位名称"
  227. prop="supervisionUnitName"
  228. >
  229. <el-input v-model="contractForm.supervisionUnitName"></el-input>
  230. </el-form-item>
  231. <el-form-item
  232. v-if="contractForm.contractType==3"
  233. label="建设单位名称"
  234. prop="contractorUnitName"
  235. >
  236. <el-input v-model="contractForm.contractorUnitName"></el-input>
  237. </el-form-item>
  238. </el-col>
  239. <el-col :span="12">
  240. <el-form-item
  241. label="合同金额"
  242. prop="contractAmount"
  243. >
  244. <el-input v-model="contractForm.contractAmount">
  245. <template slot="append">万元</template>
  246. </el-input>
  247. </el-form-item>
  248. </el-col>
  249. <el-col :span="12" v-if="contractForm.contractType==2 || contractForm.contractType==3">
  250. <el-form-item label="试验室名称" prop="laboratoryName">
  251. <el-input v-model="contractForm.laboratoryName"></el-input>
  252. </el-form-item>
  253. </el-col>
  254. </el-row>
  255. <el-row v-if="contractForm.contractType==1">
  256. <el-col :span="12">
  257. <el-form-item
  258. label="施工单位名称"
  259. prop="constructionUnitName"
  260. >
  261. <el-input v-model="contractForm.constructionUnitName"></el-input>
  262. </el-form-item>
  263. </el-col>
  264. <el-col :span="12">
  265. <el-form-item
  266. label="上传开工令"
  267. prop="startFileUrl"
  268. >
  269. <template v-if="isBackShow">
  270. <el-link
  271. type="primary"
  272. @click="downloadFile"
  273. >开工令
  274. </el-link>
  275. <el-button
  276. @click="delFile"
  277. class="mg-l-10"
  278. style="color:red"
  279. type="text"
  280. icon="el-icon-circle-close"
  281. ></el-button>
  282. </template>
  283. <template v-else>
  284. <el-upload
  285. action="/api/blade-resource/oss/endpoint/put-file-attach"
  286. :on-remove="handleRemove"
  287. :limit="1"
  288. :headers=headers
  289. :on-exceed="handleExceed"
  290. :on-success="handleSuccess"
  291. :file-list="fileList"
  292. >
  293. <el-button
  294. size="small"
  295. type="primary"
  296. >点击上传
  297. </el-button>
  298. </el-upload>
  299. </template>
  300. </el-form-item>
  301. </el-col>
  302. </el-row>
  303. <el-row v-if="contractForm.contractType==1">
  304. <el-col :span="12">
  305. <el-form-item
  306. label="监理单位名称"
  307. prop="supervisionUnitName"
  308. >
  309. <el-input v-model="contractForm.supervisionUnitName"></el-input>
  310. </el-form-item>
  311. </el-col>
  312. <el-col :span="12">
  313. <el-form-item
  314. label="试验室名称"
  315. prop="laboratoryName"
  316. >
  317. <el-input v-model="contractForm.laboratoryName"></el-input>
  318. </el-form-item>
  319. </el-col>
  320. </el-row>
  321. <el-row v-if="projectInfo.remarkType==3">
  322. <el-col :span="12">
  323. <el-form-item
  324. label="客户编号"
  325. prop="sealCustomerId"
  326. >
  327. <el-input v-model="contractForm.sealCustomerId"></el-input>
  328. </el-form-item>
  329. </el-col>
  330. <el-col :span="12">
  331. <el-form-item
  332. label="项目ID"
  333. prop="sealProjectId"
  334. >
  335. <el-input v-model="contractForm.sealProjectId"></el-input>
  336. </el-form-item>
  337. </el-col>
  338. </el-row>
  339. <el-row v-if="projectInfo.remarkType==3">
  340. <el-col :span="12">
  341. <el-form-item
  342. label="账号ID"
  343. prop="sealAccountId"
  344. >
  345. <el-input v-model="contractForm.sealAccountId"></el-input>
  346. </el-form-item>
  347. </el-col>
  348. <el-col :span="12">
  349. <el-form-item
  350. label="通信KeyB64"
  351. prop="sealCommKey"
  352. >
  353. <el-input v-model="contractForm.sealCommKey"></el-input>
  354. </el-form-item>
  355. </el-col>
  356. </el-row>
  357. <el-divider></el-divider>
  358. <el-row :gutter="20">
  359. <el-col
  360. :span="12"
  361. v-show="contractForm.contractType!=1"
  362. >
  363. <div class="head-font">合同段权限配置</div>
  364. <el-checkbox-group
  365. v-model="idList"
  366. class="martop15"
  367. >
  368. <el-checkbox
  369. :label="item.contractId"
  370. :key="key"
  371. v-for="(item,key) in checkList"
  372. >{{ item.contractName }}
  373. </el-checkbox>
  374. </el-checkbox-group>
  375. </el-col>
  376. <el-col :span="12">
  377. <div class="head-font">组卷归档默认信息</div>
  378. <el-row class="martop15">
  379. <el-col :span="12">
  380. <el-form-item
  381. label="立卷人"
  382. prop="filer"
  383. >
  384. <el-input v-model="contractForm.filer"></el-input>
  385. </el-form-item>
  386. </el-col>
  387. <el-col :span="12">
  388. <!-- <el-form-item
  389. label="保管期限"
  390. prop="storagePeriod"
  391. >
  392. <el-select
  393. v-model="contractForm.storagePeriod"
  394. placeholder="请选择"
  395. class="w-100p"
  396. >
  397. <el-option
  398. v-for="item in storagePeriodList"
  399. :key="item.id"
  400. :label="item.dictValue"
  401. :value="item.dictKey"
  402. ></el-option>
  403. </el-select>
  404. </el-form-item> -->
  405. <el-form-item
  406. label="卷盒规格"
  407. prop="specification"
  408. >
  409. <el-select v-model="contractForm.specification" clearable placeholder="请选择" style="width:100%">
  410. <el-option v-for="item in coilsize" :key="item.value" :label="item.label" :value="item.value" />
  411. </el-select>
  412. </el-form-item>
  413. </el-col>
  414. </el-row>
  415. <el-row>
  416. <el-col :span="12">
  417. <el-form-item
  418. label="审核人"
  419. prop="reviewer"
  420. >
  421. <el-input v-model="contractForm.reviewer"></el-input>
  422. </el-form-item>
  423. </el-col>
  424. <el-col :span="12">
  425. <el-form-item
  426. label="保管密级"
  427. prop="securityLevel"
  428. >
  429. <el-select
  430. v-model="contractForm.securityLevel"
  431. placeholder="请选择"
  432. class="w-100p"
  433. >
  434. <el-option
  435. v-for="item in securityLevelList"
  436. :key="item.id"
  437. :label="item.dictValue"
  438. :value="item.dictKey"
  439. ></el-option>
  440. </el-select>
  441. </el-form-item>
  442. </el-col>
  443. </el-row>
  444. <el-row>
  445. <el-col :span="12">
  446. <el-form-item
  447. label="档案前缀"
  448. prop="prefix"
  449. >
  450. <el-input v-model="contractForm.prefix"></el-input>
  451. </el-form-item>
  452. </el-col>
  453. <el-col :span="12">
  454. </el-col>
  455. </el-row>
  456. </el-col>
  457. <el-col :span="12" v-if="contractForm.contractType==1||contractForm.contractType==2">
  458. <div class="head-font">附加信息</div>
  459. <el-form-item label="项目地址" prop="projectPlace">
  460. <!-- <el-input v-model="contractForm.projectPlace" placeholder="点击后面地图选取地址">
  461. <el-button slot="append" icon="el-icon-map-location" @click="mapDialogVisible = true"></el-button>
  462. </el-input> -->
  463. <avue-input-map :params="params" placeholder="请选择地图" v-model="flageData" @change="mapChange"></avue-input-map>
  464. </el-form-item>
  465. <el-form-item label="起始桩号" prop="startStation" v-if="contractForm.contractType==1">
  466. <el-input v-model="contractForm.startStation"></el-input>
  467. </el-form-item>
  468. <el-form-item label="结束桩号" prop="endStation" v-if="contractForm.contractType==1">
  469. <el-input v-model="contractForm.endStation"></el-input>
  470. </el-form-item>
  471. <el-form-item label="里程" v-if="contractForm.contractType==1">
  472. <el-input v-model="contractForm.projectMileage" >
  473. <template slot="append">公里(KM)</template>
  474. </el-input>
  475. </el-form-item>
  476. </el-col>
  477. </el-row>
  478. <el-divider></el-divider>
  479. <el-row >
  480. <el-col :span="24" style="overflow-x: auto;">
  481. <div class="head-font">计量信息</div>
  482. <table class="table-form" style="width: 100%; border: 1px solid #DCDFE6; font-size: 14px;" border="1" cellspacing="5" cellpadding="10">
  483. <tbody>
  484. <tr class=" bg bor">
  485. <td colspan="2">动员预付款</td>
  486. <td colspan="4">材料预付款</td>
  487. <td colspan="2">保留金信息</td>
  488. <td colspan="2">农民工工资保证金(元)</td>
  489. <td colspan="2">整体结算比例(%)</td>
  490. <td colspan="2">农民工工资专户</td>
  491. </tr>
  492. <tr >
  493. <td >
  494. 总额(元)
  495. </td>
  496. <td >
  497. <el-input v-model="meterContractInfo.dyTotalAmount" placeholder="请输入" type="number" :controls="false" :min="0"></el-input>
  498. </td>
  499. <td >
  500. 预付款限额(元)
  501. </td>
  502. <td >
  503. <el-input v-model="meterContractInfo.clAdvancePaymentQuota" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  504. </td>
  505. <td >
  506. 开户银行
  507. </td>
  508. <td >
  509. <el-input v-model="meterContractInfo.bankOfDeposit" placeholder="请输入" style="width: 180px;"></el-input>
  510. </td>
  511. <td >
  512. 保留金比列 (%)
  513. </td>
  514. <td >
  515. <el-input v-model="meterContractInfo.blReserveFundsRatio" placeholder="请输入" :controls="false" :min="0"></el-input type="number">
  516. </td>
  517. <td >
  518. 保证金起扣点(元)
  519. </td>
  520. <td >
  521. <el-input v-model="meterContractInfo.nmSdStartDeductPoint" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  522. </td>
  523. <td >
  524. 中期计量总体支付比例(%)
  525. </td>
  526. <td >
  527. <el-input v-model="meterContractInfo.middlePayRatio" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  528. </td>
  529. <td >
  530. 农民工工资专户 开户银行
  531. </td>
  532. <td >
  533. <el-input v-model="meterContractInfo.farmersBank" placeholder="请输入" ></el-input>
  534. </td>
  535. </tr>
  536. <tr >
  537. <td >
  538. 起扣点(元)
  539. </td>
  540. <td >
  541. <el-input v-model="meterContractInfo.dyStartDeductPoint" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  542. </td>
  543. <td >
  544. 隔几期扣回 (期)
  545. </td>
  546. <td >
  547. <el-input v-model="meterContractInfo.clIntervalDeduct" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  548. </td>
  549. <td >
  550. 银行账号
  551. </td>
  552. <td >
  553. <el-input v-model="meterContractInfo.bankAccountNumber" placeholder="请输入" ></el-input>
  554. </td>
  555. <td >
  556. 起扣点(元)
  557. </td>
  558. <td >
  559. <el-input v-model="meterContractInfo.blStartDeductPoint" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  560. </td>
  561. <td >
  562. 保证金比列 (%)
  563. </td>
  564. <td>
  565. <el-input v-model="meterContractInfo.nmSdRatio" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  566. </td>
  567. <td >
  568. 7d强度支付比例 (%)
  569. </td>
  570. <td>
  571. <el-input v-model="meterContractInfo.sevenRatio" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  572. </td>
  573. <td >
  574. 农民工工资专户 银行账号
  575. </td>
  576. <td >
  577. <el-input v-model="meterContractInfo.farmersBankAccountNumber" placeholder="请输入" ></el-input>
  578. </td>
  579. </tr>
  580. <tr >
  581. <td >
  582. 全额扣回点(元)
  583. </td>
  584. <td >
  585. <el-input type="number" v-model="meterContractInfo.dyFullDeductPoint" placeholder="请输入" :controls="false" :min="0"></el-input>
  586. </td>
  587. <td >
  588. 从第几期起扣 (期)
  589. </td>
  590. <td >
  591. <el-input v-model="meterContractInfo.clFromIntervalDeduct" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  592. </td>
  593. <td >
  594. 银行账户名称
  595. </td>
  596. <td >
  597. <el-input v-model="meterContractInfo.bankAccountName" placeholder="请输入"></el-input>
  598. </td>
  599. <td >
  600. 累计扣回限额(元)
  601. </td>
  602. <td >
  603. <el-input v-model="meterContractInfo.blTotalDeductQuota" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  604. </td>
  605. <td >
  606. 保证金扣回限额(元)
  607. </td>
  608. <td>
  609. <el-input v-model="meterContractInfo.nmTotalDeductQuota" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  610. </td>
  611. <td >
  612. 28d强度支付比例 (%)
  613. </td>
  614. <td>
  615. <el-input v-model="meterContractInfo.twentyEightRatio" placeholder="请输入" :controls="false" :min="0" type="number"></el-input>
  616. </td>
  617. <td >
  618. 农民工工资专户 银行账户名称
  619. </td>
  620. <td >
  621. <el-input v-model="meterContractInfo.farmersBankAccountName" placeholder="请输入" ></el-input>
  622. </td>
  623. </tr>
  624. <tr>
  625. <td rowspan="2">扣回比列(%)</td>
  626. <td rowspan="2"> <el-input v-model="meterContractInfo.dyDeductRatio" placeholder="请输入" class="maxinp" :controls="false" :min="0" type="number"></el-input></td>
  627. <td >预付款比列 (%)</td>
  628. <td colspan="3"> <el-input v-model="meterContractInfo.clPrepaymentRatio" placeholder="请输入" :controls="false" :min="0" type="number"></el-input></td>
  629. <td>预扣农民工工资保证金(元)</td>
  630. <td > <el-input v-model="meterContractInfo.nmPayDepositWithheld" placeholder="请输入" :controls="false" :min="0" type="number"></el-input></td>
  631. </tr>
  632. <tr>
  633. <td >扣回比列 (%)</td>
  634. <td colspan="5"><el-input v-model="meterContractInfo.clDeductRatio" placeholder="请输入" :controls="false" :min="0" type="number"></el-input></td>
  635. </tr>
  636. </tbody>
  637. </table>
  638. </el-col>
  639. </el-row>
  640. </el-form>
  641. </div>
  642. </el-tab-pane>
  643. <el-tab-pane
  644. v-if="contractForm.contractType == 1"
  645. label="分配WBS"
  646. name="2"
  647. :disabled="btnLoad"
  648. >
  649. <div>
  650. <div
  651. v-if="!wbsId"
  652. class="text-align-c"
  653. >项目暂未分配wbs树
  654. </div>
  655. <tree-tree
  656. :left-tree-data="leftTreeData"
  657. ref="treetotree"
  658. @onAddTree="treeChang"
  659. @onDelTree="treeChang"
  660. :leftloading="leftloading"
  661. :rightloading="rightloading"
  662. :isNoAdd="contractForm.templateType == 2"
  663. ></tree-tree>
  664. </div>
  665. </el-tab-pane>
  666. <el-tab-pane
  667. label="分配项目人员"
  668. name="3"
  669. :disabled="btnLoad"
  670. >
  671. <div>
  672. <div class="flex jc-al-c">
  673. <span class="mg-r-10">项目名称</span>
  674. <el-input
  675. v-model="projectInfo.projectName"
  676. disabled
  677. style="width:300px;margin-right:30px;"
  678. ></el-input>
  679. <span class="mg-r-10">合同段名称</span>
  680. <el-input
  681. v-model="contractForm.contractName"
  682. disabled
  683. style="width:300px;"
  684. ></el-input>
  685. </div>
  686. <el-divider></el-divider>
  687. <div class="flex jc-al-c mg-b-10">
  688. <div>
  689. <span class="mg-r-10">角色方</span>
  690. <el-radio-group v-model="rId">
  691. <el-radio-button
  692. v-for="(item,key) in roleList"
  693. :label="item.id"
  694. :key="key"
  695. >{{ item.roleName }}
  696. </el-radio-button>
  697. </el-radio-group>
  698. </div>
  699. <div>
  700. <span class="mg-r-10 mg-l-20">请选择岗位</span>
  701. <el-select
  702. v-model="postId"
  703. filterable
  704. placeholder="请输入搜索"
  705. >
  706. <el-option
  707. v-for="item in postList"
  708. :key="item.id"
  709. :label="item.roleName"
  710. :value="item.id"
  711. ></el-option>
  712. </el-select>
  713. </div>
  714. </div>
  715. <!-- table表 -->
  716. <div>
  717. <el-table
  718. :data="contractUserList"
  719. border
  720. height="420"
  721. style="width: 100%"
  722. >
  723. <el-table-column
  724. prop="name"
  725. label="姓名"
  726. align="center"
  727. ></el-table-column>
  728. <el-table-column
  729. prop="account"
  730. label="登录账号"
  731. align="center"
  732. ></el-table-column>
  733. <el-table-column
  734. prop="password"
  735. label="密码"
  736. align="center"
  737. ></el-table-column>
  738. <el-table-column
  739. label="操作"
  740. align="center"
  741. >
  742. <template slot-scope="scope">
  743. <el-link
  744. class="mg-r-20"
  745. type="primary"
  746. @click="copyAccPas(scope.row)"
  747. >复制
  748. </el-link>
  749. <el-link
  750. class="mg-r-20"
  751. type="primary"
  752. @click="resetPassword(scope.row)"
  753. >重置密码
  754. </el-link>
  755. <el-link
  756. type="danger"
  757. @click="handleDelete(scope.$index, scope.row)"
  758. >删除
  759. </el-link>
  760. </template>
  761. </el-table-column>
  762. </el-table>
  763. <el-input
  764. v-model="copyText"
  765. ref="copyInput"
  766. type="textarea"
  767. style='opacity: 0;position: absolute;height:1px;overflow:hidden;'
  768. ></el-input>
  769. </div>
  770. <div class="martop10 flexEnd">
  771. <el-pagination
  772. background
  773. @size-change="handleSizeChange"
  774. @current-change="handleCurrentChange"
  775. :current-page.sync="pageindx"
  776. :page-size="pagesize"
  777. layout="total, prev, pager, next"
  778. :total="total"
  779. >
  780. </el-pagination>
  781. </div>
  782. <div class="flex jc-al-c mg-t-20">
  783. <span>添加项目人员</span>
  784. <el-select
  785. class="marleft10"
  786. v-model="userId"
  787. filterable
  788. placeholder="请输入搜索"
  789. >
  790. <el-option
  791. v-for="item in userList"
  792. :key="item.id"
  793. :label="item.name"
  794. :value="item.id"
  795. ></el-option>
  796. </el-select>
  797. <el-button
  798. class="marleft10"
  799. type="success"
  800. @click="addUserToProject"
  801. >添加
  802. </el-button>
  803. <el-button
  804. type="primary"
  805. @click="rputerPush()"
  806. >创建新用户
  807. </el-button>
  808. <el-button
  809. type="danger"
  810. @click="handleDeletes"
  811. >全部删除
  812. </el-button>
  813. </div>
  814. <el-divider></el-divider>
  815. </div>
  816. </el-tab-pane>
  817. </el-tabs>
  818. <div class="flexEnd marbottom20">
  819. <el-button
  820. :type="activeType != 3?'info':'success'"
  821. size="medium"
  822. :disabled="saveBtnDisabled || leftloading || rightloading"
  823. :loading="saveBtnLoad"
  824. @click="saveQuit"
  825. >保存并退出</el-button>
  826. <el-button
  827. type="info"
  828. size="medium"
  829. :disabled="saveBtnBackDisabled || leftloading || rightloading"
  830. :loading="saveBtnBackLoad"
  831. v-if="activeType != 1"
  832. @click="saveNext('p')"
  833. >保存并返回上一步</el-button>
  834. <el-button
  835. type="success"
  836. size="medium"
  837. :disabled="saveBtnNextDisabled || leftloading || rightloading"
  838. :loading="saveBtnNextLoad"
  839. v-if="activeType != 3"
  840. @click="saveNext('n')"
  841. >保存并进入下一步</el-button>
  842. </div>
  843. </div>
  844. </basic-container>
  845. </template>
  846. <script>
  847. import {getProjectDeatil, findProjectTree, treeAllConstruction, getContractRelation} from "@/api/manager/projectinfo";
  848. import {
  849. submitContractInfo,
  850. getContractInfo,
  851. getContractInfo2,
  852. delFileFromUrl,
  853. searchRole,
  854. findAllUserByCondition,
  855. findUserList,
  856. saveUserInfoByProjectTow,
  857. removeUsersByIds,
  858. resetPasswordByUserId,
  859. submitWbsTreeInContract,
  860. getContractInfoTree
  861. } from "@/api/manager/contractinfo";
  862. import {getDictionary} from "@/api/system/dict";
  863. import {getDictionary as getDictbiz} from "@/api/system/dictbiz";
  864. import {remove as removeFile} from "@/api/resource/attach";
  865. import website from '@/config/website';
  866. import {Base64} from 'js-base64';
  867. import {getToken} from '@/util/auth';
  868. import {mapGetters} from "vuex";
  869. import treeTree from "@/components/tree-tree/main"
  870. export default {
  871. components: {
  872. treeTree
  873. },
  874. data() {
  875. var checkPlace = (rule, value, callback) => {
  876. if (this.flageData && this.flageData.length > 2 && this.flageData[2]) {
  877. callback();
  878. } else {
  879. callback(new Error('请选取项目地址'));
  880. }
  881. }
  882. var checkDate = (rule, value, callback) => {
  883. if (value && this.contractForm.planStartTime) {
  884. if (Date.parse(value) < Date.parse(this.contractForm.planStartTime)) {
  885. callback(new Error('计划完工日期不能小于开工日期'));
  886. }
  887. }
  888. callback();
  889. };
  890. var checkDate2 = (rule, value, callback) => {
  891. if (value && this.contractForm.actualStartTime) {
  892. if (Date.parse(value) < Date.parse(this.contractForm.actualStartTime)) {
  893. callback(new Error('实际完工日期不能小于开工日期'));
  894. }
  895. }
  896. callback();
  897. };
  898. var checkIsNumber = (rule, value, callback) => {
  899. if (value != Number(value)) {
  900. callback(new Error('金额必须是数字'));
  901. }
  902. callback();
  903. };
  904. return {
  905. isShowDq: true,
  906. idList: [],
  907. checkList: [],
  908. postIdss: '',
  909. //#region
  910. pageindx: 1,
  911. pagesize: 10,
  912. total: 0,
  913. //#endregion
  914. activeType: '1',
  915. typeChang: {
  916. 1: false,
  917. 2: false,
  918. 3: false,
  919. },
  920. btnLoad: false,
  921. saveBtnLoad: false,
  922. saveBtnDisabled: false,
  923. saveBtnBackLoad: false,
  924. saveBtnBackDisabled: false,
  925. saveBtnNextLoad: false,
  926. saveBtnNextDisabled: false,
  927. pid: '',
  928. cid: '',
  929. projectInfo: {},
  930. contractTypeList: [],
  931. storagePeriodList: [],//保管期限
  932. securityLevelList: [],//保管密级
  933. fileList: [],
  934. headers: {},
  935. isBackShow: false,
  936. contractForm: {
  937. contractType: 1,
  938. contractAmount: 0,
  939. isElectronicSignature: 0,
  940. isTestModule: 0,
  941. isReferenceNumber: 0,
  942. isOverMeter:0
  943. // isCopyData: 0,
  944. },
  945. contractRules: {
  946. contractName: [
  947. {required: true, message: '请输入合同段名称', trigger: 'blur'},
  948. ],
  949. contractType: [
  950. {required: true, message: '请选择合同段类型', trigger: 'change'}
  951. ],
  952. // contractNumber: [
  953. // {required: true, message: '请输入合同段编号', trigger: 'blur'},
  954. // ],
  955. isElectronicSignature: [
  956. {required: true, message: '请设置电签状态', trigger: 'change'},
  957. ],
  958. isTestModule: [
  959. {required: true, message: '请设置试验模块状态', trigger: 'change'},
  960. ],
  961. isTestRecord: [
  962. {required: true, message: '请设置是否强制引用记录/报告编号', trigger: 'change'},
  963. ],
  964. isReferenceNumber: [
  965. {required: true, message: '请设置是否引用编号', trigger: 'change'},
  966. ],
  967. // isCopyData: [
  968. // {required: true, message: '请设置是否复制数据', trigger: 'change'},
  969. // ],
  970. contractorUnitName: [
  971. {required: true, message: '请输入业主单位名称', trigger: 'blur'},
  972. ],
  973. constructionUnitName: [
  974. {required: true, message: '请输入施工单位名称', trigger: 'blur'},
  975. ],
  976. supervisionUnitName: [
  977. {required: true, message: '请输入监理单位名称', trigger: 'blur'},
  978. ],
  979. startStation: [
  980. {required: true, message: '请输入起始桩号', trigger: 'blur'},
  981. ],
  982. endStation: [
  983. {required: true, message: '请输入结束桩号', trigger: 'blur'},
  984. ],
  985. isOverMeter: [
  986. {required: true, message: '选择是否允许超计', trigger: 'blur'},
  987. ],
  988. projectPlace: [
  989. {required: true, validator: checkPlace, trigger: 'blur'},
  990. ],
  991. planEndTime: [
  992. {validator: checkDate, trigger: 'blur'},
  993. ],
  994. actualEndTime: [
  995. {validator: checkDate2, trigger: 'blur'},
  996. ],
  997. contractAmount: [
  998. {validator: checkIsNumber, trigger: 'blur'}
  999. ],
  1000. templateType: [
  1001. { required: true, message: '请选择模板引用', trigger: 'blur' },
  1002. ]
  1003. },
  1004. mapDialogVisible: false,
  1005. params: {
  1006. zoom: 10,
  1007. // zoomEnable: false,
  1008. // dragEnable: false,
  1009. },
  1010. flageData: [],
  1011. rId: '',
  1012. roleList: [],
  1013. postId: '',
  1014. postList: [],
  1015. contractUserList: [],
  1016. userId: '',
  1017. userList: [],
  1018. copyText: '',
  1019. wbsId: '',
  1020. leftTreeData: [],
  1021. leftloading:false,
  1022. rightloading:false,
  1023. meterContractInfo:{
  1024. dyStartDeductPoint:null,
  1025. dyTotalAmount:null,
  1026. clAdvancePaymentQuota:null,
  1027. bankOfDeposit:null,
  1028. blReserveFundsRatio:null,
  1029. nmSdStartDeductPoint:null,
  1030. clIntervalDeduct:null,
  1031. bankAccountNumber:null,
  1032. blStartDeductPoint:null,
  1033. nmSdRatio:null,
  1034. dyFullDeductPoint:null,
  1035. clFromIntervalDeduct:null,
  1036. bankAccountName:null,
  1037. blTotalDeductQuota:null,
  1038. nmTotalDeductQuota:null,
  1039. dyDeductRatio:null,
  1040. clPrepaymentRatio:null,
  1041. nmPayDepositWithheld:null,
  1042. clDeductRatio:null,
  1043. farmersBankAccountName:null,
  1044. farmersBankAccountNumber:null,
  1045. farmersBank:null,
  1046. middlePayRatio:null,
  1047. sevenRatio: null,
  1048. twentyEightRatio: null,
  1049. },//计量合同段管理相关信息
  1050. coilsize:[
  1051. { label: '30mm', value: '30' },
  1052. { label: '40mm', value: '40' },
  1053. { label: '50mm', value: '50' },
  1054. { label: '60mm', value: '60' },
  1055. ]
  1056. }
  1057. },
  1058. computed: {
  1059. ...mapGetters(["userInfo"]),
  1060. },
  1061. watch: {
  1062. contractForm: {
  1063. handler: function () { // 此处注意,handler函数不能为箭头函数,this会取上下文,而不是组件里的this,此外,深度监听,必须为handler函数名,否则会无效果
  1064. this.typeChang['1'] = true;
  1065. },
  1066. deep: true
  1067. },
  1068. activeType: async function (newValue) {
  1069. if (newValue == '3') {
  1070. this.getUserByName();
  1071. this.searchRole()
  1072. } else if (newValue == '2') {
  1073. await this.getLeftTree();
  1074. this.getRightTree();
  1075. }
  1076. },
  1077. rId: function () {
  1078. this.postIdss = ''
  1079. this.postId = ''
  1080. this.contractUserList = [];//从超级管理员,切到其他角色,不会清空列表
  1081. this.roleList.forEach(val => {
  1082. if (val.id === this.rId) {
  1083. if (val.children) {
  1084. this.postList = val.children
  1085. this.postId = this.postList[0].id;//切换的时候默认选中第一个岗位
  1086. } else {
  1087. this.postList = []
  1088. }
  1089. if (val.roleName === '超级管理员') {
  1090. this.postIdss = this.rId
  1091. this.findAllUserByCondition(this.rId)
  1092. }
  1093. }
  1094. })
  1095. },
  1096. postId: function (newValue) {
  1097. if (newValue) {
  1098. this.findAllUserByCondition();
  1099. } else {
  1100. this.contractUserList = [];
  1101. }
  1102. },
  1103. 'contractForm.contractType'(newValue) {
  1104. if (newValue != 1) {
  1105. this.treeAllConstruction()
  1106. }
  1107. }
  1108. },
  1109. created() {
  1110. this.init();
  1111. //console.log(this.userInfo)
  1112. let hostName= window.location.hostname;
  1113. console.log(hostName,'hostName');
  1114. if(hostName==='183.247.216.148'){
  1115. this.isShowDq=false//183显示认证设置
  1116. }else{
  1117. this.isShowDq=true
  1118. }
  1119. },
  1120. mounted() {
  1121. this.$nextTick(() => {
  1122. this.typeChang = {
  1123. 1: false,
  1124. 2: false,
  1125. 3: false,
  1126. }
  1127. })
  1128. },
  1129. methods: {
  1130. //#region //后加分页
  1131. handleSizeChange(val) {
  1132. this.pagesize = val
  1133. this.findAllUserByCondition()
  1134. },
  1135. handleCurrentChange(val) {
  1136. this.pageindx = val
  1137. this.findAllUserByCondition()
  1138. },
  1139. rputerPush() {
  1140. this.$router.push({
  1141. path: '/system/user',
  1142. query: {tankai: true}
  1143. })
  1144. },
  1145. //#endregion
  1146. //#region 甘云杰
  1147. async searchRole() {
  1148. const {data: res} = await searchRole()
  1149. console.log(res);
  1150. if (res.code === 200) {
  1151. this.roleList = res.data
  1152. }
  1153. },
  1154. async init() {
  1155. this.pid = this.$route.query.pid;
  1156. this.cid = this.$route.query.cid;
  1157. this.contractForm.contractType=this.$route.query.contractType
  1158. await this.getContractTypeList();//获取合同类型
  1159. if (!this.cid) {
  1160. this.contractForm.pid = this.pid;
  1161. } else {
  1162. if (this.$route.query.contractType == 1 || this.$route.query.contractType == 4 || this.$route.query.contractType == 8) {
  1163. await this.getContractInfo();//获取合同段基本信息
  1164. } else if (this.$route.query.contractType == 2 || this.$route.query.contractType == 3) {
  1165. await this.getContractInfo2()
  1166. await this.getContractRelation(); //监理、业主关联施工
  1167. }
  1168. }
  1169. await this.getProjectDeatil();//获取项目详情
  1170. if (this.$route.query.type) {
  1171. console.log(this.$route.query.type);
  1172. this.activeType = this.$route.query.type;
  1173. }
  1174. this.getSecurityLevelList();//获取安全等级
  1175. this.setHeaders();
  1176. },
  1177. beforeLeave(activeName, oldActiveName) {
  1178. return new Promise((resolve, reject) => {
  1179. if (oldActiveName == '1' && !this.contractForm.id) {
  1180. this.$message({
  1181. type: "warning",
  1182. message: "请先保存合同段后,再进行合同段的分配"
  1183. });
  1184. reject();
  1185. }
  1186. if (this.typeChang[oldActiveName]) {
  1187. this.$confirm('检测到新编辑内容, 是否保存?', '提示', {
  1188. confirmButtonText: '确定',
  1189. cancelButtonText: '不用',
  1190. type: 'warning'
  1191. }).then(() => {
  1192. switch (oldActiveName) {
  1193. case '1':
  1194. this.savecontract().then((res) => {
  1195. this.contractForm.id = res.data.data.id;
  1196. this.typeChang[oldActiveName] = false;
  1197. resolve();
  1198. this.$message({
  1199. type: "success",
  1200. message: "保存成功!"
  1201. });
  1202. });
  1203. break;
  1204. case '2':
  1205. this.saveWbsTree().then(() => {
  1206. this.typeChang[oldActiveName] = false;
  1207. resolve();
  1208. this.$message({
  1209. type: "success",
  1210. message: "保存成功!"
  1211. });
  1212. }).catch(() => {
  1213. this.getRightTree();
  1214. reject();
  1215. })
  1216. break;
  1217. }
  1218. }).catch(() => {
  1219. this.typeChang[oldActiveName] = false;
  1220. resolve();
  1221. })
  1222. } else {
  1223. resolve();
  1224. }
  1225. })
  1226. },
  1227. getProjectDeatil() {
  1228. return new Promise((resolve) => {
  1229. getProjectDeatil(this.pid).then((res) => {
  1230. this.projectInfo = res.data.data;
  1231. this.wbsId = this.projectInfo.referenceWbsTemplateId;
  1232. resolve();
  1233. }).finally(() => {
  1234. resolve();
  1235. })
  1236. })
  1237. },
  1238. getContractRelation() {
  1239. return new Promise((resolve) => {
  1240. getContractRelation(this.cid).then((res) => {
  1241. console.log("ids", res)
  1242. this.idList = res.data.data && res.data.data.map(item => {
  1243. return item.id
  1244. })
  1245. resolve();
  1246. }).finally(() => {
  1247. resolve();
  1248. })
  1249. })
  1250. },
  1251. getContractInfo() {
  1252. return new Promise((resolve) => {
  1253. getContractInfo(this.cid).then((res) => {
  1254. this.contractForm = res.data.data;
  1255. if (this.contractForm.startFileUrl) {
  1256. this.isBackShow = true;
  1257. }
  1258. if (this.contractForm.projectPlace) {
  1259. this.flageData = ['', '', this.contractForm.projectPlace]
  1260. }
  1261. if (Number(this.contractForm.contractAmount) < 0) {
  1262. this.contractForm.contractAmount = 0;
  1263. }
  1264. if (Number(this.contractForm.securityLevel) < 0) {
  1265. this.contractForm.securityLevel = 0;
  1266. }
  1267. // if (Number(this.contractForm.storagePeriod) < 0) {
  1268. // this.contractForm.storagePeriod = 0;
  1269. // }
  1270. this.meterContractInfo = this.contractForm.meterContractInfo
  1271. ||{
  1272. dyStartDeductPoint:null,
  1273. dyTotalAmount:null,
  1274. clAdvancePaymentQuota:null,
  1275. bankOfDeposit:null,
  1276. blReserveFundsRatio:null,
  1277. nmSdStartDeductPoint:null,
  1278. clIntervalDeduct:null,
  1279. bankAccountNumber:null,
  1280. blStartDeductPoint:null,
  1281. nmSdRatio:null,
  1282. dyFullDeductPoint:null,
  1283. clFromIntervalDeduct:null,
  1284. bankAccountName:null,
  1285. blTotalDeductQuota:null,
  1286. nmTotalDeductQuota:null,
  1287. dyDeductRatio:null,
  1288. clPrepaymentRatio:null,
  1289. nmPayDepositWithheld:null,
  1290. clDeductRatio:null,
  1291. farmersBankAccountName:null,
  1292. farmersBankAccountNumber:null,
  1293. farmersBank:null,
  1294. middlePayRatio:null,
  1295. sevenRatio: null,
  1296. twentyEightRatio: null,
  1297. }
  1298. this.$nextTick(() => {
  1299. this.typeChang['1'] = false;
  1300. })
  1301. }).finally(() => {
  1302. resolve();
  1303. })
  1304. })
  1305. },
  1306. getContractInfo2() {
  1307. return new Promise((resolve) => {
  1308. getContractInfo2({id: this.cid, contractType: this.contractType}).then((res) => {
  1309. this.contractForm = res.data.data.contractInfo
  1310. if (res.data.data.wbsTreeContractList.length > 0) {
  1311. this.idList = []
  1312. res.data.data.wbsTreeContractList.forEach(val => {
  1313. if (val.contractIdRelation) {
  1314. this.idList.push(val.contractIdRelation)
  1315. }
  1316. })
  1317. }
  1318. if (this.contractForm.startFileUrl) {
  1319. this.isBackShow = true;
  1320. }
  1321. if (this.contractForm.projectPlace) {
  1322. this.flageData = ['', '', this.contractForm.projectPlace]
  1323. }
  1324. if (Number(this.contractForm.contractAmount) < 0) {
  1325. this.contractForm.contractAmount = 0;
  1326. }
  1327. if (Number(this.contractForm.securityLevel) < 0) {
  1328. this.contractForm.securityLevel = 0;
  1329. }
  1330. // if (Number(this.contractForm.storagePeriod) < 0) {
  1331. // this.contractForm.storagePeriod = 0;
  1332. // }
  1333. this.meterContractInfo=res.data.data.meterContractInfo
  1334. ||{
  1335. dyStartDeductPoint:null,
  1336. dyTotalAmount:null,
  1337. clAdvancePaymentQuota:null,
  1338. bankOfDeposit:null,
  1339. blReserveFundsRatio:null,
  1340. nmSdStartDeductPoint:null,
  1341. clIntervalDeduct:null,
  1342. bankAccountNumber:null,
  1343. blStartDeductPoint:null,
  1344. nmSdRatio:null,
  1345. dyFullDeductPoint:null,
  1346. clFromIntervalDeduct:null,
  1347. bankAccountName:null,
  1348. blTotalDeductQuota:null,
  1349. nmTotalDeductQuota:null,
  1350. dyDeductRatio:null,
  1351. clPrepaymentRatio:null,
  1352. nmPayDepositWithheld:null,
  1353. clDeductRatio:null,
  1354. farmersBankAccountName:null,
  1355. farmersBankAccountNumber:null,
  1356. farmersBank:null,
  1357. middlePayRatio:null,
  1358. sevenRatio: null,
  1359. twentyEightRatio: null,
  1360. }
  1361. this.$nextTick(() => {
  1362. this.typeChang['1'] = false;
  1363. })
  1364. }).finally(() => {
  1365. resolve();
  1366. })
  1367. })
  1368. },
  1369. async saveQuit() {
  1370. this.btnLoad = true;
  1371. this.saveBtnLoad = true;
  1372. this.saveBtnBackDisabled = true
  1373. this.saveBtnNextDisabled = true
  1374. try {
  1375. if (this.activeType == '1') {
  1376. await this.savecontract();
  1377. } else if (this.activeType == '2') {
  1378. await this.saveWbsTree();
  1379. }
  1380. } catch (error) {
  1381. this.btnLoad = false;
  1382. this.saveBtnLoad = false;
  1383. this.saveBtnBackDisabled = false
  1384. this.saveBtnNextDisabled = false
  1385. if(this.activeType == '2'){
  1386. this.getRightTree();
  1387. }
  1388. return;
  1389. }
  1390. this.$message({
  1391. type: "success",
  1392. message: "保存成功!"
  1393. });
  1394. this.btnLoad = false;
  1395. this.saveBtnLoad = false;
  1396. this.saveBtnBackDisabled = false
  1397. this.saveBtnNextDisabled = false
  1398. this.$router.go(-1);
  1399. },
  1400. async saveNext(type) {
  1401. this.btnLoad = true;
  1402. if (type == 'n') {
  1403. this.saveBtnNextLoad = true;
  1404. this.saveBtnBackDisabled = true
  1405. this.saveBtnDisabled = true
  1406. } else if (type == 'p') {
  1407. this.saveBtnBackLoad = true;
  1408. this.saveBtnNextDisabled = true
  1409. this.saveBtnDisabled = true
  1410. }
  1411. try {
  1412. if (this.activeType == '1') {
  1413. let res = await this.savecontract();
  1414. this.contractForm.id = res.data.data.id;
  1415. } else if (this.activeType == '2') {
  1416. await this.saveWbsTree();
  1417. }
  1418. } catch (error) {
  1419. this.btnLoad = false;
  1420. if (type == 'n') {
  1421. this.saveBtnNextLoad = false;
  1422. this.saveBtnBackDisabled = false
  1423. this.saveBtnDisabled = false
  1424. } else if (type == 'p') {
  1425. this.saveBtnBackLoad = false;
  1426. this.saveBtnNextDisabled = false
  1427. this.saveBtnDisabled = false
  1428. }
  1429. if(this.activeType == '2'){
  1430. this.getRightTree();
  1431. }
  1432. return;
  1433. }
  1434. this.$message({
  1435. type: "success",
  1436. message: "保存成功!"
  1437. });
  1438. this.typeChang[this.activeType] = false;
  1439. let num = Number(this.activeType);
  1440. if (this.contractForm.contractType == 1) {
  1441. if (type == 'n') {
  1442. num++;
  1443. } else if (type == 'p') {
  1444. num--;
  1445. }
  1446. } else {
  1447. if (type == 'n') {
  1448. num = num + 2;
  1449. } else if (type == 'p') {
  1450. num = num - 2
  1451. }
  1452. }
  1453. this.activeType = num.toString();
  1454. this.btnLoad = false;
  1455. if (type == 'n') {
  1456. this.saveBtnNextLoad = false;
  1457. this.saveBtnBackDisabled = false
  1458. this.saveBtnDisabled = false
  1459. } else if (type == 'p') {
  1460. this.saveBtnBackLoad = false;
  1461. this.saveBtnNextDisabled = false
  1462. this.saveBtnDisabled = false
  1463. }
  1464. },
  1465. getIds() {
  1466. },
  1467. savecontract() {
  1468. return new Promise((resolve, reject) => {
  1469. this.$refs['contractForm'].validate((valid) => {
  1470. if (valid) {
  1471. if (this.flageData.length == 3) {
  1472. this.contractForm.projectPlace = this.flageData[2];
  1473. }
  1474. let das = this.contractForm
  1475. das.meterContractInfo = this.meterContractInfo
  1476. if (this.contractForm.contractType != 1) {
  1477. delete das.startStation
  1478. delete das.endStation
  1479. //delete das.projectPlace
  1480. das.idList = []
  1481. this.idList.forEach(val => {
  1482. das.idList.push({contractId: val})
  1483. })
  1484. resolve(submitContractInfo(das))
  1485. this.btnLoad = false
  1486. } else {
  1487. resolve(submitContractInfo(das))
  1488. this.btnLoad = false
  1489. }
  1490. } else {
  1491. reject('验证失败')
  1492. this.btnLoad = false
  1493. }
  1494. })
  1495. })
  1496. },
  1497. handleRemove(file) {
  1498. //console.log(file, fileList);
  1499. removeFile(file.response.data.attachId).then(() => {
  1500. this.contractForm.startFileUrl = '';
  1501. })
  1502. },
  1503. handleExceed() {
  1504. this.$message.warning(`当前限制选择 1 个文件,请先移除后,再次上传`);
  1505. },
  1506. handleSuccess(res) {
  1507. this.contractForm.startFileUrl = res.data.link;
  1508. },
  1509. setHeaders() {
  1510. this.headers['Authorization'] = `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`;
  1511. this.headers[website.tokenHeader] = 'bearer ' + getToken()
  1512. },
  1513. downloadFile() {
  1514. window.open(this.contractForm.startFileUrl);
  1515. },
  1516. delFile() {
  1517. this.$confirm('是否删除该文件?', '删除开工令', {
  1518. distinguishCancelAndClose: true,
  1519. confirmButtonText: '删除',
  1520. cancelButtonText: '取消'
  1521. }).then(() => {
  1522. delFileFromUrl(this.contractForm.startFileUrl).then(() => {
  1523. this.isBackShow = false;
  1524. this.contractForm.startFileUrl = '';
  1525. })
  1526. })
  1527. },
  1528. addUserToProject() {
  1529. if (!this.userId) {
  1530. this.$message({
  1531. type: "warning",
  1532. message: "请先选择用户再进行添加"
  1533. });
  1534. return;
  1535. }
  1536. let roleId = ''
  1537. if (!this.postIdss) {
  1538. if (!this.postId) {
  1539. this.$message({
  1540. type: "warning",
  1541. message: "请先选择岗位再进行添加"
  1542. });
  1543. return;
  1544. } else {
  1545. roleId = this.postId
  1546. }
  1547. } else {
  1548. roleId = this.postIdss
  1549. }
  1550. let list = [{
  1551. projectId: this.pid,
  1552. contractId: this.contractForm.id,
  1553. userId: this.userId,
  1554. roleId: roleId,
  1555. }];
  1556. saveUserInfoByProjectTow(list).then(() => {
  1557. this.findAllUserByCondition(this.rId);
  1558. })
  1559. },
  1560. findAllUserByCondition(val) {
  1561. let rId
  1562. if (this.postId) {
  1563. rId = this.postId
  1564. } else {
  1565. rId = val
  1566. }
  1567. findAllUserByCondition({
  1568. cId: this.contractForm.id,
  1569. pId: this.pid,
  1570. // "postId": this.postId,
  1571. rId: rId,
  1572. },
  1573. this.pagesize,
  1574. this.pageindx,
  1575. ).then((res) => {
  1576. this.contractUserList = res.data.data.records;
  1577. this.total = res.data.data.total
  1578. })
  1579. },
  1580. handleDelete(index, row) {
  1581. this.$confirm('是否将该用户移除出合同段', '提示', {
  1582. confirmButtonText: '确定',
  1583. cancelButtonText: '取消',
  1584. type: 'warning'
  1585. }).then(() => {
  1586. removeUsersByIds(row.id).then(() => {
  1587. this.contractUserList.splice(index, 1);
  1588. this.$message({
  1589. type: "success",
  1590. message: "删除成功!"
  1591. });
  1592. })
  1593. })
  1594. },
  1595. handleDeletes() {
  1596. this.$confirm('是否将所有用户移除出合同段', '提示', {
  1597. confirmButtonText: '确定',
  1598. cancelButtonText: '取消',
  1599. type: 'warning'
  1600. }).then(() => {
  1601. let ids = [];
  1602. this.contractUserList.forEach((element) => {
  1603. ids.push(element.id);
  1604. })
  1605. removeUsersByIds(ids.join(',')).then(() => {
  1606. this.contractUserList = [];
  1607. this.$message({
  1608. type: "success",
  1609. message: "删除成功!"
  1610. });
  1611. })
  1612. })
  1613. },
  1614. copyAccPas(row) {
  1615. this.copyText = `姓名:${row.name}
  1616. 账号:${row.account}
  1617. 密码:${row.password}`;
  1618. this.$nextTick(() => {
  1619. this.$refs.copyInput.select()
  1620. document.execCommand('copy')
  1621. this.$message({
  1622. type: "success",
  1623. message: "成功复制在剪贴板!"
  1624. });
  1625. })
  1626. },
  1627. resetPassword(row) {
  1628. this.$confirm('是否将用户【' + row.name + '】密码重置为123456', '提示', {
  1629. confirmButtonText: '确定',
  1630. cancelButtonText: '取消',
  1631. type: 'warning'
  1632. }).then(() => {
  1633. resetPasswordByUserId(row.uid).then(() => {
  1634. row.password = '123456';
  1635. this.$message({
  1636. type: "success",
  1637. message: "重置成功!"
  1638. });
  1639. })
  1640. })
  1641. },
  1642. getContractTypeList() {
  1643. if (this.contractTypeList.length > 1) {
  1644. return;
  1645. }
  1646. getDictionary({
  1647. code: 'contract_type'
  1648. }).then((res) => {
  1649. res.data.data.forEach(element => {
  1650. element.dictKey = Number(element.dictKey)
  1651. });
  1652. this.contractTypeList = res.data.data;
  1653. })
  1654. },
  1655. getUserByName() {
  1656. findUserList('').then((res) => {
  1657. this.userList = res.data.data;
  1658. })
  1659. },
  1660. getLeftTree() {
  1661. return new Promise((resolve) => {
  1662. if (!this.leftTreeData.length) {
  1663. this.leftloading = true;
  1664. findProjectTree(this.projectInfo.id, this.wbsId).then((res) => {
  1665. if (Array.isArray(res.data.data)) {
  1666. this.leftTreeData = res.data.data;
  1667. } else {
  1668. this.leftTreeData = [];
  1669. }
  1670. resolve();
  1671. }).finally(() => {
  1672. this.leftloading = false;
  1673. resolve();
  1674. })
  1675. }
  1676. resolve();
  1677. })
  1678. },
  1679. getRightTree() {
  1680. console.log(this.wbsId, this.projectInfo.id, this.contractForm.id);
  1681. if(this.wbsId){
  1682. this.rightloading = true;
  1683. getContractInfoTree(this.wbsId, this.projectInfo.id, this.contractForm.id).then((res) => {
  1684. if (Array.isArray(res.data.data)) {
  1685. this.$refs.treetotree.setRightTree(res.data.data);
  1686. }
  1687. this.rightloading = false;
  1688. })
  1689. }
  1690. },
  1691. saveWbsTree() {
  1692. let obj = {};
  1693. let ids = this.$refs.treetotree.getTreeAllId('rightTree');
  1694. obj = {
  1695. wbsId: this.wbsId,
  1696. projectId: this.projectInfo.id,
  1697. contractId: this.contractForm.id,
  1698. wbsTreeIds: ids
  1699. }
  1700. return submitWbsTreeInContract(obj);
  1701. },
  1702. treeChang() {
  1703. this.typeChang[2] = true;
  1704. },
  1705. mapChange() {
  1706. this.$refs['contractForm'].validateField('projectPlace');
  1707. },
  1708. getSecurityLevelList() {
  1709. if (this.securityLevelList.length > 1) {
  1710. return;
  1711. }
  1712. getDictbiz({
  1713. code: 'security_level'
  1714. }).then((res) => {
  1715. res.data.data.forEach(element => {
  1716. element.dictKey = Number(element.dictKey)
  1717. });
  1718. this.securityLevelList = res.data.data;
  1719. })
  1720. },
  1721. //#endregion
  1722. //#region 合同段信息
  1723. async treeAllConstruction() {
  1724. const {data: res} = await treeAllConstruction({projectId: this.$route.query.pid,contractType:this.contractForm.contractType})
  1725. console.log(res);
  1726. if (res.code == 200) {
  1727. this.checkList = res.data
  1728. }
  1729. },
  1730. //#endregion
  1731. }
  1732. };
  1733. </script>
  1734. <style scoped lang="scss">
  1735. .bm-view {
  1736. width: 100%;
  1737. height: 300px;
  1738. }
  1739. .head-font {
  1740. font-size: 20px;
  1741. font-weight: bold;
  1742. }
  1743. .table-form{
  1744. margin-top: 10px;
  1745. box-sizing: border-box;
  1746. .bg{
  1747. background: rgb(239, 239, 239);
  1748. }
  1749. }
  1750. .bor{
  1751. line-height: 40px;
  1752. text-align: center;
  1753. box-sizing: border-box;
  1754. }
  1755. </style>
  1756. <style  lang="scss">
  1757. .maxinp{
  1758. .el-input__inner{
  1759. height: 80px;
  1760. }
  1761. }
  1762. </style>
  1763. </style>