移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

765 regels
28 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. left-arrow
  5. fixed
  6. placeholder
  7. @click-left="$router.back(-1)"
  8. >
  9. <template #title>
  10. <p style="font-weight: bold;">添加付款申请</p>
  11. </template>
  12. </van-nav-bar>
  13. <van-form @submit="getChange" @failed="getError" :show-error-message="false" scroll-to-error validate-first>
  14. <p class="main_title">基础信息</p>
  15. <div class="main_box">
  16. <van-field
  17. readonly
  18. clickable
  19. required
  20. :rules="[{ required: true , message:'请选择申请时间' }]"
  21. v-model="form.applyDate"
  22. label="申请时间"
  23. placeholder="请选择申请时间"
  24. @click="showlasj = true"
  25. input-align="right"
  26. right-icon="arrow-down"
  27. />
  28. <van-popup v-model="showlasj" position="bottom">
  29. <van-datetime-picker
  30. v-model="currentDate"
  31. type="date"
  32. title="选择年月日"
  33. :min-date="minDate"
  34. :max-date="maxDate"
  35. @confirm="onConfirmLasj"
  36. />
  37. </van-popup>
  38. <van-field
  39. readonly
  40. clickable
  41. required
  42. :rules="[{ required: true , message:'请选择资金支出类别' }]"
  43. label="资金支出类别"
  44. placeholder="请选择"
  45. v-model="capitalExpenditureType"
  46. @click="showcapital = true"
  47. input-align="right"
  48. right-icon="arrow-down"
  49. label-width="auto"
  50. />
  51. <van-popup v-model="showcapital" position="bottom">
  52. <van-picker
  53. show-toolbar
  54. :columns="capitalExpenditureTypeOptions"
  55. @confirm="onConfirmCapital"
  56. @cancel="showcapital = false"
  57. />
  58. </van-popup>
  59. <van-field
  60. readonly
  61. required
  62. label="支出总金额"
  63. v-model="form.expenditureAmount"
  64. placeholder="根据下方收款金额自动核算"
  65. input-align="right"
  66. label-width="auto"
  67. />
  68. </div>
  69. <div class="main_box" style="margin-top: 10px;">
  70. <van-field
  71. label="付款事由"
  72. v-model="form.remark"
  73. type="textarea"
  74. placeholder="请输入付款事由"
  75. input-align="right"
  76. rows="3"
  77. label-width="auto"
  78. required
  79. :rules="[{ required: true , message:'请输入付款事由' }]"
  80. />
  81. </div>
  82. <div class="main_box" style="margin-top: 10px;">
  83. <van-field label="说明情况" v-model="form.explainSituation" type="textarea" placeholder="请输入说明情况" input-align="right" rows="3" label-width="auto"/>
  84. </div>
  85. <p class="main_title" v-if="capitalExpenditureOpen">关联项目</p>
  86. <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  87. <van-field
  88. readonly
  89. clickable
  90. label="项目名称"
  91. placeholder="请选择"
  92. v-model="projectForm.projectName"
  93. @click="showproject = true"
  94. input-align="right"
  95. right-icon="arrow-down"
  96. required
  97. :rules="[{ required: true , message:'请选择项目名称' }]"
  98. />
  99. <van-popup v-model="showproject" position="bottom">
  100. <van-picker
  101. show-toolbar
  102. :columns="projectListShow"
  103. @confirm="onConfirmProject"
  104. @cancel="showproject = false"
  105. />
  106. </van-popup>
  107. <van-field required :rules="[{ required: true , message:'请输入承建单位' }]" v-model="projectForm.projectContractor" label="承建单位" placeholder="请输入承建单位" input-align="right" label-width="auto"/>
  108. <van-field required :rules="[{ required: true , message:'请输入合同价款' }]" v-model="projectForm.projectAmount" label="合同价款(元)" placeholder="请输入合同价款(元)" input-align="right" label-width="auto"/>
  109. <van-field
  110. readonly
  111. clickable
  112. label="工程款类型"
  113. placeholder="请选择"
  114. v-model="projectFundType"
  115. @click="showFundType = true"
  116. input-align="right"
  117. right-icon="arrow-down"
  118. required
  119. :rules="[{ required: true , message:'请选择工程款类型' }]"
  120. />
  121. <van-popup v-model="showFundType" position="bottom">
  122. <van-picker
  123. show-toolbar
  124. :columns="projectFundTypeOptions"
  125. @confirm="onConfirmFundType"
  126. @cancel="showFundType = false"
  127. />
  128. </van-popup>
  129. <van-field required :rules="[{ required: true , message:'请输入工程发票号' }]" v-model="projectForm.projectBillNum" label="工程发票号" placeholder="请输入工程发票号" input-align="right" label-width="auto"/>
  130. </div>
  131. <p class="main_title">付款方信息</p>
  132. <div class="main_box">
  133. <!-- <van-field label="付款方" v-model="form.payer" placeholder="请输入付款方" input-align="right" label-width="auto"/>-->
  134. <van-field
  135. readonly
  136. clickable
  137. label="付款方"
  138. placeholder="请选择付款方"
  139. v-model="form.payer"
  140. @click="showpayer = true"
  141. input-align="right"
  142. right-icon="arrow-down"
  143. label-width="auto"
  144. required
  145. :rules="[{ required: true , message:'请选择付款方' }]"
  146. />
  147. <van-popup v-model="showpayer" position="bottom">
  148. <van-picker
  149. show-toolbar
  150. :columns="payerOptions"
  151. @confirm="onConfirmPayer($event)"
  152. @cancel="showpayer = false"
  153. />
  154. </van-popup>
  155. <van-field :rules="[{ required: true , message:'请输入付款方账户' }]" required label="付款方账户" v-model="form.payerAccount" placeholder="请输入账户" input-align="right" label-width="auto"/>
  156. </div>
  157. <p class="main_title">收款方信息<van-button icon="plus" @click="addChargeItme(chargeItme.length)" size="mini" type="info" native-type="button" class="addFamily"/></p>
  158. <div class="main_box" style="margin-bottom: 15px;">
  159. <van-cell title="收款账户类型">
  160. <template #right-icon>
  161. <van-radio-group direction="horizontal" v-model="form.accountType" @change="accountTypeChange">
  162. <van-radio name="1">公户</van-radio>
  163. <van-radio name="2">私户</van-radio>
  164. </van-radio-group>
  165. </template>
  166. </van-cell>
  167. </div>
  168. <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index">
  169. <van-button icon="minus" size="mini" type="danger" class="deleteFamily" native-type="button" v-if="index!=0" @click="deleteChargeItme(index)" />
  170. <div class="main_box" style="margin-bottom: 10px;position:relative;">
  171. <van-field
  172. readonly
  173. clickable
  174. label="收款方"
  175. placeholder="请选择"
  176. v-model="item.payee"
  177. @click="item.showPayee = true"
  178. input-align="right"
  179. right-icon="arrow-down"
  180. required
  181. :rules="[{ required: true , message:'请选择收款方' }]"
  182. />
  183. <van-popup v-model="item.showPayee" position="bottom">
  184. <van-picker
  185. show-toolbar
  186. :columns="payeeList"
  187. @confirm="onConfirmPayee($event,index)"
  188. @cancel="item.showPayee = false"
  189. />
  190. </van-popup>
  191. <van-field required :rules="[{ required: true , message:'请输入账户' }]" v-model="item.payeeAccount" label="收款账户" placeholder="请输入账户" input-align="right" label-width="auto"/>
  192. <van-field required :rules="[{ required: true , message:'请输入银行' }]" v-model="item.bankDeposit" label="开户银行" placeholder="请输入银行" input-align="right" label-width="auto"/>
  193. <van-field required :rules="[{ required: true , message:'请输入金额' }]" v-model="item.incomeAmount" label="收入金额" placeholder="请输入金额" input-align="right" label-width="auto" @change="moneyChange"/>
  194. <van-field
  195. readonly
  196. clickable
  197. label="所属银行"
  198. placeholder="请选择"
  199. v-model="item.bankTypeText"
  200. @click="item.showbankType = true"
  201. input-align="right"
  202. right-icon="arrow-down"
  203. required
  204. :rules="[{ required: true , message:'请选择所属银行' }]"
  205. />
  206. <van-popup v-model="item.showbankType" position="bottom">
  207. <van-picker
  208. show-toolbar
  209. :columns="bankTypeDictionaries"
  210. @confirm="onConfirmBankType($event,index)"
  211. @cancel="item.showbankType = false"
  212. />
  213. </van-popup>
  214. </div>
  215. </div>
  216. <div style="padding: 16px 0;">
  217. <van-row>
  218. <van-col span="12" align="center">
  219. <!-- @click="goUpdate"-->
  220. <van-button type="info" native-type="submit" @click="buttonType='update'" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button>
  221. </van-col>
  222. <van-col span="12" align="center">
  223. <!-- @click="goAdd"-->
  224. <van-button type="info" native-type="submit" @click="buttonType='add'" class="submitButton">保存并提交</van-button>
  225. </van-col>
  226. </van-row>
  227. <div class="clear"></div>
  228. </div>
  229. </van-form>
  230. </div>
  231. </template>
  232. <script>
  233. import { addTransfer , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit , getAccount ,getQmyeFlow} from "@/api/onlineHome/bankAgriculture/paymentApproval";
  234. export default {
  235. name: "approvalAdd10",
  236. data() {
  237. return {
  238. showcapital:false,
  239. showpayee:false,
  240. showlasj:false,
  241. showbankType:false,
  242. showproject:false,
  243. showFundType:false,
  244. showpayer:false,
  245. buttonType:'a',
  246. minDate: new Date(),
  247. maxDate: new Date(2050, 10, 1),
  248. currentDate: new Date(),
  249. form:{},
  250. capitalExpenditureType:'',
  251. payee:'',
  252. bankType:'',
  253. wfydlxDictionaries:[],
  254. jglxDictionaries:[],
  255. sysDictionaries:[],
  256. capitalExpenditureTypeOptions:[],
  257. bankTypeDictionaries:[],
  258. projectList:[],
  259. projectFundTypeOptions:[],
  260. projectFundTypeDictionaries:[],
  261. projectListShow:[],
  262. payerOptions:[],
  263. chargeItme:[],
  264. chargeItmeShow:[],
  265. payeeList:[],
  266. // 查询参数
  267. queryParams: {
  268. transferType:"",
  269. orderByColumn: "id",
  270. isAsc: "desc",
  271. },
  272. capitalExpenditureOpen:false,
  273. projectForm:{
  274. projectId:null,
  275. projectName:null,
  276. projectContractor:null,
  277. projectAmount:null,
  278. projectBillNum:null,
  279. projectFundType:'1',
  280. outId:null,
  281. ynType:'1'
  282. },
  283. projectFundType:''
  284. };
  285. },
  286. created() {
  287. this.reset();
  288. let queryParams={
  289. pageNum: 1,
  290. pageSize: 100,
  291. }
  292. listProject(queryParams).then(response => {
  293. this.projectList = response.rows;
  294. for (var i = 0; i < response.rows.length; i++) {
  295. this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id});
  296. }
  297. });
  298. this.getDicts("project_fund_type").then((response) => {
  299. for (var i = 0; i < response.data.length; i++) {
  300. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  301. }
  302. this.projectFundTypeDictionaries = response.data;
  303. });
  304. let params1={
  305. accountType: "102",
  306. status: "N",
  307. }
  308. getAccount(params1).then((response) => {
  309. this.payerOptions = response.rows;
  310. response.rows.map((res,index) => {
  311. res['payerFrom'] = '1'
  312. console.log(res)
  313. this.payerOptions[index].text = res.accountName;
  314. this.payerOptions[index].value = res.id;
  315. })
  316. });
  317. this.getDictionaries();
  318. },
  319. methods: {
  320. // 表单重置
  321. reset() {
  322. this.form = {
  323. id: null,
  324. upId: null,
  325. downId: null,
  326. orderId: null,
  327. cashierId: null,
  328. transferType: '1',
  329. accountType: '2',
  330. explainSituation: null,
  331. succeedAmount: null,
  332. payer: null,
  333. payerAccount: null,
  334. operatorCode: null,
  335. enterpriseCode: null,
  336. expenditureAmount: null,
  337. capitalExpenditureType: '1',
  338. remark: null,
  339. transferStatus: "0",
  340. auditStatus: "0",
  341. paymentState: "1",
  342. bankPriority: "0",
  343. clientPriority: "0"
  344. };
  345. this.processList = {}
  346. this.projectForm={
  347. projectId:null,
  348. projectName:null,
  349. projectContractor:null,
  350. projectAmount:null,
  351. projectBillNum:null,
  352. projectFundType:'1',
  353. outId:null,
  354. ynType:'1'
  355. }
  356. },
  357. getChange(){
  358. console.log(this.buttonType)
  359. if(this.buttonType == 'update'){
  360. console.log('update')
  361. this.goUpdate();
  362. }else if(this.buttonType == 'add'){
  363. console.log('add')
  364. this.goAdd();
  365. }
  366. },
  367. getDictionaries(){
  368. this.getDicts("capital_expenditure_type").then((res) => {
  369. for (var i = 0; i < res.data.length; i++) {
  370. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  371. }
  372. });
  373. this.getDicts("bank_type").then(res => {
  374. for (var i = 0; i < res.data.length; i++) {
  375. this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  376. }
  377. });
  378. this.getPayeeList();
  379. },
  380. getError(e){
  381. console.log(e)
  382. this.$notify({ type: 'danger', message: e.errors[0].message });
  383. },
  384. addChargeItme(index){
  385. if(this.chargeItme.length>0&&this.chargeItme[this.chargeItme.length-1].payee == ''){
  386. this.$notify({ type: 'danger', message: '请勿添加多个空列表信息' });
  387. return;
  388. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].incomeAmount == ''){
  389. this.$notify({ type: 'danger', message: '请输入收入金额!' });
  390. return;
  391. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].payeeAccount == ''){
  392. this.$notify({ type: 'danger', message: '请输入收款账户!' });
  393. return;
  394. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankDeposit == ''){
  395. this.$notify({ type: 'danger', message: '请输入开户银行!' });
  396. return;
  397. }else if(this.chargeItme.length>0&&this.chargeItme[index-1].bankType == ''){
  398. this.$notify({ type: 'danger', message: '请选择所属银行!' });
  399. return;
  400. }
  401. this.getDicts("bank_type").then(res => {
  402. this.chargeItme.splice(index + 1, 0, {
  403. payeeId: "", //收款方ID
  404. payee: "", //收款方
  405. payeeAccount: "", //收款账户
  406. bankDeposit: "", //开户银行
  407. incomeAmount: "", //收入金额
  408. bankType: "1", //所属银行
  409. bankTypeText:this.selectDictLabel(res.data, 1), //所属银行
  410. showPayee:false,
  411. showbankType:false
  412. });
  413. });
  414. },
  415. getPayeeList() {
  416. //普通转账
  417. this.queryParams.accountType = this.form.accountType
  418. this.queryParams.status = "0"
  419. listPayee(this.queryParams).then((response) => {
  420. this.payeeList = response.rows;
  421. response.rows.map((res,index) => {
  422. this.payeeList[index].text = res.payee;
  423. this.payeeList[index].value = res.id;
  424. })
  425. });
  426. },
  427. payeeDictLabel(datas, value) {
  428. var actions = [];
  429. Object.keys(datas).some((key) => {
  430. if (datas[key].payeeId == ('' + value)) {
  431. actions.push(datas[key].payee);
  432. return true;
  433. }
  434. })
  435. return actions.join('');
  436. },
  437. onConfirmCapital(data){
  438. if (data.value != 2){
  439. this.capitalExpenditureOpen = false;
  440. this.projectForm = [];
  441. }else{
  442. this.capitalExpenditureOpen = true;
  443. }
  444. this.capitalExpenditureType = data.text;
  445. this.form.capitalExpenditureType = data.value;
  446. this.showcapital = false;
  447. },
  448. onConfirmFundType(data){
  449. console.log(data)
  450. this.projectForm.projectFundType = data.value;
  451. this.projectFundType = data.text;
  452. this.showFundType = false;
  453. },
  454. onConfirmProject(data){
  455. this.projectList.map(res => {
  456. if(res.projectName==data.text){
  457. this.projectForm.projectId = res.id
  458. this.projectForm.projectName = res.projectName
  459. this.projectForm.projectContractor = res.projectContractor
  460. this.projectForm.projectAmount = res.projectAmount
  461. }
  462. })
  463. this.showproject = false;
  464. },
  465. onConfirmPayee(data,index){
  466. for (var i = 0 ; i < this.chargeItme.length ; i++){
  467. this.chargeItme[i].showPayee = false;
  468. }
  469. this.chargeItme[index].payee = data.text;
  470. this.chargeItme[index].payeeId = data.value;
  471. this.chargeItme[index].showpayee = false;
  472. this.payeeSelectChange(data.value , index)
  473. },
  474. onConfirmBankType(data,index){
  475. for (var i = 0 ; i < this.chargeItme.length ; i++){
  476. this.chargeItme[i].showbankType = false;
  477. }
  478. this.chargeItme[index].bankTypeText = data.text;
  479. this.chargeItme[index].bankType = data.value;
  480. this.chargeItme[index].showbankType = false;
  481. },
  482. onConfirmPayer(data){
  483. this.form.payer = data.text;
  484. this.form.cashierId = data.value;
  485. this.showpayer = false;
  486. this.selectChange(data.value)
  487. },
  488. onConfirmLasj(data){
  489. this.form.applyDate = this.getNowFormatDate(data).substr(0,10);
  490. this.showlasj = false;
  491. },
  492. accountTypeChange(e){
  493. this.payeeList = [];
  494. this.queryParams.accountType = this.form.accountType
  495. this.queryParams.status = "0"
  496. listPayee(this.queryParams).then((response) => {
  497. this.payeeList = response.rows;
  498. response.rows.map((res,index) => {
  499. this.payeeList[index].text = res.payee;
  500. this.payeeList[index].value = res.id;
  501. })
  502. });
  503. },
  504. // 钱计算
  505. moneyChange(input) {
  506. console.log(input)
  507. let obj = {};
  508. obj = this.chargeItme.find((account) => {
  509. //model就是上面的数据源
  510. return parseFloat(account.incomeAmount).toFixed(2) === input; //筛选出匹配数据
  511. });
  512. let total = 0;
  513. this.chargeItme.forEach((money) => {
  514. total = (parseFloat(total) + parseFloat(money.incomeAmount)).toFixed(2)
  515. });
  516. this.$set(this.form, "expenditureAmount", total);
  517. },
  518. goAdd(){
  519. if(this.chargeItme.length<1){
  520. this.$notify({ type: 'danger', message: '请添加收款方信息' });
  521. return;
  522. }
  523. if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
  524. this.$notify({ type: 'danger', message: '付款事由禁止包含!' });
  525. return;
  526. }
  527. if(this.form.capitalExpenditureType==2){
  528. if(this.projectForm.projectName==""||this.projectForm.projectName==null){
  529. this.$notify({ type: 'danger', message: '请选择项目名称!' });
  530. return;
  531. }
  532. if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){
  533. this.$notify({ type: 'danger', message: '请输入工程发票号!' });
  534. return;
  535. }
  536. }
  537. this.$set(this.form, "payeeList", this.chargeItme);
  538. this.$set(this.form, "bankTypeList", this.chargeItme);
  539. this.$set(this.form, "accountTypeList", this.chargeItme);
  540. this.$set(this.form, "transferStatusList", this.chargeItme);
  541. addTransfer(this.form).then(response => {
  542. this.projectForm.outId = response.data.id
  543. this.$set(this.projectForm, "ynType", '1');
  544. if(this.form.capitalExpenditureType==2){
  545. addProjectto(this.projectForm).then(res => {
  546. customSubmit(response.data.id).then(res => {
  547. this.$toast.success('提交成功');
  548. setTimeout(function(){
  549. history.go(-1)
  550. },2000)
  551. })
  552. })
  553. }else{
  554. customSubmit(response.data.id).then(res => {
  555. this.$toast.success('提交成功');
  556. setTimeout(function(){
  557. history.go(-1)
  558. },2000)
  559. })
  560. }
  561. });
  562. },
  563. goUpdate(){
  564. if(this.chargeItme.length<1){
  565. this.$notify({ type: 'danger', message: '请添加收款方信息' });
  566. return;
  567. }
  568. if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){
  569. this.$notify({ type: 'danger', message: '付款事由禁止包含!' });
  570. return;
  571. }
  572. if(this.form.capitalExpenditureType==2){
  573. if(this.projectForm.projectName==""||this.projectForm.projectName==null){
  574. this.$notify({ type: 'danger', message: '请选择项目名称!' });
  575. return;
  576. }
  577. if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){
  578. this.$notify({ type: 'danger', message: '请输入工程发票号!' });
  579. return;
  580. }
  581. }
  582. this.$set(this.form, "payeeList", this.chargeItme);
  583. this.$set(this.form, "bankTypeList", this.chargeItme);
  584. this.$set(this.form, "accountTypeList", this.chargeItme);
  585. this.$set(this.form, "transferStatusList", this.chargeItme);
  586. this.projectForm.outId = this.form.id
  587. addTransfer(this.form).then((response) => {
  588. this.projectForm.outId = response.data.id
  589. this.$set(this.projectForm, "ynType", '1');
  590. if(this.form.capitalExpenditureType==2){
  591. addProjectto(this.projectForm).then(res => {
  592. this.$toast.success('保存成功');
  593. setTimeout(function(){
  594. history.go(-1)
  595. },2000)
  596. })
  597. }else{
  598. this.$toast.success('保存成功');
  599. setTimeout(function(){
  600. history.go(-1)
  601. },2000)
  602. }
  603. });
  604. },
  605. payeeSelectChange(select, i) {
  606. let obj = {};
  607. let fuzhitype = 0;
  608. obj = this.payeeList.find((account) => {
  609. //model就是上面的数据源
  610. return account.id === select ; //筛选出匹配数据
  611. });
  612. if(this.chargeItme != [] && this.chargeItme.length>1){
  613. this.chargeItme.some((value, index) => {
  614. if(value.payeeAccount != undefined &&value.payeeAccount != '' && obj.payeeAccount == value.payeeAccount&&index!=i){
  615. fuzhitype = 2;
  616. return true;
  617. }
  618. if(value.accountType != undefined &&value.accountType != '' && obj.accountType != value.accountType&&index!=i){
  619. fuzhitype = 1;
  620. return true;
  621. }
  622. });
  623. }
  624. if(fuzhitype == 0){
  625. this.$set(this.chargeItme[i], "payee",obj.payee)
  626. this.$set(this.chargeItme[i], "bankType", obj.bankType)
  627. this.$set(this.chargeItme[i], "payeeId", obj.id);
  628. this.$set(this.chargeItme[i], "payeeAccount", obj.payeeAccount);
  629. this.$set(this.chargeItme[i], "bankDeposit", obj.bankDeposit);
  630. this.$set(this.chargeItme[i], "accountType", obj.accountType);
  631. }else if(fuzhitype == 1){
  632. this.$set(this.chargeItme[i], "payee",'')
  633. this.$set(this.chargeItme[i], "bankType",'')
  634. this.$set(this.chargeItme[i], "payeeId", '');
  635. this.$set(this.chargeItme[i], "payeeAccount", '');
  636. this.$set(this.chargeItme[i], "bankDeposit", '');
  637. this.$set(this.chargeItme[i], "accountType", '');
  638. this.$notify({ type: 'danger', message: '请选择账户类型相同的收款方!' });
  639. }else if(fuzhitype == 2){
  640. this.$set(this.chargeItme[i], "payee",'')
  641. this.$set(this.chargeItme[i], "bankType",'')
  642. this.$set(this.chargeItme[i], "payeeId", '');
  643. this.$set(this.chargeItme[i], "payeeAccount", '');
  644. this.$set(this.chargeItme[i], "bankDeposit", '');
  645. this.$set(this.chargeItme[i], "accountType", '');
  646. this.$notify({ type: 'danger', message: '收款方已存在!' });
  647. }
  648. },
  649. selectChange(select) {
  650. let obj = {};
  651. obj = this.payerOptions.find((account) => {
  652. //model就是上面的数据源
  653. return account.id === select; //筛选出匹配数据
  654. });
  655. if(obj.payerFrom==1&&obj.operatorCode != null && obj.operatorCode != "" &&
  656. obj.enterpriseCode != null && obj.enterpriseCode != "" &&
  657. obj.accountPassword != null && obj.accountPassword != ""){
  658. this.$set(this.form, "bookId", obj.bookId);
  659. this.$set(this.form, "deptId", obj.deptId);
  660. this.$set(this.form, "cashierId", obj.id);
  661. this.$set(this.form, "payer", obj.accountName);
  662. this.$set(this.form, "payerAccount", obj.bankAccountNumber);
  663. this.$set(this.form, "operatorCode", obj.operatorCode);
  664. this.$set(this.form, "enterpriseCode", obj.enterpriseCode);
  665. this.$set(this.form, "payerFrom", '1');
  666. }else{
  667. if(obj.payerFrom==1){
  668. this.diglogStatus = false;
  669. this.$notify({ type: 'danger', message: "请完善付款方“操作员代码”、“企业编码”、“支付口令”等信息!" });
  670. this.$set(this.form,"payer","")
  671. this.$set(this.form,"payerAccount","")
  672. }else{
  673. this.$set(this.form, "payerFrom", obj.parerFrom);
  674. if(obj.operatorCode!=null&&obj.operatorCode!=''){
  675. this.$set(this.form, "operatorCode", obj.operatorCode);
  676. }else{
  677. this.$set(this.form, "operatorCode", '');
  678. }
  679. if(obj.enterpriseCode!=null&&obj.enterpriseCode!=''){
  680. this.$set(this.form, "enterpriseCode", obj.enterpriseCode);
  681. }else{
  682. this.$set(this.form, "enterpriseCode", '');
  683. }
  684. if(obj.accountPassword!=null&&obj.accountPassword!=''){
  685. this.$set(this.form, "accountPassword", obj.accountPassword);
  686. }else{
  687. this.$set(this.form, "accountPassword", '');
  688. }
  689. this.$set(this.form, "bookId",'');
  690. this.$set(this.form, "deptId", '');
  691. this.$set(this.form, "cashierId", obj.id);
  692. this.$set(this.form, "payer", obj.accountName);
  693. if(obj.payerFrom==6){
  694. getQmyeFlow(obj.bankAccountNumber).then((response) => {
  695. this.$set(this.form, "payerAccount", response.data);
  696. });
  697. }else {
  698. this.$set(this.form, "payerAccount", obj.bankAccountNumber);
  699. }
  700. }
  701. }
  702. },
  703. goBack(){
  704. window.history.go(-1)
  705. },
  706. //删除家庭成员
  707. deleteChargeItme(index){
  708. this.chargeItme.splice(index,1)
  709. },
  710. },
  711. }
  712. </script>
  713. <style scoped lang="scss">
  714. .app-container {
  715. padding: 2% 0;
  716. }
  717. .main_title{
  718. font-size: 0.4rem;
  719. color: #1D6FE9;
  720. margin: 0.2rem 6%;
  721. position: relative;
  722. }
  723. .main_box{
  724. width: 96%;
  725. margin: 0 auto;
  726. border-radius: 6px;
  727. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  728. overflow: hidden;
  729. background-color: #FFF;
  730. }
  731. .submitButton{
  732. width: 80%;
  733. margin: 0 auto;
  734. background-color: #1D6FE9;
  735. }
  736. .addFamily{
  737. position: absolute;
  738. top: -2px;
  739. right: 0;
  740. border-radius: 50%;
  741. }
  742. .deleteFamily{
  743. position: absolute;
  744. top: 0rem;
  745. right: 6%;
  746. z-index: 9;
  747. border-radius: 50%;
  748. }
  749. </style>