detail.vue 61 KB

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