settleAccountsDetailsPage.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807
  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. <el-button class="el-button--small-yh add-customer-btn"
  9. size="small"
  10. type="primary"
  11. @click.stop="editMainProject"
  12. >{{this.id?"确认修改" :"确认新增"}}
  13. </el-button>
  14. </div>
  15. </div>
  16. <div style="margin-top: 60px">
  17. <containerTitle title="基础信息"></containerTitle>
  18. <basic-container >
  19. <el-form :model="form" ref="form" label-width="130px">
  20. <el-row>
  21. <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:6" :key="index">
  22. <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
  23. <el-date-picker v-if="item.type === 'datetime'" :disabled="item.disabled?true:false" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
  24. <el-select v-else-if="item.prop === 'paymentType'" :disabled="item.disabled?true:false" style="width: 100%" v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable >
  25. <el-option v-for="(item,index) in paymentTerm" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
  26. </el-select>
  27. <el-input type="age" v-else-if="item.type === 'unit'" v-model="form[item.prop]" :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入">
  28. <template slot="append">元</template>
  29. </el-input>
  30. <selectComponent v-else-if="item.prop === 'corpId'" :disabled="item.disabled?true:false" v-model="form[item.prop]" :configuration="configuration"/>
  31. <el-input type="textarea" v-else-if="(item.prop === 'remark'||item.prop === 'settlementRemark')" v-model="form[item.prop]" :disabled="item.disabled && item.prop === 'remark'?true:false" size="small" autocomplete="off" placeholder="请输入"></el-input>
  32. <el-input type="age" v-else v-model="form[item.prop]" :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入"></el-input>
  33. </el-form-item>
  34. </el-col>
  35. </el-row>
  36. </el-form>
  37. </basic-container>
  38. <containerTitle title="明细列表"></containerTitle>
  39. <basic-container>
  40. <avue-crud :option="option"
  41. :data="dataList"
  42. ref="crud"
  43. v-model="form"
  44. :page.sync="page"
  45. :table-loading="loading"
  46. @search-reset="searchReset"
  47. @selection-change="selectionChange"
  48. @current-change="currentChange"
  49. @size-change="sizeChange"
  50. @row-update="rowUpdate"
  51. @refresh-change="refreshChange">
  52. <template slot="menuLeft">
  53. <el-tabs v-model="activeName" @tab-click="handleClick">
  54. <el-tab-pane label="原始数据" name="first" :key="'first'">
  55. </el-tab-pane>
  56. <el-tab-pane label="追加" name="second" :key="'second'">
  57. </el-tab-pane>
  58. <el-tab-pane label="退款" name="three" :key="'three'">
  59. </el-tab-pane>
  60. </el-tabs>
  61. </template>
  62. <template slot="menuRight">
  63. <el-button
  64. type="primary"
  65. size="small"
  66. v-if="secondDisable == 1 || secondDisable == 2 "
  67. @click.stop="serviceDialog = true"
  68. >录入明细
  69. </el-button>
  70. </template>
  71. <template slot-scope="scope" slot="menu">
  72. <el-button
  73. type="text"
  74. size="small"
  75. :disabled="scope.row.status == 5"
  76. v-if="secondDisable == 1 || secondDisable == 2 "
  77. @click="rowCell(scope.row,scope.index)"
  78. >{{ scope.row.$cellEdit ? '修改完成' : '修改' }}
  79. </el-button>
  80. <el-button
  81. type="text"
  82. size="small"
  83. :disabled="scope.row.status == 5"
  84. v-if="secondDisable == 1 || secondDisable == 2 "
  85. @click="rowDel(scope.row,scope.index)"
  86. >删除
  87. </el-button>
  88. <el-button
  89. type="text"
  90. icon="el-icon-check"
  91. size="small"
  92. :disabled="!scope.row.id"
  93. v-if="scope.row.status != 5 && (scope.row.status == 4 || secondDisable == 1 || secondDisable == 2)"
  94. @click.stop="beforeCloseAccount(scope.row,scope.index)"
  95. >结 算
  96. </el-button>
  97. <el-button
  98. type="text"
  99. icon="el-icon-close"
  100. size="small"
  101. v-if="scope.row.status == 5"
  102. @click.stop="callAccount(scope.row,scope.index)"
  103. >取消结算
  104. </el-button>
  105. </template>
  106. <template slot="userid" slot-scope="{row,index}">
  107. <span v-if="row.$cellEdit" class="required_fields">*</span>
  108. <user-select
  109. style="width:90% !important;"
  110. v-if="row.$cellEdit"
  111. v-model="row.userName"
  112. @value="(values) => value(values,row)"
  113. :configuration="UConfiguration"
  114. >
  115. </user-select>
  116. <span v-else>{{ row.userName }}</span>
  117. </template>
  118. <template slot="amount" slot-scope="{ row }">
  119. <el-input
  120. v-if="row.$cellEdit"
  121. v-model="row.amount"
  122. placeholder="请输入"
  123. size="small"
  124. oninput='this.value=this.value.replace(/[^(\-?\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  125. ></el-input>
  126. <span v-else>{{ row.amount }}</span>
  127. </template>
  128. <template slot="serviceCharge" slot-scope="{ row }">
  129. <span v-if="row.$cellEdit" class="required_fields">*</span>
  130. <el-input
  131. v-if="row.$cellEdit"
  132. v-model="row.serviceCharge"
  133. style="width:90% !important;"
  134. placeholder="请输入"
  135. size="small"
  136. oninput='this.value=this.value.replace(/[^(\-?\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  137. @input="costCount(row)"
  138. ></el-input>
  139. <span v-else>{{ row.serviceCharge }}</span>
  140. </template>
  141. <template slot="matMoney" slot-scope="{ row }">
  142. <span v-if="row.$cellEdit" class="required_fields">*</span>
  143. <el-input
  144. v-if="row.$cellEdit"
  145. v-model="row.matMoney"
  146. style="width:90% !important;"
  147. placeholder="请输入"
  148. size="small"
  149. oninput='this.value=this.value.replace(/[^(\-?\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  150. @input="costCount(row)"
  151. ></el-input>
  152. <span v-else>{{ row.matMoney }}</span>
  153. </template>
  154. <template slot="costReturn" slot-scope="{ row }">
  155. <span v-if="row.$cellEdit" class="required_fields">*</span>
  156. <el-input
  157. v-if="row.$cellEdit"
  158. style="width:90% !important;"
  159. v-model="row.costReturn"
  160. placeholder="请输入"
  161. size="small"
  162. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  163. ></el-input>
  164. <span v-else>{{ row.costReturn }}</span>
  165. </template>
  166. <template slot="superaddition" slot-scope="{ row }">
  167. <span v-if="row.$cellEdit" class="required_fields">*</span>
  168. <el-input
  169. v-if="row.$cellEdit"
  170. style="width: 90%"
  171. v-model="row.superaddition"
  172. placeholder="请输入"
  173. size="small"
  174. oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
  175. ></el-input>
  176. <span v-else>{{ row.superaddition }}</span>
  177. </template>
  178. </avue-crud>
  179. </basic-container>
  180. <containerTitle title="附件上传"></containerTitle>
  181. <basic-container style="margin-bottom: 40px">
  182. <avue-crud
  183. :option="upLoadOption"
  184. v-model="upLoadForm"
  185. :data="upLoadData"
  186. @row-save="upLoadSave"
  187. @row-update="upLoadUpdate"
  188. @row-del="upLoadDel"
  189. ></avue-crud>
  190. </basic-container>
  191. </div>
  192. <el-dialog
  193. title="导入服务项目"
  194. append-to-body
  195. class="el-dialogDeep"
  196. :visible.sync="serviceDialog"
  197. width="70%"
  198. :close-on-click-modal="false"
  199. :destroy-on-close="true"
  200. :modal-append-to-body='false'
  201. :close-on-press-escape="false"
  202. v-dialog-drag
  203. >
  204. <service-component
  205. @serviceConfirm="serviceConfirm"
  206. @choce="choce"
  207. >
  208. </service-component>
  209. </el-dialog>
  210. <el-dialog
  211. title="结算"
  212. append-to-body
  213. class="el-dialogDeep"
  214. :visible.sync="accountDialog"
  215. width="25%"
  216. :close-on-click-modal="false"
  217. :destroy-on-close="true"
  218. :close-on-press-escape="false">
  219. <el-form :model="accountFormData" ref="accountFormData">
  220. <el-form-item label="账户名称" class="landConFrom-input" prop="accountName" :rules="rules">
  221. <el-input v-model="accountFormData.accountName" style="width: 220px;" size="small" clearable placeholder="请输入" ></el-input>
  222. </el-form-item>
  223. <el-form-item label="结算日期" class="landConFrom-input" prop="payTime" :rules="rules">
  224. <el-date-picker type="date" v-model="accountFormData.payTime" value-format="yyyy-MM-dd HH:mm:ss" size="small" clearable placeholder="日期" ></el-date-picker>
  225. </el-form-item>
  226. </el-form>
  227. <span slot="footer" style="display: flex; justify-content: center">
  228. <el-button @click.stop="accountDialog = false , accountFormData = {}" size="small">取 消</el-button>
  229. <el-button type="primary" size="small" @click="closeAccount('accountFormData')">结算</el-button>
  230. </span>
  231. </el-dialog>
  232. </div>
  233. </template>
  234. <script>
  235. import option from "./configuration/settleAccountsDetailsPage.json";
  236. import optionAdd from "./configuration/settleAccountsDetailsADD.json";
  237. import optionReturn from "./configuration/settleAccountsDetailsReturn.json";
  238. import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
  239. import { projectDetail,editMianProject,updateItemStatus } from "@/api/workManagement/mainProject";
  240. //业务字典
  241. import { getDictionary } from "@/api/system/dictbiz";
  242. //上传附件删除
  243. import { corpsbank } from "@/api/basicData/configuration"
  244. import serviceComponent from "@/components/mainProject/index"
  245. import _ from "lodash";
  246. export default {
  247. name: "customerInformation",
  248. props: {
  249. detailData: {
  250. type: Object
  251. }
  252. },
  253. components:{
  254. serviceComponent
  255. },
  256. data() {
  257. return {
  258. loading:false,
  259. accountDialog:false,
  260. serviceDialog:false,
  261. activeName: "first",
  262. tab1:true,
  263. tab2:false,
  264. tab3:false,
  265. secondDisable:0,
  266. aaccount:{},
  267. form: {},
  268. accountFormData:{
  269. },
  270. rules:[{
  271. required: true,
  272. message: ' ',
  273. trigger: 'blur'
  274. }
  275. ],
  276. UConfiguration:{
  277. multipleChoices:false,
  278. multiple:false,
  279. disabled:false,
  280. searchShow:true,
  281. collapseTags:false,
  282. placeholder:'请点击右边按钮选择',
  283. dicData:[]
  284. },
  285. option: option,
  286. parentId:0,
  287. account:{},
  288. paymentTerm:[],
  289. selectList:[],
  290. page: {
  291. pageSize: 10,
  292. pagerCount: 5,
  293. total: 0,
  294. },
  295. configuration:{
  296. multipleChoices:false,
  297. multiple:false,
  298. disabled:true,
  299. searchShow:false,
  300. collapseTags:false,
  301. placeholder:'请点击右边按钮选择',
  302. dicData:[]
  303. },
  304. query:{},
  305. //顶部from数据
  306. basicData: {
  307. column: [
  308. {
  309. label: '项目名称',
  310. prop: 'cname',
  311. span:12,
  312. disabled: true,
  313. rules: [
  314. {
  315. required: true,
  316. message: ' ',
  317. trigger: 'blur'
  318. }
  319. ]
  320. }, {
  321. label: '客户名称',
  322. span:12,
  323. prop: 'corpId',
  324. disabled: true,
  325. },{
  326. label: '合同金额',
  327. prop: 'debitAmount',
  328. type:'unit',
  329. disabled: true,
  330. rules: [
  331. {
  332. pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
  333. message: ' ',
  334. trigger: 'blur'
  335. }
  336. ]
  337. },
  338. {
  339. label: '首付金额',
  340. prop: 'advanceAmount',
  341. type:'unit',
  342. disabled: true,
  343. rules: [
  344. {
  345. pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
  346. message: ' ',
  347. trigger: 'blur'
  348. }
  349. ]
  350. },
  351. {
  352. label: '未收金额',
  353. prop: 'balanceAmount',
  354. type:'unit',
  355. disabled: true,
  356. rules: [
  357. {
  358. pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
  359. message: ' ',
  360. trigger: 'blur'
  361. }
  362. ]
  363. },
  364. {
  365. label: '已收金额',
  366. prop: 'settlmentAmount',
  367. type:'unit',
  368. disabled: true,
  369. rules: [
  370. {
  371. pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
  372. message: ' ',
  373. trigger: 'blur'
  374. }
  375. ]
  376. },
  377. {
  378. label: '服务费',
  379. prop: 'serviceCharge',
  380. type:'unit',
  381. disabled: true,
  382. rules: [
  383. {
  384. pattern:/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  385. message: ' ',
  386. trigger: 'blur'
  387. }
  388. ]
  389. },
  390. {
  391. label: '代垫费',
  392. prop: 'matMoney',
  393. type:'unit',
  394. disabled: true,
  395. rules: [
  396. {
  397. pattern:/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
  398. message: ' ',
  399. trigger: 'blur'
  400. }
  401. ]
  402. },
  403. {
  404. label: '责任人',
  405. prop: 'corpAttn',
  406. disabled: true
  407. }, {
  408. label: '承揽人',
  409. prop: 'salesName',
  410. disabled: true
  411. },
  412. {
  413. label: '制单人',
  414. prop: 'createUserName',
  415. disabled: true
  416. }, {
  417. label: '制单日期',
  418. prop: 'createTime',
  419. type: 'datetime',
  420. disabled: true
  421. },
  422. {
  423. label: '电话',
  424. prop: 'corpTel',
  425. disabled: true,
  426. },
  427. {
  428. label: '收款方式',
  429. prop: 'paymentType',
  430. type:'select',
  431. dataType: "number",
  432. width: 120,
  433. disabled: true,
  434. dicUrl: "/api/blade-system/dict-biz/dictionary?code=affair_payment_term",
  435. props: {
  436. label: "dictValue",
  437. value: "dictKey"
  438. },
  439. },
  440. {
  441. label: '开始日期',
  442. disabled: true,
  443. prop: 'beginTime',
  444. type:'datetime',
  445. },
  446. {
  447. label: '结束日期',
  448. disabled: true,
  449. prop: 'endTime',
  450. type:'datetime',
  451. },
  452. {
  453. label: '备注',
  454. span: 24,
  455. prop: 'remark',
  456. disabled: true,
  457. },
  458. {
  459. label: '结算备注',
  460. span: 24,
  461. prop: 'settlementRemark',
  462. disabled: true,
  463. },
  464. ],
  465. },
  466. dataList: [],
  467. allDataList:[],
  468. data_one:[],
  469. data_two:[],
  470. data_three:[],
  471. //上传文件
  472. upLoadOption: upLoadOption,
  473. upLoadData:[],
  474. upLoadForm:{},
  475. }
  476. },
  477. created() {
  478. this.id = this.detailData.id;
  479. this.getProjectDetail();
  480. const params = {
  481. code : "affair_payment_term"
  482. }
  483. getDictionary(params).then(res =>{
  484. this.paymentTerm = res.data.data;
  485. })
  486. },
  487. mounted() {
  488. },
  489. methods: {
  490. value(value,row){
  491. row.userid = value.id
  492. row.deptid = value.deptId
  493. },
  494. costCount(row){
  495. if(row.serviceCharge && row.matMoney){
  496. row.amount = _.add(parseFloat(row.serviceCharge),parseFloat(row.matMoney));
  497. }
  498. },
  499. handleClick(tab) {
  500. if(tab.name == "first") {
  501. this.tab1 = true;
  502. this.tab2 = false;
  503. this.tab3 = false;
  504. if(this.secondDisable == 1){
  505. this.data_two = this.dataList
  506. }
  507. if(this.secondDisable == 2){
  508. this.data_three = this.dataList
  509. }
  510. this.secondDisable = 0
  511. this.option = option //换option
  512. this.dataList = this.data_one //切换数据
  513. } else if(tab.name == "second") {
  514. this.tab1 = false;
  515. this.tab2 = true;
  516. this.tab3 = false;
  517. if(this.secondDisable == 0){
  518. this.data_one = this.dataList
  519. }
  520. if(this.secondDisable == 2){
  521. this.data_three = this.dataList
  522. }
  523. this.secondDisable = 1
  524. this.option = optionAdd
  525. this.dataList = this.data_two
  526. }else if(tab.name == "three") {
  527. this.tab1 = false;
  528. this.tab2 = false;
  529. this.tab3 = true;
  530. if(this.secondDisable == 0){
  531. this.data_one = this.dataList
  532. }
  533. if(this.secondDisable == 1){
  534. this.data_two = this.dataList
  535. }
  536. this.secondDisable = 2
  537. this.option = optionReturn
  538. this.dataList = this.data_three
  539. }
  540. },
  541. getProjectDetail(){
  542. if(this.id){
  543. projectDetail(this.id,"4,5,7,8").then(res =>{
  544. this.form = res.data.data;
  545. this.configuration.dicData = res.data.data.corpName
  546. if(res.data.data.itemList){
  547. this.loading = true;
  548. this.allDataList = res.data.data.itemList;
  549. this.data_one=this.allDataList.filter(item=>item.projectType === 0)
  550. this.data_two=this.allDataList.filter(item=>item.projectType === 1)
  551. this.data_three=this.allDataList.filter(item=>item.projectType === 2)
  552. this.dataList = this.data_one
  553. this.activeName = "first"
  554. this.tab1 = true;
  555. this.tab2 = false;
  556. this.tab3 = false;
  557. this.option = option
  558. this.secondDisable = 0
  559. this.loading = false;
  560. }
  561. if(res.data.data.filesList){
  562. this.upLoadData = res.data.data.filesList
  563. }
  564. })
  565. }
  566. },
  567. //结算
  568. beforeCloseAccount(row){
  569. this.aaccount = row;
  570. this.accountDialog = true;
  571. },
  572. closeAccount(form){
  573. this.$refs[form].validate((valid) => {
  574. if(valid){
  575. this.$confirm("确认结算此明细?", {
  576. confirmButtonText: "确定",
  577. cancelButtonText: "取消",
  578. type: "warning"
  579. }).then(() => {
  580. updateItemStatus(this.aaccount.id,5,
  581. this.accountFormData.accountName,
  582. this.accountFormData.payTime,).then(res =>{
  583. if(res.data.success){
  584. this.$message({
  585. type: "success",
  586. message: "操作成功!"
  587. });
  588. this.accountFormData = {},
  589. this.accountDialog = false;
  590. this.getProjectDetail();
  591. }
  592. })
  593. });
  594. }
  595. })
  596. },
  597. //取消结算
  598. callAccount(row,index){
  599. this.$confirm("确认取消结算此明细?", {
  600. confirmButtonText: "确定",
  601. cancelButtonText: "取消",
  602. type: "warning"
  603. }).then(() => {
  604. updateItemStatus(row.id,6).then(res =>{
  605. if(res.data.success){
  606. this.$message({
  607. type: "success",
  608. message: "操作成功!"
  609. });
  610. this.getProjectDetail();
  611. }
  612. })
  613. });
  614. },
  615. //返回列表
  616. backToList(){
  617. this.$emit("goBack");
  618. },
  619. serviceConfirm(list){
  620. list.forEach((item)=>{
  621. const params = {
  622. strStatus:"录入",
  623. pname:item.cname,
  624. remarks:item.remarks,
  625. price:item.price,
  626. unit:item.unit,
  627. frequency:item.rate,
  628. projectType:this.secondDisable,
  629. status:this.secondDisable === 1?7:8
  630. }
  631. this.$refs.crud.rowCellAdd(params);
  632. })
  633. this.serviceDialog = false
  634. },
  635. choce(){
  636. this.serviceDialog = false
  637. },
  638. //新增 修改
  639. editMainProject(){
  640. if(this.secondDisable == 0){
  641. this.dataList = this.data_one
  642. }
  643. if(this.secondDisable == 1){
  644. this.dataList = this.data_two
  645. }
  646. if(this.secondDisable == 2){
  647. this.dataList = this.data_three
  648. }
  649. this.allDataList = []
  650. this.allDataList.push(...this.data_one,...this.data_two,...this.data_three)
  651. for (let i = 0; i < this.allDataList.length; i++) {
  652. if(this.allDataList[i].serviceCharge === (null || "")){
  653. return this.$message.error(`请输入明细列表服务费必填项`);
  654. }
  655. if(this.allDataList[i].matMoney === (null || "")){
  656. return this.$message.error(`请输入明细列表代垫费必填项`);
  657. }
  658. if(this.allDataList[i].userid === (null || "")){
  659. return this.$message.error(`请输入明细列表承做人必填项`);
  660. }
  661. if(this.allDataList[i].deptid === (null || "")){
  662. return this.$message.error(`请输入明细列表任务部门必填项`);
  663. }
  664. // if(this.allDataList[i].projectType === 2){
  665. // this.allDataList[i].serviceCharge = -this.allDataList[i].serviceCharge
  666. // this.allDataList[i].matMoney = -this.allDataList[i].matMoney
  667. // }
  668. }
  669. const params = {
  670. ...this.form,
  671. itemList:this.allDataList,
  672. filesList:this.upLoadData
  673. }
  674. editMianProject(params).then(res =>{
  675. if(res.data.success){
  676. this.$message({
  677. type: "success",
  678. message: "操作成功!"
  679. });
  680. this.getProjectDetail()
  681. }
  682. })
  683. },
  684. searchReset() {
  685. console.log('1')
  686. },
  687. selectionChange(row) {
  688. this.selectList = row
  689. },
  690. currentChange() {
  691. console.log('1')
  692. },
  693. sizeChange() {
  694. console.log('1')
  695. },
  696. refreshChange() {
  697. console.log('1')
  698. },
  699. rowCell(row, index) {
  700. this.$refs.crud.rowCell(row, index);
  701. // row.$cellEdit = !row.$cellEdit
  702. },
  703. rowUpdate(row, index, done, loading) {
  704. done(row);
  705. },
  706. rowDel(row,index){
  707. this.$confirm("确定将此明细删除?", {
  708. confirmButtonText: "确定",
  709. cancelButtonText: "取消",
  710. type: "warning"
  711. }).then(() => {
  712. this.dataList.splice(index,1)
  713. });
  714. },
  715. //上传文件保存
  716. upLoadSave(row, done, loading){
  717. this.upLoadData.push(row)
  718. done()
  719. },
  720. //修改附件上传触发
  721. upLoadUpdate(row, done){
  722. done(row);
  723. },
  724. //删除附件上传触发
  725. upLoadDel(row, index,){
  726. this.$confirm("确定将选择数据删除?", {
  727. confirmButtonText: "确定",
  728. cancelButtonText: "取消",
  729. type: "warning"
  730. }).then(() => {
  731. if (row.id){
  732. corpsbank(row.id).then(res=>{
  733. this.$message({
  734. type: "success",
  735. message: "操作成功!"
  736. });
  737. this.bankOfDepositData.splice(index, 1);
  738. })
  739. }else {
  740. this.$message({
  741. type: "success",
  742. message: "操作成功!"
  743. });
  744. this.bankOfDepositData.splice(index, 1);
  745. }
  746. })
  747. },
  748. }
  749. }
  750. </script>
  751. <style scoped lang="scss">
  752. .receipt-head {
  753. position: fixed;
  754. top: 105px;
  755. width: 100%;
  756. margin-left: -10px;
  757. height: 62px;
  758. background: #ffffff;
  759. box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
  760. z-index: 999;
  761. }
  762. .receipt-back {
  763. cursor: pointer;
  764. line-height: 62px;
  765. font-size: 16px;
  766. color: #323233;
  767. font-weight: 400;
  768. }
  769. ::v-deep .el-form-item {
  770. margin-bottom: 0;
  771. }
  772. .add-customer-btn {
  773. position: fixed;
  774. right: 12px;
  775. top: 47px;
  776. }
  777. .landConFrom-input{
  778. display:flex;
  779. justify-content:center;
  780. }
  781. ::v-deep .el-form-item__content{
  782. line-height: 32px;
  783. }
  784. </style>