12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244 |
- <template>
- <div>
- <div class="customer-head">
- <div class="customer-back">
- <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
- @click="goBack(0)">返回列表
- </el-button>
- </div>
- <div class="add-customer-btn">
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
- v-if="editButton" @click="inEdit">编 辑
- </el-button>
- <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
- :disabled="isSaveBtn || form.businessStatus != '录入'" @click="submit">保 存
- </el-button>
- <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
- :disabled="form.businessStatus != '录入'" @click="application">单据请核
- </el-button>
- <el-button v-if="form.businessStatus == '提交审核'" class="el-button--small-yh" style="margin-left: 6px;"
- type="danger" size="small" @click="revokeApplication">撤销单据请核
- </el-button>
- <el-dropdown style="line-height: 0">
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
- size="small">
- 审 批<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </div>
- </div>
- <div style="margin-top: 50px">
- <trade-card title="基础信息">
- <avue-form :option="optionForm" v-model="form" ref="form">
- <tempalte slot="corpName" slot-scope="{ row }">
- <dic-select v-model="form.corpName" placeholder="客户" key="id" label="cnName" res="records"
- url="/blade-los/bcorps/listByType" :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('corpName', $event)" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="countryOfOrigin" slot-scope="{ row }">
- <dic-select v-model="form.countryOfOrigin" placeholder="原产地" key="id" label="cnName" res="records"
- url="/blade-los/bcountrys/list" :filterable="true" :remote="true" dataName="cnName"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="typeOfShipping" slot-scope="{ row }">
- <dic-select v-model="form.typeOfShipping" placeholder="运输方式" key="dictKey" label="dictValue"
- url="/blade-system/dict-biz/dictionary?code=mode_transport" :filterable="true"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="polCnName" slot-scope="{ row }">
- <dic-select v-model="form.polCnName" placeholder="起运港" key="id" label="cnName" res="records"
- url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('polCnName', $event)" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="podCnName" slot-scope="{ row }">
- <dic-select v-model="form.podCnName" placeholder="目的港" key="id" label="cnName" res="records"
- url="/blade-los/bports/list" :filterable="true" :remote="true" dataName="cnName"
- @selectChange="dicChange('podCnName', $event)" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="currency" slot-scope="{ row }">
- <dic-select v-model="form.currency" placeholder="币别" key="id" label="code" res="records"
- url="/blade-los/bcurrency/page" :filterable="true" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="abroadConsignorCname" slot-scope="{ row }">
- <dic-select v-model="form.abroadConsignorCname" placeholder="外国发货人" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('abroadConsignorCname', $event)"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="abroadBankMnemonicCode" slot-scope="{ row }">
- <dic-select ref="abankCode" v-model="form.abroadBankMnemonicCode" placeholder="银行助记码" key="id"
- label="accountNo" res="corpsBankList" url="/blade-los/bcorps/detail" :activateCreated="false"
- :filterable="true" @selectChange="dicChange('abroadBankMnemonicCode', $event)"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="abroadCurrency" slot-scope="{ row }">
- <dic-select v-model="form.abroadCurrency" placeholder="币别" key="id" label="code" res="records"
- url="/blade-los/bcurrency/page" :filterable="true" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="domesticConsigneeCname" slot-scope="{ row }">
- <dic-select v-model="form.domesticConsigneeCname" placeholder="国内收货人" key="id" label="cnName"
- res="records" url="/blade-los/bcorps/listByType" :filterable="true" :remote="true"
- dataName="cnName" @selectChange="dicChange('domesticConsigneeCname', $event)"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="domesticBankMnemonicCode" slot-scope="{ row }">
- <dic-select ref="dbankCode" v-model="form.domesticBankMnemonicCode" placeholder="银行助记码" key="id"
- label="accountNo" res="corpsBankList" url="/blade-los/bcorps/detail" :activateCreated="false"
- :filterable="true" @selectChange="dicChange('domesticBankMnemonicCode', $event)"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="domesticCurrency" slot-scope="{ row }">
- <dic-select v-model="form.domesticCurrency" placeholder="币别" key="id" label="code" res="records"
- url="/blade-los/bcurrency/page" :filterable="true" :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="documentType" slot-scope="{ row }">
- <dic-select v-model="form.documentType" placeholder="运输方式" key="dictKey" label="dictValue"
- url="/blade-system/dict-biz/dictionary?code=business_type" :filterable="true"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="affiliatedCompanyName" slot-scope="{ row }">
- <dic-select v-model="form.affiliatedCompanyName" placeholder="所属公司" key="id" label="deptName"
- url="/blade-system/dept/lazy-list?parentId=0" :filterable="true"
- @selectChange="dicChange('affiliatedCompanyName', $event)"
- :disabled="editDisabled"></dic-select>
- </tempalte>
- <tempalte slot="srcCnName" slot-scope="{ row }">
- <dic-select v-model="form.srcCnName" placeholder="业务员" key="id" label="realName" res="records"
- url="/blade-user/page" :filterable="true" :remote="true" dataName="realName"
- @selectChange="dicChange('srcCnName', $event)" :disabled="editDisabled"></dic-select>
- </tempalte>
- </avue-form>
- </trade-card>
- <trade-card title="货物明细">
- <avue-crud :option="option" :data="form.agentItemsList" id="out-table" ref="crud"
- @selection-change="selectionChange" @resetColumn="resetColumn('crud', 'option', 'optionBack', 376)"
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 376)">
- <template slot="menuLeft">
- <el-button type="primary" size="small" icon="el-icon-plus" :disabled="editDisabled"
- @click="addRow">新 增
- </el-button>
- <el-button type="success" size="small" :disabled="editDisabled" @click="allClick('首款账单')">首款账单
- </el-button>
- <el-button type="info" size="small" :disabled="editDisabled" @click="allClick('尾款账单')">尾款账单
- </el-button>
- <el-button type="warning" size="small" :disabled="selectionList.length == 0"
- @click="allClick('生成货代')">生成货代
- </el-button>
- <el-button size="small">打印账单
- </el-button>
- <el-dropdown>
- <el-button type="danger" size="small" :disabled="editDisabled">
- 申请付款<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="allClick('首款申请付款')">首款</el-dropdown-item>
- <el-dropdown-item @click.native="allClick('尾款申请付款')">尾款</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- <el-dropdown>
- <el-button type="danger" size="small" :disabled="editDisabled">
- 撤销申请付款<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="allClick('首款撤销申请付款')">首款</el-dropdown-item>
- <el-dropdown-item @click.native="allClick('尾款撤销申请付款')">尾款</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- <el-dropdown>
- <el-button type="primary" size="small">
- 应收待确认通知<i class="el-icon-arrow-down el-icon--right"></i>
- </el-button>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="allClick('首款应收待确认通知')">首款应收待确认通知</el-dropdown-item>
- <el-dropdown-item @click.native="allClick('尾款应收待确认通知')">尾款应收待确认通知</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </template>
- <template slot="boxType" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.boxType" placeholder="箱型" key="id" res="records"
- label="cnName" url="/blade-los/bcntrtypes/list" :filterable="true" :remote="true"
- dataName="cnName"></dic-select>
- <span v-else>{{ row.boxType }}</span>
- </template>
- <tempalte slot="orderReleaseMethod" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.orderReleaseMethod" placeholder="放单方式" key="dictKey"
- label="dictValue" url="/blade-system/dict-biz/dictionary?code=release_method"
- :filterable="true"></dic-select>
- <span v-else>{{ row.orderReleaseMethod }}</span>
- </tempalte>
- <template slot="hsCode" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.hsCode" placeholder="HSCODE" key="id" res="records"
- label="hsCode" url="/blade-los/bcommodity/list" :filterable="true" :remote="true"
- dataName="hsCode" @selectChange="rowDicChange('hsCode', $event, row)"></dic-select>
- <span v-else>{{ row.hsCode }}</span>
- </template>
- <tempalte slot="goodsType" slot-scope="{ row }">
- <dic-select v-if="row.$cellEdit" v-model="row.goodsType" placeholder="商品类型" key="dictKey"
- label="dictValue" url="/blade-system/dict-biz/dictionary?code=goods-type"
- :filterable="true"></dic-select>
- <span v-else>{{ row.goodsType }}</span>
- </tempalte>
- <tempalte slot="quantity" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit" v-model="row.quantity" @change="countChange(row)"
- :controls="false" placeholder="请输入 数量" size="small" style="width: 100%;"></el-input-number>
- <span v-else>{{ row.quantity }}</span>
- </tempalte>
- <tempalte slot="price" slot-scope="{ row }">
- <el-input-number v-if="row.$cellEdit" v-model="row.price" @change="countChange(row)"
- :controls="false" placeholder="请输入 单价" size="small" style="width: 100%;"></el-input-number>
- <span v-else>{{ row.price }}</span>
- </tempalte>
- <template slot="menu" slot-scope="{ row, index }">
- <el-button size="small" icon="el-icon-edit" type="text" :disabled="editDisabled"
- @click="rowCell(row, index)">编 辑</el-button>
- <el-button size="small" icon="el-icon-delete" type="text" :disabled="editDisabled"
- @click="rowDel(row, index)">删
- 除</el-button>
- </template>
- </avue-crud>
- </trade-card>
- <trade-card title="费用明细">
- <fee-info :form="form" :disabled="editDisabled" @getDetails="getDetails"></fee-info>
- </trade-card>
- <trade-card title="记录信息">
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
- <el-tab-pane label="收款记录" name="1">
- <avue-crud :data="form.recordListD" :option="option1"></avue-crud>
- </el-tab-pane>
- <el-tab-pane label="付款记录" name="2">
- <avue-crud :data="form.recordListC" :option="option1"></avue-crud>
- </el-tab-pane>
- <el-tab-pane label="开票记录" name="3">
- <avue-crud :data="form.recordInvoiceList" :option="option2"></avue-crud>
- </el-tab-pane>
- <el-tab-pane label="付汇记录" name="4">
- <avue-crud :data="form.recordRateList" :option="option3"></avue-crud>
- </el-tab-pane>
- <el-tab-pane label="通关记录" name="5">
- <avue-crud :data="form.recordClearanceList" :option="option4"></avue-crud>
- </el-tab-pane>
- </el-tabs>
- </trade-card>
- <containerTitle title="上传附件"></containerTitle>
- <c-upload :data="form.filesCenterList" :enumerationValue="76"
- deleteUrl="/blade-purchase-sales/orderfiles/update" display :disabled="editDisabled"></c-upload>
- </div>
- <!--审核弹窗-->
- <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
- :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
- <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
- </el-dialog>
- </div>
- </template>
- <script>
- import { submit, getDetail, remove, checkAgent, revokeCheckAgent, copyAgent, generateDownPaymentBill, generateBalancePaymentBill, ApplyForPayment, revokeApplyForPayment, confirmationNotification, generateFreightForwarder } from "@/api/tradeAgency/tradeAgency";
- import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
- import feeInfo from "@/components/tradeAgency/fee-info";
- import dicSelect from "@/components/dicSelect/main";
- import checkSchedule from "@/components/checkH/checkSchedule.vue";
- import { getBcorpsDetail } from "@/api/iosBasicData/bcorps";
- import { getToken } from "@/util/auth";
- import _ from "lodash";
- export default {
- name: "detailsPage",
- data() {
- return {
- selectionList: [],
- checkId: '', // 审核需要的id
- batchNo: '',
- checkScheduleDialog: false, // 审核弹窗
- editButton: false,
- editDisabled: false,
- activeName: '1',
- form: {
- billNoFormat: 'MYDL',
- businessTypeCode: 'MYDL',
- businessType: 'MYDL',
- businessStatus: '录入',
- agentItemsList: [],
- feeCenterListC: [],
- feeCenterListD: [],
- filesCenterList: [],
- recordClearanceList: [],
- recordInvoiceList: [],
- recordListC: [],
- recordListD: [],
- recordRateList: []
- },
- optionForm: {
- menuBtn: false,
- span: 8,
- disabled: false,
- column: [
- {
- label: '客户',
- prop: "corpName",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '合同号',
- prop: "contractNo",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '合同日期',
- prop: "contractDate",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00:00",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '原产地',
- prop: "countryOfOrigin",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '运输方式',
- prop: "typeOfShipping",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '起运港',
- prop: "polCnName",
- disabled: false,
- },
- {
- label: '目的港',
- prop: "podCnName",
- disabled: false,
- },
- {
- label: '币别',
- prop: "currency",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '外国发货人',
- prop: "abroadConsignorCname",
- disabled: false,
- },
- {
- label: '银行助记码',
- prop: "abroadBankMnemonicCode",
- disabled: false,
- },
- {
- label: '银行',
- prop: "abroadBank",
- disabled: false,
- },
- {
- label: '币别',
- prop: "abroadCurrency",
- disabled: false,
- },
- {
- label: '国内收货人',
- prop: "domesticConsigneeCname",
- disabled: false,
- },
- {
- label: '银行助记码',
- prop: "domesticBankMnemonicCode",
- disabled: false,
- },
- {
- label: '银行',
- prop: "domesticBank",
- disabled: false,
- },
- {
- label: '币别',
- prop: "domesticCurrency",
- disabled: false,
- },
- {
- label: '货值',
- prop: "goodsValue",
- disabled: true,
- },
- {
- label: '预付比例',
- prop: "advanceRatio",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '预付金额',
- prop: "prepaidAmount",
- disabled: false,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },
- {
- label: '单据类型',
- prop: "documentType",
- disabled: false,
- },
- {
- label: '所属公司',
- prop: "affiliatedCompanyName",
- disabled: false,
- },
- {
- label: '业务员',
- prop: "srcCnName",
- disabled: false,
- },
- {
- label: "审单状态",
- prop: "reviewStatus",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=audit_status",
- props: {
- label: "dictValue",
- value: "dictValue"
- },
- },
- {
- label: '备注',
- prop: "remarks",
- type: 'textarea',
- disabled: false,
- span: 6,
- minRows: 2,
- },
- ]
- },
- option: {},
- optionBack: {
- height: 'auto',
- calcHeight: 30,
- menuWidth: 140,
- tip: false,
- border: true,
- index: true,
- addBtn: false,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- refreshBtn: false,
- selection: true,
- align: 'center',
- column: [
- {
- label: "提单号",
- prop: "billNo",
- width: "120",
- cell: true,
- overHidden: true
- },
- {
- label: "箱型",
- prop: "boxType",
- width: "120",
- overHidden: true,
- },
- {
- label: "箱号",
- prop: "boxNo",
- width: "120",
- cell: true,
- overHidden: true
- },
- {
- label: "铅封号",
- prop: "leadSealNo",
- width: "120",
- cell: true,
- overHidden: true
- },
- {
- label: "放单方式",
- prop: "orderReleaseMethod",
- width: "160",
- overHidden: true
- },
- {
- label: "PI发票号",
- prop: "invoiceNo",
- width: "160",
- cell: true,
- overHidden: true
- },
- {
- label: "订单号",
- prop: "orderNo",
- width: "120",
- cell: true,
- overHidden: true
- },
- {
- label: "开船日期",
- prop: "etd",
- width: "120",
- overHidden: true
- },
- {
- label: "预计到港",
- prop: "estimateReachHarbor",
- width: "120",
- overHidden: true
- },
- {
- label: "实际到港",
- prop: "actualReachHarbor",
- width: "120",
- overHidden: true
- },
- {
- label: "HSCODE",
- prop: "hsCode",
- width: "120",
- overHidden: true
- },
- {
- label: "厂号",
- prop: "factoryNumber",
- width: "120",
- cell: true,
- overHidden: true
- },
- {
- label: "标签品名",
- prop: "labelProductName",
- width: "120",
- overHidden: true
- },
- {
- label: "商品类别",
- prop: "goodsType",
- width: "120",
- overHidden: true
- },
- {
- label: "件数",
- prop: "quantity",
- width: "120",
- overHidden: true
- },
- {
- label: "净重(kg)",
- prop: "netWeight",
- width: "120",
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true
- },
- {
- label: "单价",
- prop: "price",
- width: "120",
- overHidden: true
- },
- {
- label: "毛重(kg)",
- prop: "grossWeight",
- width: "120",
- cell: true,
- type: 'number',
- controls: false,
- overHidden: true
- },
- {
- label: "金额",
- prop: "amount",
- width: "120",
- overHidden: true
- },
- {
- label: "税率",
- prop: "taxRate",
- width: "120",
- overHidden: true
- },
- {
- label: "报关单号",
- prop: "customsDeclarationNo",
- width: "120",
- overHidden: true
- },
- {
- label: "报关日期",
- prop: "customsDeclarationDate",
- width: "120",
- overHidden: true
- },
- {
- label: "放行日期",
- prop: "releaseDate",
- width: "120",
- overHidden: true
- },
- {
- label: "派车日期",
- prop: "dispatchDate",
- width: "120",
- overHidden: true
- },
- {
- label: "库存件数",
- prop: "inventoryQuantity",
- width: "120",
- overHidden: true
- },
- {
- label: "货代",
- prop: "freightForwarder",
- width: "120",
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- width: "120",
- cell: true,
- overHidden: true
- }
- ]
- },
- option1: {
- header: false,
- border: true,
- index: true,
- menu: false,
- align: 'center',
- column: [
- {
- label: '户头',
- prop: 'account'
- },
- {
- label: '账号',
- prop: 'accountNumber'
- },
- {
- label: '银行',
- prop: 'bank'
- },
- {
- label: '金额',
- prop: 'amount'
- },
- {
- label: '备注',
- prop: 'remarks'
- }
- ]
- },
- option2: {
- header: false,
- border: true,
- index: true,
- menu: false,
- align: 'center',
- column: [
- {
- label: '开票抬头',
- prop: 'invoiceHeader'
- },
- {
- label: '开票金额',
- prop: 'amount'
- },
- {
- label: '税率',
- prop: 'taxRate'
- },
- {
- label: '开票内容',
- prop: 'invoiceContent'
- },
- {
- label: '备注',
- prop: 'remarks'
- }
- ]
- },
- option3: {
- header: false,
- border: true,
- index: true,
- menu: false,
- align: 'center',
- column: [
- {
- label: '提单号',
- prop: 'billNo'
- },
- {
- label: '报关单号',
- prop: 'customsDeclarationNo'
- },
- {
- label: '日期',
- prop: 'date'
- },
- {
- label: '状态',
- prop: 'status'
- },
- {
- label: '备注',
- prop: 'remarks'
- }
- ]
- },
- option4: {
- header: false,
- border: true,
- index: true,
- menu: false,
- align: 'center',
- column: [
- {
- label: '日期',
- prop: 'date'
- },
- {
- label: '金额',
- prop: 'amount'
- },
- {
- label: '备注',
- prop: 'remarks'
- }
- ]
- }
- }
- },
- components: {
- dicSelect,
- feeInfo,
- checkSchedule
- },
- props: {
- detailData: Object
- },
- async created() {
- this.option = await this.getColumnData(this.getColumnName(376), this.optionBack);
- if (this.detailData.id) {
- this.editButton = true
- this.editDisabled = true
- this.optionForm.disabled = true
- this.getDetails(this.detailData.id)
- }
- },
- methods: {
- dicChange(name, row) {
- if (name == 'corpName') {
- if (row) {
- this.form.corpId = row.id
- } else {
- this.form.corpId = null
- }
- }
- if (name == 'polCnName') {
- console.log(row)
- if (row) {
- this.form.polId = row.id
- this.form.polCode = row.code
- this.form.polEnName = row.enName
- } else {
- this.form.polId = null
- this.form.polCode = null
- this.form.polEnName = null
- }
- }
- if (name == 'podCnName') {
- if (row) {
- this.form.polId = row.id
- this.form.polCode = row.code
- this.form.polEnName = row.enName
- } else {
- this.form.polId = null
- this.form.polCode = null
- this.form.polEnName = null
- }
- }
- if (name == 'abroadConsignorCname') {
- if (row) {
- this.$refs.abankCode.IdGetDicData({ id: row.id })
- this.form.abroadConsignorId = row.id
- this.form.abroadBankMnemonicCode = null
- this.form.abroadBank = null
- this.form.abroadCurrency = null
- } else {
- this.form.abroadConsignorId = null
- this.form.abroadBankMnemonicCode = null
- this.form.abroadBank = null
- this.form.abroadCurrency = null
- }
- }
- if (name == 'domesticConsigneeCname') {
- if (row) {
- this.$refs.dbankCode.IdGetDicData({ id: row.id })
- this.form.domesticConsigneeId = row.id
- this.form.domesticBankMnemonicCode = null
- this.form.domesticBank = null
- this.form.domesticCurrency = null
- } else {
- this.form.domesticConsigneeId = null
- this.form.domesticBankMnemonicCode = null
- this.form.domesticBank = null
- this.form.domesticCurrency = null
- }
- }
- if (name == 'affiliatedCompanyName') {
- if (row) {
- this.form.affiliatedCompanyTId = row.id
- } else {
- this.form.affiliatedCompanyId = null
- }
- }
- if (name == 'srcCnName') {
- if (row) {
- this.form.srcId = row.id
- } else {
- this.form.srcId = null
- }
- }
- if (name == 'abroadBankMnemonicCode') {
- if (row) {
- this.form.abroadBank = row.accountBank
- this.form.abroadCurrency = row.curNo
- } else {
- this.form.abroadBank = null
- this.form.abroadCurrency = null
- }
- }
- if (name == 'domesticBankMnemonicCode') {
- if (row) {
- this.form.domesticBank = row.accountBank
- this.form.domesticCurrency = row.curNo
- } else {
- this.form.domesticBank = null
- this.form.domesticCurrency = null
- }
- }
- },
- rowDicChange(name, row, el) {
- if (name == 'hsCode') {
- if (row) {
- el.labelProductName = row.cnName
- } else {
- el.labelProductName = null
- }
- }
- },
- countChange(row) {
- row.amount = _.multiply(Number(row.quantity ? row.quantity : 0), Number(row.price ? row.price : 0))
- },
- addRow() {
- if (!this.form.corpId) {
- return this.$message.error("请选择客户名称");
- }
- this.form.agentItemsList.push({ $cellEdit: true })
- // this.$refs.crud.rowAdd()
- },
- rowCell(row, index) {
- if (row.$cellEdit == true) {
- this.$set(row, "$cellEdit", false);
- } else {
- this.$set(row, "$cellEdit", true);
- }
- },
- rowDel(row, index) {
- this.$confirm("确定删除数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- if (row.id) {
- remove({ ids: row.id }).then(res => {
- this.form.agentItemsList.splice(index, 1);
- this.$message.success("成功删除");
- })
- } else {
- this.form.agentItemsList.splice(index, 1);
- }
- });
- },
- selectionChange(list) {
- this.selectionList = list
- },
- getDetails(id) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- getDetail({ id: id }).then(res => {
- this.form = res.data.data
- }).finally(() => {
- loading.close()
- })
- },
- inEdit() {
- this.editButton = false
- if (this.form.businessStatus == '录入') {
- this.editDisabled = false
- this.optionForm.disabled = false
- }
- },
- allClick(name) {
- if (name == '首款账单') {
- if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
- bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
- res.data.data.forEach(e => {
- if (this.form.currency == e.code) {
- this.$prompt('请输入汇率', '首款账单', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- inputValue: e.exrate
- }).then(({ value }) => {
- let obj = {}
- obj = {
- ...this.form,
- exchangeRate: value
- }
- generateDownPaymentBill(obj).then(res => {
- this.$message.success("成功生成首款账单");
- this.getDetails(this.form.id)
- })
- })
- }
- })
- })
- }
- if (name == '尾款账单') {
- if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
- bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
- res.data.data.forEach(e => {
- if (this.form.currency == e.code) {
- this.$prompt('请输入汇率', '尾款账单', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- inputValue: e.exrate
- }).then(({ value }) => {
- let obj = {}
- obj = {
- ...this.form,
- exchangeRate: value
- }
- generateBalancePaymentBill(obj).then(res => {
- this.$message.success("成功生成首款账单");
- this.getDetails(this.form.id)
- })
- })
- }
- })
- })
- }
- if (name == '首款申请付款') {
- if (this.form.applyForPayment == 1) return this.$message.error("请勿重复申请");
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/tradeAgency/index',
- pageStatus: '',
- pageLabel: '贸易代理(T)',
- paidApplication: 'FFSQ-SK'
- }
- ApplyForPayment(obj).then(res => {
- this.$message.success("申请付款成功");
- this.getDetails(this.form.id)
- })
- }
- if (name == '尾款申请付款') {
- if (this.form.applyForPaymentBalance == 1) return this.$message.error("请勿重复申请");
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/tradeAgency/index',
- pageStatus: '',
- pageLabel: '贸易代理(T)',
- paidApplication: 'FFSQ-WK'
- }
- ApplyForPayment(obj).then(res => {
- this.$message.success("申请付款成功");
- this.getDetails(this.form.id)
- })
- }
- if (name == '首款撤销申请付款') {
- if (this.form.applyForPayment == 0) return this.$message.error("未申请付款");
- let obj = {}
- obj = {
- id: this.form.id,
- paidApplication: 'FFSQ-SK'
- }
- revokeApplyForPayment(obj).then(res => {
- this.$message.success("撤销申请付款成功");
- this.getDetails(this.form.id)
- })
- }
- if (name == '尾款撤销申请付款') {
- if (this.form.applyForPaymentBalance == 0) return this.$message.error("未申请付款");
- let obj = {}
- obj = {
- id: this.form.id,
- paidApplication: 'FFSQ-WK'
- }
- revokeApplyForPayment(obj).then(res => {
- this.$message.success("撤销申请付款成功");
- this.getDetails(this.form.id)
- })
- }
- if (name == '首款应收待确认通知') {
- this.$confirm("确定发起通知?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/tradeAgency/index',
- pageStatus: '',
- pageLabel: '贸易代理(T)',
- paidApplication: 'YSQR-SK'
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmationNotification(obj).then(res => {
- this.$message.success("通知成功");
- }).finally(() => {
- loading.close();
- })
- });
- }
- if (name == '尾款应收待确认通知') {
- this.$confirm("确定发起通知?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/tradeAgency/index',
- pageStatus: '',
- pageLabel: '贸易代理(T)',
- paidApplication: 'YSQR-WK'
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- confirmationNotification(obj).then(res => {
- this.$message.success("通知成功");
- }).finally(() => {
- loading.close();
- })
- });
- }
- if (name == '生成货代') {
- let obj = {
- ...this.form,
- agentItemsList: this.selectionList
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- generateFreightForwarder(obj).then(res => {
- this.$message.success("生成货代成功");
- }).finally(() => {
- loading.close();
- })
- }
- },
- submit() {
- this.$refs["form"].validate((valid, done) => {
- done();
- if (valid) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- this.form.businessDate = this.form.contractDate
- submit(this.form).then(res => {
- this.$message.success("保存成功");
- this.getDetails(res.data.data.id)
- }).finally(() => {
- loading.close();
- })
- } else {
- return false;
- }
- });
- },
- application() {
- if (this.form.downPayment != 1) return this.$message.error("未申请首款付款");
- if (this.form.balancePayment != 1) return this.$message.error("未申请尾款付款");
- if (this.form.applyForPayment != 1) return this.$message.error("未申请首款付款");
- if (this.form.applyForPaymentBalance != 1) return this.$message.error("未申请尾款付款");
- this.$confirm("确定请核数据?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- url: '/tradeAgency/tradeAgency/index',
- pageStatus: '',
- pageLabel: '贸易代理(T)',
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- checkAgent(obj).then(res => {
- this.$message.success("请核成功");
- this.getDetails(res.data.data.id)
- }).finally(() => {
- loading.close();
- })
- });
- },
- revokeApplication() {
- this.$confirm("确定撤销请核?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- let obj = {}
- obj = {
- id: this.form.id,
- }
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- });
- revokeCheckAgent(obj).then(res => {
- this.$message.success("撤销请核成功");
- this.getDetails(res.data.data.id)
- this.editDisabled = false
- this.optionForm.disabled = false
- }).finally(() => {
- loading.close();
- })
- });
- },
- //请核关闭
- choceScheduleFun() {
- this.checkScheduleDialog = false
- },
- //自定义列保存
- async saveColumn(ref, option, optionBack, code) {
- const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- //自定义列重置
- async resetColumn(ref, option, optionBack, code) {
- this[option] = this[optionBack];
- const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
- if (inSave) {
- this.$message.success("重置成功");
- this.$refs[ref].$refs.dialogColumn.columnBox = false;
- }
- },
- goBack(type) {
- this.$emit("goBack", type);
- this.$emit('updateKey')
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-form-item {
- margin-bottom: 8px !important;
- }
- ::v-deep .el-table .cell {
- padding: 0 2px !important;
- .el-form-item {
- margin-bottom: 0px !important;
- }
- }
- ::v-deep .avue-crud .el-table .el-form-item__label {
- left: -1px;
- }
- ::v-deep#out-table .back-one {
- background: #ecf5ff !important;
- }
- ::v-deep#out-table .back-two {
- background: #ecf5ff !important;
- }
- </style>
|