detailsPage.vue 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487
  1. <template>
  2. <div class="borderless">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  6. @click="backToList">返回列表
  7. </el-button>
  8. <div class="upper_right_button">
  9. <el-button type="success"
  10. size="small"
  11. class="el-button--small-yh "
  12. :loading="buttonLoading"
  13. :disabled="!form.id || viewDisabled"
  14. @click.stop="mainCheck">
  15. 请核
  16. </el-button>
  17. <!-- <el-dropdown style="padding: 0 8px;line-height: 0">-->
  18. <!-- <el-button-->
  19. <!-- type="success"-->
  20. <!-- :loading="buttonLoading"-->
  21. <!-- :disabled="!form.id || viewDisabled"-->
  22. <!-- size="small"-->
  23. <!-- >-->
  24. <!-- 业务处理<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
  25. <!-- </el-button>-->
  26. <!-- <el-dropdown-menu slot="dropdown">-->
  27. <!-- <el-dropdown-item-->
  28. <!-- :loading="buttonLoading"-->
  29. <!-- :disabled="!form.id"-->
  30. <!-- @click.native="createData()">创建单据-->
  31. <!-- </el-dropdown-item>-->
  32. <!-- <el-dropdown-item-->
  33. <!-- :loading="buttonLoading"-->
  34. <!-- :disabled="!form.id"-->
  35. <!-- @click.native="copyData()">复制单据-->
  36. <!-- </el-dropdown-item>-->
  37. <!-- </el-dropdown-menu>-->
  38. <!-- </el-dropdown>-->
  39. <el-button class="el-button--small-yh "
  40. type="primary"
  41. :loading="buttonLoading"
  42. @click.stop="editMainProject"
  43. size="small"
  44. >保存数据
  45. </el-button>
  46. </div>
  47. </div>
  48. </div>
  49. <div class="customer-main">
  50. <containerTitle title="基础信息"></containerTitle>
  51. <basic-container>
  52. <avue-form class="trading-form" ref="form" v-model="form" :option="option">
  53. <template slot="corpId">
  54. <crop-select
  55. v-model="form.corpId"
  56. corpType="KG"
  57. :disabled="viewDisabled"
  58. style="width: 100%"
  59. ></crop-select>
  60. </template>
  61. <template slot="corpAttn">
  62. <el-select
  63. v-model="form.corpAttn"
  64. :disabled="viewDisabled"
  65. icon="el-icon-edit"
  66. remote
  67. filterable
  68. clearable
  69. :remote-method="corpAttnRemoteMethod"
  70. >
  71. <el-option
  72. v-for="item in corpAttnDic"
  73. :key="item.value"
  74. :label="item.realName"
  75. :value="item.realName">
  76. </el-option>
  77. </el-select>
  78. </template>
  79. <template slot="salesName">
  80. <el-select
  81. v-model="form.salesName"
  82. :disabled="viewDisabled"
  83. remote
  84. filterable
  85. clearable
  86. :remote-method="salesNameRemoteMethod"
  87. >
  88. <el-option
  89. v-for="item in salesNameDic"
  90. :key="item.value"
  91. :label="item.realName"
  92. :value="item.realName">
  93. </el-option>
  94. </el-select>
  95. </template>
  96. <template slot="sourceBusiness">
  97. <el-select
  98. v-model="form.sourceBusiness"
  99. :disabled="viewDisabled"
  100. filterable
  101. clearable
  102. >
  103. <el-option
  104. v-for="(item,index) in sourceBusinessDic"
  105. :key="index"
  106. :label="item.dictValue"
  107. :value="item.dictValue">
  108. </el-option>
  109. </el-select>
  110. </template>
  111. <template slot="remark">
  112. <el-input type="textarea"
  113. v-model="form.remark"
  114. size="small"
  115. rows="6"
  116. autocomplete="off"
  117. placeholder="">
  118. </el-input>
  119. </template>
  120. </avue-form>
  121. </basic-container>
  122. <containerTitle title="明细列表"></containerTitle>
  123. <basic-container>
  124. <avue-crud
  125. ref="crud"
  126. :data="data"
  127. :option="optionTable"
  128. :table-loading="loading"
  129. v-model="optionFrom"
  130. @row-del="rowDel"
  131. @row-save="rowSave"
  132. @row-update="rowUpdate"
  133. @size-change="sizeChange"
  134. @current-change="currentChange"
  135. @selection-change="selectionChange"
  136. @search-change="searchChange"
  137. @saveColumn="saveColumn"
  138. >
  139. <template slot="menuLeft">
  140. <el-tabs v-model="activeName" @tab-click="handleClick">
  141. <el-tab-pane label="原始数据" name="first" :key="'first'">
  142. </el-tab-pane>
  143. <el-tab-pane label="追加" name="second" :key="'second'">
  144. </el-tab-pane>
  145. <el-tab-pane label="退款" name="three" :key="'three'">
  146. </el-tab-pane>
  147. </el-tabs>
  148. <el-button type="primary"
  149. size="small"
  150. icon="el-icon-plus"
  151. :disabled="viewDisabled"
  152. @click="serviceDialog = true">录入明细
  153. </el-button>
  154. </template>
  155. <!-- <el-button type="info"-->
  156. <!-- size="small"-->
  157. <!-- v-if="false"-->
  158. <!-- :disabled="crudSelection == 0"-->
  159. <!-- @click.stop="beforePleaseCheck()">请 核-->
  160. <!-- </el-button>-->
  161. <!-- </template>-->
  162. <template slot-scope="{row,index}" slot="menu">
  163. <el-button
  164. v-if="row.status !== 5"
  165. type="text"
  166. size="small"
  167. @click="beforeCloseAccount(row)"
  168. >结算</el-button>
  169. <el-button
  170. v-if="row.status === 5"
  171. type="text"
  172. size="small"
  173. :disabled="viewDisabled"
  174. @click="cancelCloseAccount(row)"
  175. >取消结算</el-button>
  176. <el-button
  177. type="text"
  178. size="small"
  179. @click="rowCellTwo(row,index)"
  180. :disabled="row.strStatus == '结算完成' || viewDisabled"
  181. >{{row.$cellEdit?'修改完成':'修改'}}</el-button>
  182. <el-button
  183. type="text"
  184. size="small"
  185. @click="rowDel(row,index)"
  186. :disabled="row.strStatus == '结算完成' || viewDisabled"
  187. >删除</el-button>
  188. </template>
  189. <template slot="userid" slot-scope="{row,index}">
  190. <span v-if="row.$cellEdit" class="required_fields">*</span>
  191. <user-select
  192. style="width:90% !important;"
  193. v-if="row.$cellEdit"
  194. v-model="row.userName"
  195. @value="(values) => value(values,row)"
  196. :configuration="UConfiguration"
  197. >
  198. </user-select>
  199. <span v-else>{{ row.userName }}</span>
  200. </template>
  201. <template slot="amount" slot-scope="{ row }">
  202. <el-input
  203. v-if="row.$cellEdit"
  204. v-model="row.amount"
  205. placeholder="请输入"
  206. size="small"
  207. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  208. @change="totalChange(row,'金额')"
  209. ></el-input>
  210. <span v-else>{{ row.amount }}</span>
  211. </template>
  212. <template slot="serviceCharge" slot-scope="{ row }">
  213. <el-input
  214. v-if="row.$cellEdit"
  215. v-model="row.serviceCharge"
  216. placeholder="请输入"
  217. size="small"
  218. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  219. @input="costCount(row)"
  220. @change="totalChange(row,'服务')"
  221. ></el-input>
  222. <span v-else>{{ row.serviceCharge }}</span>
  223. </template>
  224. <template slot="matMoney" slot-scope="{ row }">
  225. <el-input
  226. v-if="row.$cellEdit"
  227. v-model="row.matMoney"
  228. placeholder="请输入"
  229. size="small"
  230. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  231. @input="costCount(row)"
  232. @change="totalChange(row,'代垫')"
  233. ></el-input>
  234. <span v-else>{{ row.matMoney }}</span>
  235. </template>
  236. </avue-crud>
  237. </basic-container>
  238. <containerTitle title="补充信息"></containerTitle>
  239. <basic-container>
  240. <el-form :model="formTwo" ref="formTwo" label-width="100px" class="demo-ruleForm">
  241. <el-row>
  242. <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:6" :key="index">
  243. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  244. <el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="formTwo[item.prop]" size="small" type="datetime" :disabled="item.disabled?true:false || viewDisabled" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
  245. <el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="formTwo[item.prop]" size="small" type="date" :disabled="viewDisabled" placeholder="选择日期" value-format="yyyy-MM-dd"/>
  246. <el-input type="textarea" v-else-if="(item.prop === 'remark')" v-model="formTwo[item.prop]" :disabled="viewDisabled" size="small" autocomplete="off" placeholder="请输入"></el-input>
  247. <el-input type="age" v-else-if="item.prop === 'debitAmount'" v-model="formTwo[item.prop]" @change="debitChange" :disabled="item.disabled?true:false || viewDisabled" size="small" autocomplete="off" placeholder="请输入">
  248. <template slot="append">元</template>
  249. </el-input>
  250. <el-input type="age" v-else-if="item.type === 'unit'" v-model="formTwo[item.prop]" :disabled="item.disabled?true:false || viewDisabled" size="small" autocomplete="off" placeholder="请输入">
  251. <template slot="append">元</template>
  252. </el-input>
  253. <el-input type="age" v-else v-model="formTwo[item.prop]" :disabled="item.disabled?true:false || viewDisabled" size="small" value="0" autocomplete="off" placeholder="请输入">
  254. <template v-if="item.prop === 'advanceAmount'||item.prop === 'settlmentAmount'||item.prop === 'balanceAmount'" slot="append">元</template>
  255. </el-input>
  256. </el-form-item>
  257. </el-col>
  258. </el-row>
  259. </el-form>
  260. </basic-container>
  261. <containerTitle title="附件上传"></containerTitle>
  262. <basic-container style="margin-bottom: 40px">
  263. <avue-crud
  264. :option="upLoadOption"
  265. v-model="upLoadForm"
  266. :data="upLoadData"
  267. @row-save="upLoadSave"
  268. @row-update="upLoadUpdate"
  269. @row-del="upLoadDel"
  270. ></avue-crud>
  271. </basic-container>
  272. </div>
  273. <el-dialog
  274. title="导入服务项目"
  275. append-to-body
  276. class="el-dialogDeep"
  277. :visible.sync="serviceDialog"
  278. width="70%"
  279. :close-on-click-modal="false"
  280. :destroy-on-close="true"
  281. :close-on-press-escape="false">
  282. <el-row style="height: 0;">
  283. <el-col :span="5" >
  284. <div>
  285. <el-scrollbar>
  286. <basic-container>
  287. <avue-tree :option="serviceTreeOption" @node-click="serviceNodeClick"/>
  288. </basic-container>
  289. </el-scrollbar>
  290. </div>
  291. </el-col>
  292. <el-col :span="19">
  293. <basic-container>
  294. <avue-crud ref="serviceCrud"
  295. :page.sync="servicePage"
  296. :search.sync="serviceSearch"
  297. :option="serviceOption"
  298. :table-loading="serviceLoading"
  299. :data="serviceData"
  300. @refresh-change="serviceRefreshChange"
  301. @selection-change="serviceSelectionChange"
  302. @search-change="serviceSearchChange"
  303. @on-load="serviceOnLoad">
  304. </avue-crud>
  305. </basic-container>
  306. </el-col>
  307. </el-row>
  308. <span slot="footer" class="dialog-footer">
  309. <el-button type="primary" @click="serviceConfirm()" :disabled="this.serviceSelectList.length == 0">导 入</el-button>
  310. <el-button @click="serviceDialog = false">取 消</el-button>
  311. </span>
  312. </el-dialog>
  313. <el-dialog
  314. title="导入用户"
  315. :visible.sync="userDialog"
  316. class="el-dialogDeep"
  317. append-to-body
  318. width="80%">
  319. <el-row style="margin-top: -5px;height: 0">
  320. <el-col :span="5">
  321. <div class="box">
  322. <el-scrollbar>
  323. <basic-container>
  324. <avue-tree :option="userTreeOption" :data="userTreeData" @node-click="userNodeClick"/>
  325. </basic-container>
  326. </el-scrollbar>
  327. </div>
  328. </el-col>
  329. <el-col :span="19">
  330. <basic-container>
  331. <avue-crud ref="userCrud"
  332. :option="userOption"
  333. :data="userDataList"
  334. :table-loading="userLoading"
  335. :page.sync="userPage"
  336. v-model="userForm"
  337. @search-change="userSearchChange"
  338. @search-reset="userSearchReset"
  339. @refresh-change="userRefreshChange"
  340. @selection-change="userSelectionChange"
  341. @on-load="userOnLoad"
  342. >
  343. </avue-crud>
  344. </basic-container>
  345. </el-col>
  346. </el-row>
  347. <span slot="footer" class="dialog-footer">
  348. <el-button @click="userDialog = false">取 消</el-button>
  349. <el-button type="primary" :disabled="this.userSelection.length == 1 ? false:true" @click="userConfirm" >确 定</el-button>
  350. </span>
  351. </el-dialog>
  352. <el-dialog
  353. title="流程"
  354. append-to-body
  355. class="el-dialogDeep"
  356. :visible.sync="processDialog"
  357. width="60%"
  358. :close-on-click-modal="false"
  359. :destroy-on-close="true"
  360. :modal-append-to-body='false'
  361. :close-on-press-escape="false"
  362. v-dialog-drag
  363. >
  364. <examine-approve
  365. :itemId ="itemId"
  366. :closeFun="dialogProcessClose"
  367. >
  368. </examine-approve>
  369. </el-dialog>
  370. <el-dialog
  371. title="结算"
  372. append-to-body
  373. class="el-dialogDeep"
  374. :visible.sync="accountDialog"
  375. width="25%"
  376. :close-on-click-modal="false"
  377. :destroy-on-close="true"
  378. :close-on-press-escape="false">
  379. <el-form :model="accountFormData" ref="accountFormData">
  380. <el-form-item label="账户名称" class="landConFrom-input" prop="accountName" :rules="rules">
  381. <el-input v-model="accountFormData.accountName" style="width: 220px;" size="small" clearable placeholder="请输入" ></el-input>
  382. </el-form-item>
  383. <el-form-item label="结算日期" class="landConFrom-input" prop="payTime" :rules="rules">
  384. <el-date-picker type="date" v-model="accountFormData.payTime" value-format="yyyy-MM-dd HH:mm:ss" size="small" clearable placeholder="日期" ></el-date-picker>
  385. </el-form-item>
  386. </el-form>
  387. <span slot="footer" style="display: flex; justify-content: center">
  388. <el-button @click.stop="accountDialog = false , accountFormData = {}" size="small">取 消</el-button>
  389. <el-button type="primary" size="small" @click="closeAccount('accountFormData')">结算</el-button>
  390. </span>
  391. </el-dialog>
  392. </div>
  393. </template>
  394. <script>
  395. import option from "./configuration/detailsPage.json";
  396. import startOption from "./configuration/startDialog.json";
  397. import { projectDetail,editMianProject,settleAccounts,getSysNo,masterCheck} from "@/api/workManagement/mainProject";
  398. //上传文件json
  399. import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
  400. //服务列表接口
  401. import {getServiceProjectList,getServiceTypeTree,} from "@/api/workManagement/serviceProject";
  402. import serviceOption from "./configuration/serviceDialogList.json";
  403. //用户组件
  404. import userOption from "./configuration/userList.json";
  405. import { getList } from "@/api/system/user";
  406. import { getDeptLazyTree} from "@/api/system/dept";
  407. //上传附件删除
  408. import { corpsbank } from "@/api/basicData/configuration"
  409. //事务
  410. import examineApprove from "@/components/examineApprove/index";
  411. //对象数组比较
  412. import { contrastObj,contrastList } from "@/util/contrastData";
  413. import _ from "lodash";
  414. import { getUserList } from "@/api/workManagement/mainProject";
  415. import optionAdd from "../receipt/configuration/settleAccountsDetailsADD.json";
  416. import optionReturn from "../receipt/configuration/settleAccountsDetailsReturn.json";
  417. export default {
  418. props: {
  419. detailData: {
  420. type: Object
  421. }
  422. },
  423. data() {
  424. return {
  425. id:'',
  426. loading: false,
  427. form:{},
  428. formTwo:{},
  429. optionFrom:{},
  430. account:{},
  431. data:[],
  432. dataList:[],
  433. crudSelection:[],
  434. corpAttnDic:[],
  435. salesNameDic:[],
  436. sourceBusinessDic:[],
  437. buttonLoading:false,
  438. viewDisabled:false,
  439. deptDicData:[],//任务部门数据
  440. serviceDialog:false,//服务导入窗口
  441. userDialog:false,//用户导入窗口
  442. accountDialog:false,//结算窗口
  443. //客户组件配置控制
  444. UConfiguration:{
  445. multipleChoices:false,
  446. multiple:false,
  447. disabled:false,
  448. searchShow:true,
  449. collapseTags:false,
  450. placeholder:'请点击右边按钮选择',
  451. dicData:[]
  452. },
  453. detailsSelect: {},
  454. //顶部from数据
  455. option: {
  456. menuBtn: false,
  457. labelWidth: 100,
  458. column: [
  459. {
  460. label: '项目名称',
  461. prop: 'cname',
  462. span: 12,
  463. rules: [
  464. {
  465. required: true,
  466. message: ' ',
  467. trigger: 'blur'
  468. }
  469. ]
  470. },
  471. {
  472. label: '客户名称',
  473. prop: 'corpId',
  474. span: 12,
  475. rules: [
  476. {
  477. required: true,
  478. message: ' ',
  479. trigger: 'blur'
  480. }
  481. ]
  482. },
  483. {
  484. label: '责任人',
  485. prop: 'corpAttn',
  486. span: 6,
  487. rules: [
  488. {
  489. required: true,
  490. message: ' ',
  491. trigger: 'blur'
  492. }
  493. ]
  494. },
  495. {
  496. label: '承揽人',
  497. prop: 'salesName',
  498. span: 6,
  499. rules: [
  500. {
  501. required: true,
  502. message: ' ',
  503. trigger: 'blur'
  504. }
  505. ]
  506. },
  507. {
  508. label: '业务来源',
  509. prop: 'sourceBusiness',
  510. span: 6,
  511. rules: [
  512. {
  513. required: true,
  514. message: ' ',
  515. trigger: 'blur'
  516. }
  517. ]
  518. },
  519. {
  520. label: '备注',
  521. span: 24,
  522. minRows: 6,
  523. prop: 'remark'
  524. }
  525. ],
  526. },
  527. basicData: {
  528. column: [
  529. {
  530. label: '合同金额',
  531. prop: 'debitAmount',
  532. rules: [
  533. {
  534. required: false,
  535. message: ' ',
  536. trigger: 'blur'
  537. },
  538. {
  539. pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  540. message: ' ',
  541. trigger: 'blur'
  542. },
  543. ]
  544. },
  545. {
  546. label: '首付金额',
  547. prop: 'advanceAmount',
  548. type:'unit',
  549. rules: [
  550. {
  551. pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  552. message: ' ',
  553. trigger: 'blur'
  554. }
  555. ]
  556. },
  557. {
  558. label: '已收金额',
  559. prop: 'settlmentAmount',
  560. disabled: true,
  561. type:'unit',
  562. },
  563. {
  564. label: '未收金额',
  565. type:'unit',
  566. prop: 'balanceAmount',
  567. disabled: true,
  568. },
  569. {
  570. label: '总服务费',
  571. prop: 'serviceCharge',
  572. type:'unit',
  573. disabled: true,
  574. rules: [
  575. {
  576. pattern:/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  577. message: ' ',
  578. trigger: 'blur'
  579. }
  580. ]
  581. },
  582. {
  583. label: '总代垫费',
  584. prop: 'matMoney',
  585. type:'unit',
  586. disabled: true,
  587. rules: [
  588. {
  589. pattern:/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  590. message: ' ',
  591. trigger: 'blur'
  592. }
  593. ]
  594. },
  595. {
  596. label: '制单人',
  597. prop: 'createUserName',
  598. disabled: true
  599. }, {
  600. label: '制单日期',
  601. prop: 'createTime',
  602. type: 'datetime',
  603. valueFormat:"yyyy-MM-dd HH:mm:ss",
  604. format:"yyyy-MM-dd",
  605. disabled: true
  606. },
  607. {
  608. label: '电话',
  609. prop: 'corpTel',
  610. },
  611. {
  612. label: '收款方式',
  613. prop: 'paymentType',
  614. width: 120,
  615. },
  616. {
  617. label: '开始日期',
  618. prop: 'beginTime',
  619. valueFormat:"yyyy-MM-dd HH:mm:ss",
  620. format:"yyyy-MM-dd",
  621. type:'datetime',
  622. },
  623. {
  624. label: '结束日期',
  625. prop: 'endTime',
  626. valueFormat:"yyyy-MM-dd HH:mm:ss",
  627. format:"yyyy-MM-dd",
  628. type:'datetime',
  629. }
  630. ],
  631. },
  632. optionTable: option,
  633. //结算
  634. accountFormData:{},
  635. rules:[{
  636. required: true,
  637. message: ' ',
  638. trigger: 'blur'
  639. }
  640. ],
  641. //上传文件
  642. upLoadOption: upLoadOption,
  643. upLoadData:[],
  644. upLoadForm:{},
  645. //服务窗口定义
  646. serviceTreeOption: {
  647. nodeKey: 'id',
  648. lazy: true,
  649. treeLoad: function(node, resolve) {
  650. const parentId = node.level === 0 ? 0 : node.data.id;
  651. getServiceTypeTree(parentId).then(res => {
  652. resolve(
  653. res.data.data.map(item => {
  654. return {
  655. ...item,
  656. leaf: !item.hasChildren
  657. };
  658. })
  659. );
  660. });
  661. },
  662. addBtn: false,
  663. menu: false,
  664. size: 'small',
  665. props: {
  666. labelText: '标题',
  667. label: 'title',
  668. value: 'value',
  669. children: 'children'
  670. }
  671. },
  672. serviceOption:serviceOption,
  673. serviceLoading:false,
  674. serviceData:[],
  675. servicePage:{
  676. currentPage: 1,
  677. total: 0,
  678. pageSize: 10
  679. },
  680. serviceSearch:{},
  681. serviceTreeDeptId:"",
  682. serviceSelectList:[],
  683. //用户窗口定义
  684. userTreeOption: {
  685. nodeKey: 'id',
  686. lazy: true,
  687. treeLoad: function (node, resolve) {
  688. const parentId = (node.level === 0) ? 0 : node.data.id;
  689. getDeptLazyTree(parentId).then(res => {
  690. resolve(res.data.data.map(item => {
  691. return {
  692. ...item,
  693. leaf: !item.hasChildren
  694. }
  695. }))
  696. });
  697. },
  698. addBtn: false,
  699. menu: false,
  700. size: 'small',
  701. props: {
  702. labelText: '标题',
  703. label: 'title',
  704. value: 'value',
  705. children: 'children'
  706. }
  707. },
  708. userTreeData:[],
  709. userOption:userOption,
  710. userLoading:false,
  711. userDataList:[],
  712. userSelection:[],
  713. userTreeDeptId:"",
  714. userForm:{},
  715. userPage:{
  716. currentPage: 1,
  717. total: 0,
  718. pageSize: 10
  719. },
  720. itemId:'',
  721. //请核窗口定义
  722. processDialog:false,
  723. pleaseCheckContact:startOption,
  724. pleaseCheckLoading:false,
  725. pleaseCheckData:[],
  726. pleaseCheckPage:{
  727. pageSize: 10,
  728. currentPage: 1,
  729. total: 0
  730. },
  731. activeName: "first",
  732. tab1:true,
  733. tab2:false,
  734. tab3:false,
  735. secondDisable:0,
  736. data_one:[],
  737. data_two:[],
  738. data_three:[],
  739. //新旧数据比较
  740. oldData:[],
  741. oldUpLoadData:[],
  742. oldForm:{},
  743. oldFormTwo:{},
  744. };
  745. },
  746. created() {
  747. //承揽人 责任人 默认20条数据
  748. getUserList().then(res=>{
  749. res.data.data.map((item,index)=>{
  750. if(index <= 20){
  751. this.corpAttnDic.push(item)
  752. this.salesNameDic.push(item)
  753. }
  754. })
  755. })
  756. //字典值
  757. this.getWorkDicts("source_Business").then(res =>{
  758. this.sourceBusinessDic = res.data.data;
  759. })
  760. if(this.detailData.id){
  761. this.id = BigInt(this.detailData.id);//字符串转数字 超长用BigInt
  762. projectDetail(this.id,"0,1,2,3,4,5").then(res =>{
  763. this.afterEcho(res.data.data)
  764. })
  765. }else{
  766. //责任人 承揽人 默认当前登录人
  767. this.$set(this.formTwo,"corpAttn",this.$store.getters.userInfo.user_name)
  768. this.$set(this.formTwo,"salesName",this.$store.getters.userInfo.user_name)
  769. this.$set(this.formTwo,"debitAmount",0)
  770. this.$set(this.formTwo,"advanceAmount",0)
  771. this.$set(this.formTwo,"settlmentAmount",0)
  772. this.$set(this.formTwo,"balanceAmount",0)
  773. this.$set(this.formTwo,"createUserName", this.$store.getters.userInfo.user_name)
  774. let date = new Date();
  775. let strDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
  776. this.$set(this.formTwo,"createTime",strDate)
  777. }
  778. if(this.$route.query.itemId){
  779. this.id = this.$route.query.itemId
  780. projectDetail(this.id,"0,1,2,3,4,5").then(res =>{
  781. this.afterEcho(res.data.data)
  782. })
  783. }
  784. },
  785. components:{
  786. examineApprove
  787. },
  788. mounted() {
  789. },
  790. methods: {
  791. //明细切换tab
  792. handleClick(tab) {
  793. if(tab.name == "first") {
  794. this.tab1 = true;
  795. this.tab2 = false;
  796. this.tab3 = false;
  797. if(this.secondDisable === 1){
  798. this.data_two = this.data
  799. }
  800. if(this.secondDisable === 2){
  801. this.data_three = this.data
  802. }
  803. this.secondDisable = 0
  804. this.optionTable = option //换option
  805. this.data = this.data_one //切换数据
  806. } else if(tab.name == "second") {
  807. this.tab1 = false;
  808. this.tab2 = true;
  809. this.tab3 = false;
  810. if(this.secondDisable === 0){
  811. this.data_one = this.data
  812. }
  813. if(this.secondDisable === 2){
  814. this.data_three = this.data
  815. }
  816. this.secondDisable = 1
  817. this.optionTable = optionAdd
  818. this.data = this.data_two
  819. }else if(tab.name == "three") {
  820. this.tab1 = false;
  821. this.tab2 = false;
  822. this.tab3 = true;
  823. if(this.secondDisable === 0){
  824. this.data_one = this.data
  825. }
  826. if(this.secondDisable === 1){
  827. this.data_two = this.data
  828. }
  829. this.secondDisable = 2
  830. this.optionTable = optionReturn
  831. this.data = this.data_three
  832. }
  833. },
  834. //责任人 远程
  835. corpAttnRemoteMethod(val){
  836. getUserList({realName : val}).then(res=>{
  837. this.corpAttnDic = res.data.data
  838. })
  839. },
  840. //承揽人 远程
  841. salesNameRemoteMethod(val){
  842. getUserList({realName : val}).then(res=>{
  843. this.salesNameDic = res.data.data
  844. })
  845. },
  846. value(value,row){
  847. row.userid = value.id
  848. row.deptid = value.deptId
  849. },
  850. //合计
  851. totalChange(row,type){
  852. //明细列表金额合计
  853. if(this.secondDisable === 0){
  854. this.data_one = this.data
  855. }
  856. let amountList = this.data_one.map(item => {
  857. if(item.amount){
  858. return parseFloat(item.amount);
  859. }else return 0
  860. });
  861. //明细列表服务费合计
  862. let serviceChargeList = this.data.map(item => {
  863. if(item.serviceCharge){
  864. return parseFloat(item.serviceCharge);
  865. }else return 0
  866. });
  867. //明细列表代垫费合计
  868. let matMoneyList = this.data.map(item => {
  869. if(item.matMoney){
  870. return parseFloat(item.matMoney);
  871. }else return 0
  872. });
  873. if(type==='金额'){
  874. if(this.formTwo.debitAmount){
  875. if(this.formTwo.debitAmount < amountList.reduce((n,m) => n + m)){
  876. this.$message.error("明细列表合同金额不能大于总金额!")
  877. }
  878. }
  879. }
  880. // if(type==='服务'){
  881. // this.formTwo.serviceCharge = serviceChargeList.reduce((n,m) => n + m)
  882. // }
  883. // if(type==='代垫'){
  884. // this.formTwo.matMoney = matMoneyList.reduce((n,m) => n + m)
  885. // }
  886. if(row.serviceCharge && row.matMoney){
  887. if(row.amount < _.add(parseFloat(row.serviceCharge),parseFloat(row.matMoney))){
  888. this.$message.error("服务费代垫费不能超过合同金额!")
  889. row.serviceCharge = 0;
  890. row.matMoney = 0;
  891. }
  892. }
  893. },
  894. //费用计算计算
  895. costCount(row){
  896. if(row.serviceCharge && row.matMoney){
  897. row.amount = _.add(parseFloat(row.serviceCharge),parseFloat(row.matMoney));
  898. }
  899. },
  900. //删除列表后面的删除按钮触发触发(row, index, done)
  901. rowDel(row, index) {
  902. this.$confirm("确定将此明细删除?", {
  903. confirmButtonText: "确定",
  904. cancelButtonText: "取消",
  905. type: "warning"
  906. }).then(() => {
  907. this.data.splice(index,1)
  908. });
  909. },
  910. // 合同金额
  911. debitChange(val){
  912. if(val){
  913. if(!this.formTwo.settlmentAmount){
  914. this.$set(this.formTwo,"balanceAmount",val)
  915. }
  916. }
  917. },
  918. //打开结算窗口
  919. beforeCloseAccount(row){
  920. if(this.verificationData()){
  921. this.account = row;
  922. this.accountDialog = true;
  923. }
  924. },
  925. //结算
  926. closeAccount(form){
  927. this.$refs[form].validate((valid) => {
  928. if(valid){
  929. settleAccounts(this.account.id,5,
  930. this.accountFormData.accountName,
  931. this.accountFormData.payTime,).then(res =>{
  932. if(res.data.success){
  933. this.$message({
  934. type: "success",
  935. message: "操作成功!"
  936. });
  937. this.accountFormData = {},
  938. this.accountDialog = false;
  939. this.getProjectDetail();
  940. }
  941. })
  942. }
  943. })
  944. },
  945. cancelCloseAccount(row){
  946. this.$confirm("确认取消结算此明细?", {
  947. confirmButtonText: "确定",
  948. cancelButtonText: "取消",
  949. type: "warning"
  950. }).then(() => {
  951. settleAccounts(row.id,6).then(res =>{
  952. if(res.data.success){
  953. this.$message({
  954. type: "success",
  955. message: "操作成功!"
  956. });
  957. this.getProjectDetail();
  958. }
  959. })
  960. });
  961. },
  962. //请核
  963. mainCheck(){
  964. if(this.verificationData()){
  965. this.detailsCollection()
  966. for (let i = 0; i < this.dataList.length; i++) {
  967. if (this.dataList[i].strStatus !== "结算完成") {
  968. return this.$message.error(`明细列表存在未结算数据,请检查!`);
  969. }
  970. }
  971. masterCheck(this.form.id).then(res=>{
  972. if(res.data.success){
  973. this.$message.success("操作成功!")
  974. this.getProjectDetail();
  975. }
  976. })
  977. }
  978. //
  979. },
  980. getProjectDetail(){
  981. projectDetail(this.id,"0,1,2,3,4,5").then(res =>{
  982. this.afterEcho(res.data.data)
  983. })
  984. },
  985. //新增 修改
  986. editMainProject(type){
  987. this.$refs["form"].validate((valid) => {
  988. if(valid){
  989. this.detailsCollection()
  990. for (let i = 0; i < this.dataList.length; i++) {
  991. if (this.dataList[i].userid === (null || "")) {
  992. return this.$message.error(`请输入明细列表第${i + 1}行的承做人`);
  993. }
  994. if (this.dataList[i].deptid === (null || "")) {
  995. return this.$message.error(`请输入明细列表第${i + 1}行的任务部门`);
  996. }
  997. if (this.dataList[i].beginTime === (null || "")) {
  998. return this.$message.error(`请输入明细列表第${i + 1}行的开始日期`);
  999. }
  1000. if (this.dataList[i].actualDate === (null || "")) {
  1001. return this.$message.error(`请输入明细列表第${i + 1}行的结束`);
  1002. }
  1003. }
  1004. this.buttonLoading = true
  1005. const params = {
  1006. ...this.form,
  1007. ...this.formTwo,
  1008. itemList:this.dataList,
  1009. filesList:this.upLoadData
  1010. }
  1011. editMianProject(params).then(res =>{
  1012. if(res.data.success){
  1013. this.id = res.data.data
  1014. this.$message.success("操作成功!")
  1015. projectDetail(res.data.data,"0,1,2,3,4,5").then(res =>{
  1016. this.afterEcho(res.data.data)
  1017. })
  1018. }
  1019. }).finally(()=>{
  1020. this.buttonLoading = false
  1021. })
  1022. if(type === true){
  1023. this.$emit("goBack");
  1024. }
  1025. }
  1026. })
  1027. },
  1028. copyData(){
  1029. if(this.verificationData()){
  1030. delete this.form.id
  1031. delete this.formTwo.id
  1032. }
  1033. },
  1034. createData(){
  1035. if(this.verificationData()){
  1036. this.$confirm("确定创建新的单据吗?", "提示", {
  1037. confirmButtonText: "保存",
  1038. cancelButtonText: "取消",
  1039. type: "warning",
  1040. }).then(() => {
  1041. this.form = {}
  1042. this.oldForm = {}
  1043. this.formTwo = {}
  1044. this.oldFormTwo = {}
  1045. this.dataList = []
  1046. this.oldData = []
  1047. this.upLoadData = []
  1048. this.oldUpLoadData = []
  1049. this.$set(this.formTwo,"corpAttn",this.$store.getters.userInfo.user_name)
  1050. this.$set(this.formTwo,"salesName",this.$store.getters.userInfo.user_name)
  1051. this.$set(this.formTwo,"debitAmount",0)
  1052. this.$set(this.formTwo,"advanceAmount",0)
  1053. this.$set(this.formTwo,"settlmentAmount",0)
  1054. this.$set(this.formTwo,"balanceAmount",0)
  1055. this.$set(this.formTwo,"createUserName", this.$store.getters.userInfo.user_name)
  1056. let date = new Date();
  1057. let strDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
  1058. this.$set(this.formTwo,"createTime",strDate)
  1059. })
  1060. }
  1061. },
  1062. //明细合集
  1063. detailsCollection(){
  1064. if(this.secondDisable === 0){
  1065. this.data = this.data_one
  1066. }
  1067. if(this.secondDisable === 1){
  1068. this.data = this.data_two
  1069. }
  1070. if(this.secondDisable === 2){
  1071. this.data = this.data_three
  1072. }
  1073. this.dataList = []
  1074. this.dataList.push(...this.data_one,...this.data_two,...this.data_three)
  1075. },
  1076. afterEcho(data){
  1077. this.form = data;
  1078. this.viewDisabled = this.form.status !== 0? true : false
  1079. this.option.column.forEach(item =>{
  1080. if( item.prop == "cname" ){
  1081. this.$set(item,"disabled",this.viewDisabled)
  1082. }
  1083. })
  1084. this.formTwo = Object.assign({},data);
  1085. delete this.formTwo.cname;
  1086. delete this.formTwo.corpId;
  1087. delete this.formTwo.corpAttn;
  1088. delete this.formTwo.salesName;
  1089. delete this.formTwo.sourceBusiness;
  1090. delete this.formTwo.remark;
  1091. this.oldForm = Object.assign({},data);
  1092. this.oldFormTwo = Object.assign({},data);
  1093. if(data.itemList){
  1094. this.dataList = data.itemList;
  1095. this.oldData = this.deepClone(data.itemList)
  1096. //根据状态区分三种明细
  1097. this.data_one=this.dataList.filter(item=>item.projectType === 0)
  1098. this.data_two=this.dataList.filter(item=>item.projectType === 1)
  1099. this.data_three=this.dataList.filter(item=>item.projectType === 2)
  1100. //判断当前所处哪个明细下 给data赋值
  1101. if(this.secondDisable === 0){
  1102. this.data = this.data_one
  1103. }
  1104. if(this.secondDisable === 1){
  1105. this.data = this.data_two
  1106. }
  1107. if(this.secondDisable === 2){
  1108. this.data = this.data_three
  1109. }
  1110. }
  1111. if(data.filesList){
  1112. this.upLoadData = data.filesList
  1113. this.oldUpLoadData = this.deepClone(data.filesList)
  1114. }
  1115. },
  1116. verificationData(){
  1117. this.detailsCollection()
  1118. if(contrastObj(this.form,this.oldForm)||contrastObj(this.formTwo,this.oldFormTwo) || contrastList(this.dataList,this.oldData)
  1119. || contrastList(this.upLoadData,this.oldUpLoadData)
  1120. ) {
  1121. this.$confirm("数据发生变化,请先提交保存!", "提示", {
  1122. confirmButtonText: "保存",
  1123. cancelButtonText: "取消",
  1124. type: "warning",
  1125. }).then(() => {
  1126. this.editMainProject()
  1127. }).catch(()=>{
  1128. return false
  1129. })
  1130. }else{
  1131. return true
  1132. }
  1133. },
  1134. //点击修改或保存时触发
  1135. rowCellTwo(row,index){
  1136. this.$refs.crud.rowCell(row, index);
  1137. },
  1138. //选择时
  1139. selectionChange(row){
  1140. this.crudSelection = row;
  1141. },
  1142. //新增修改时保存触发
  1143. rowSave(row, done, loading) {
  1144. done()
  1145. },
  1146. rowUpdate(row, index, done, loading) {
  1147. done(row)
  1148. },
  1149. searchChange(params, done) {
  1150. this.getList(this.page, params);
  1151. done();
  1152. },
  1153. sizeChange(val) {
  1154. this.page.pageSize = val;
  1155. this.getList();
  1156. },
  1157. currentChange(val) {
  1158. this.page.currentPage = val;
  1159. this.getList();
  1160. },
  1161. saveColumn(row, column) {
  1162. console.log(row, column);
  1163. },
  1164. //上传文件保存
  1165. upLoadSave(row, done, loading){
  1166. this.upLoadData.push(row)
  1167. done()
  1168. },
  1169. //修改附件上传触发
  1170. upLoadUpdate(row, done){
  1171. done(row);
  1172. },
  1173. //删除附件上传触发
  1174. upLoadDel(row, index,){
  1175. this.$confirm("确定将选择数据删除?", {
  1176. confirmButtonText: "确定",
  1177. cancelButtonText: "取消",
  1178. type: "warning"
  1179. }).then(() => {
  1180. if (row.id){
  1181. corpsbank(row.id).then(res=>{
  1182. if(res.data.success){
  1183. this.$message({
  1184. type: "success",
  1185. message: "操作成功!"
  1186. });
  1187. this.bankOfDepositData.splice(index, 1);
  1188. }
  1189. })
  1190. }else {
  1191. this.$message({
  1192. type: "success",
  1193. message: "操作成功!"
  1194. });
  1195. this.bankOfDepositData.splice(index, 1);
  1196. }
  1197. })
  1198. },
  1199. //服务窗口事件
  1200. serviceNodeClick(data) {
  1201. this.serviceTreeDeptId = data.id;
  1202. this.serviceOnLoad(this.servicePage);
  1203. },
  1204. serviceRefreshChange(){
  1205. this.serviceOnLoad(this.servicePage, this.serviceSearch)
  1206. },
  1207. serviceSearchChange(params, done){
  1208. this.serviceOnLoad(this.servicePage, params)
  1209. done();
  1210. },
  1211. serviceSelectionChange(row){
  1212. this.serviceSelectList = row;
  1213. },
  1214. serviceOnLoad(page, params = {}) {
  1215. this.serviceLoading = true;
  1216. getServiceProjectList(page.currentPage, page.pageSize, params, this.serviceTreeDeptId).then(res => {
  1217. this.serviceData = res.data.data.records
  1218. this.servicePage.total = res.data.data.total
  1219. this.serviceLoading = false
  1220. })
  1221. },
  1222. serviceConfirm(){
  1223. if(this.serviceSelectList.length != 0){
  1224. this.serviceSelectList.forEach((item)=>{
  1225. const params = {
  1226. strStatus:"录入",
  1227. pname:item.cname,
  1228. remarks:item.remarks,
  1229. price:item.price,
  1230. unit:item.unit,
  1231. secondDisable:this.secondDisable,
  1232. frequency:item.rate,
  1233. projectType:this.secondDisable
  1234. }
  1235. this.$refs.crud.rowCellAdd(params);
  1236. this.$refs.crud.rowCell(item, this.optionFrom.length-1)
  1237. })
  1238. }
  1239. this.serviceSelectList = []
  1240. this.serviceDialog = false
  1241. this.$message({
  1242. type: "success",
  1243. message: "导入成功!"
  1244. });
  1245. },
  1246. //用户窗口事件
  1247. selectUser(row){
  1248. this.userDialog = true
  1249. this.detailsSelect = row.$index;
  1250. },
  1251. userSearchChange(params, done){
  1252. this.userOnLoad(this.userPage, params);
  1253. done()
  1254. },
  1255. userSearchReset(){
  1256. },
  1257. userRefreshChange(){
  1258. this.userOnLoad(this.userPage)
  1259. },
  1260. userSelectionChange(row){
  1261. this.userSelection = row;
  1262. },
  1263. userOnLoad(page,params={}){
  1264. this.userLoading = true;
  1265. getList(page.currentPage, page.pageSize, params, this.userTreeDeptId).then(res => {
  1266. this.userDataList = res.data.data.records
  1267. this.userPage.total = res.data.data.total
  1268. this.userLoading = false;
  1269. });
  1270. },
  1271. userNodeClick(data){
  1272. this.userTreeDeptId = data.id;
  1273. this.userOnLoad(this.userPage);
  1274. },
  1275. //确定
  1276. userConfirm(){
  1277. if(this.userSelection){
  1278. this.data[this.detailsSelect].userid = this.userSelection[0].id;
  1279. this.$set(this.data[this.detailsSelect],'userName',this.userSelection[0].realName)
  1280. this.userDialog = !this.userDialog
  1281. }
  1282. },
  1283. dialogProcessClose(){
  1284. this.processDialog = false
  1285. this.getProjectDetail()
  1286. },
  1287. //返回主营项目列表
  1288. backToList(){
  1289. this.detailsCollection()
  1290. if(contrastObj(this.form,this.oldForm) || contrastObj(this.formTwo,this.oldFormTwo) || contrastList(this.dataList,this.oldData)
  1291. || contrastList(this.upLoadData,this.oldUpLoadData)
  1292. ){
  1293. this.$confirm("当前页面有未保存数据,是否保存数据?", "提示", {
  1294. confirmButtonText: "保存",
  1295. cancelButtonText: "取消",
  1296. type: "warning",
  1297. }).then(() => {
  1298. this.editMainProject(true)
  1299. }).catch(()=>{
  1300. this.$emit("goBack");
  1301. })
  1302. }else{
  1303. this.$emit("goBack");
  1304. }
  1305. },
  1306. //1.0版本注释内容
  1307. // operationDetailList(itemList){
  1308. // this.data = itemList;
  1309. // this.oldData = this.deepClone(itemList)
  1310. // let status = [];
  1311. // this.data.forEach(item =>{
  1312. // item.status == 0 ? status.push(true) : status.push(false)
  1313. // })
  1314. // //如果 明细列表存在 请核之后的状态 禁止编辑一些输入框
  1315. // if(status.findIndex(item => item == false) == 0){
  1316. // this.basicData.column.forEach(item =>{
  1317. // if(item.prop == "code" || item.prop == "cname" || item.prop == "corpId" || item.prop == "debitAmount"){
  1318. // item.disabled = true
  1319. // this.configuration.disabled = true
  1320. // }
  1321. // })
  1322. // }else{
  1323. // this.basicData.column.forEach(item =>{
  1324. // if(item.prop == "code" || item.prop == "cname" || item.prop == "corpId" || item.prop == "debitAmount"){
  1325. // item.disabled = false
  1326. // this.configuration.disabled = false
  1327. // }
  1328. // })
  1329. // }
  1330. // },
  1331. // openPleaseCheckDialog(){
  1332. // this.processDialog = true;
  1333. // this.itemId = this.crudSelection[0].id //记得不能写死
  1334. // },
  1335. // //请核之前
  1336. // beforePleaseCheck(){
  1337. // if(this.crudSelection){
  1338. // let id = [];
  1339. // let result = [];
  1340. // this.crudSelection.forEach(item=>{
  1341. // // 新录入状态下 才可提交审核
  1342. // item.id ? id.push(true) : id.push(false) //如果没有id并且为新录入 提示保存
  1343. // item.strStatus === "录入" ? result.push(true) : result.push(false) //判断所有的是否为录入状态
  1344. // })
  1345. // if(id.findIndex(item => item != true) == -1){
  1346. // if(result.findIndex(item => item != true) == -1){
  1347. // if(contrastObj(this.form,this.oldForm) || contrastList(this.data,this.oldData)){ //判断是否改动过此页面
  1348. // this.$confirm("您已改动此页面,请先保存之后在请核?", "提示", {
  1349. // confirmButtonText: "保存",
  1350. // cancelButtonText: "取消",
  1351. // type: "warning",
  1352. // }).then(() => {
  1353. // this.editMainProject();
  1354. // }).catch(()=>{
  1355. // return
  1356. // })
  1357. // }else{
  1358. // this.pleaseCheck()
  1359. // // this.openPleaseCheckDialog();
  1360. // }
  1361. // }else{
  1362. // this.$message({
  1363. // type: "error",
  1364. // message: "请核数据中存在已请核数据!"
  1365. // });
  1366. // return
  1367. // }
  1368. // }else{
  1369. // this.$confirm("列表内存在新录入数据,是否先保存此数据?", {
  1370. // confirmButtonText: "确定",
  1371. // cancelButtonText: "取消",
  1372. // type: "warning"
  1373. // }).then(() => {
  1374. // this.editMainProject();
  1375. // })
  1376. // }
  1377. // }
  1378. // },
  1379. // //请核
  1380. // pleaseCheck(){
  1381. // this.crudSelection.forEach(item =>{
  1382. // updateItemStatus(this.data[item.$index].id,1).then(res =>{
  1383. //
  1384. // })
  1385. // this.$message({
  1386. // type: "success",
  1387. // message: "请核成功!"
  1388. // });
  1389. // //刷新列表
  1390. // this.getProjectDetail();
  1391. // })
  1392. // },
  1393. },
  1394. watch:{
  1395. dataList:function (list) {
  1396. }
  1397. }
  1398. };
  1399. </script>
  1400. <style scoped lang="scss">
  1401. .main-head {
  1402. position: fixed;
  1403. top: 105px;
  1404. width: 100%;
  1405. margin-left: -10px;
  1406. height: 62px;
  1407. background: #ffffff;
  1408. box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
  1409. z-index: 999;
  1410. }
  1411. .upper_right_button{
  1412. display: flex;
  1413. position: fixed;
  1414. right: 12px;
  1415. top: 47px;
  1416. }
  1417. .main-back {
  1418. cursor: pointer;
  1419. line-height: 62px;
  1420. font-size: 16px;
  1421. color: #323233;
  1422. font-weight: 400;
  1423. }
  1424. .required_fields{
  1425. color: #F56C6C;
  1426. display:inline-block;
  1427. width: 7%
  1428. }
  1429. .avue-tree {
  1430. overflow: hidden;
  1431. max-height: 660px;
  1432. }
  1433. ::v-deep .el-form-item {
  1434. margin-bottom: 0;
  1435. }
  1436. ::v-deep .el-form-item__content{
  1437. line-height: 32px;
  1438. }
  1439. .trading-form ::v-deep .el-form-item {
  1440. margin-bottom: 8px !important;
  1441. }
  1442. .landConFrom-input{
  1443. display:flex;
  1444. justify-content:center;
  1445. }
  1446. </style>