detailsPage.vue 49 KB

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