1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117 |
- <template>
- <div class="app-container">
- <div v-show="jiGang == false">
- <el-form
- :model="query"
- ref="queryForm"
- v-show="showSearch"
- :inline="true"
- label-width="88px"
- >
- <el-row>
- <el-form-item label="提单号" prop="fMblno">
- <el-input
- v-model="query.fMblno"
- placeholder="请输入提单号"
- clearable
- size="small"
- />
- </el-form-item>
- <el-form-item>
- <el-button
- type="cyan"
- icon="el-icon-search"
- size="mini"
- @click="getList"
- >搜索
- </el-button
- >
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
- >重置
- </el-button
- >
- </el-form-item>
- </el-row>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd()"
- v-hasPermi="['warehouseBusiness:containerPort:add']"
- >新增
- </el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="success"
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['agreement:agreementTask:edit']"
- >修改
- </el-button>
- </el-col>
- <!-- <el-col :span="1.5">-->
- <!-- <el-button-->
- <!-- type="danger"-->
- <!-- icon="el-icon-delete"-->
- <!-- size="mini"-->
- <!-- :disabled="multiple"-->
- <!-- @click="handleDelete"-->
- <!-- v-hasPermi="['agreement:agreementTask:remove']"-->
- <!-- >删除-->
- <!-- </el-button>-->
- <!-- </el-col>-->
- <!-- <el-col :span="1.5">-->
- <!-- <el-button-->
- <!-- type="info"-->
- <!-- icon="el-icon-download"-->
- <!-- size="mini"-->
- <!-- :disabled="single"-->
- <!-- @click="handleUpdate(null, 2)"-->
- <!-- v-hasPermi="['agreement:agreementStorage:export']"-->
- <!-- >复制新增-->
- <!-- </el-button>-->
- <!-- </el-col>-->
- <right-toolbar
- :showSearch.sync="showSearch"
- @queryTable="getList"
- ></right-toolbar>
- </el-row>
- <el-table
- v-loading="loading"
- :data="agreementList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column type="selection" width="55" align="center"/>
- <el-table-column type="index" label="行号" align="center" fixed width="60"/>
- <el-table-column
- label="参看编号"
- sortable
- align="center"
- prop="fMblno"
- fixed
- show-overflow-tooltip
- />
- <el-table-column
- label="单据类型"
- sortable
- align="center"
- prop="fBilltype"
- fixed
- show-overflow-tooltip
- />
- <el-table-column
- label="单据编号"
- sortable
- align="center"
- prop="fBillno"
- fixed
- show-overflow-tooltip
- />
- <el-table-column
- label="单据日期"
- sortable
- align="center"
- prop="fBsdate"
- fixed
- show-overflow-tooltip
- />
- <el-table-column
- label="制单人"
- sortable
- align="center"
- prop="createBy"
- fixed
- show-overflow-tooltip
- />
- <el-table-column
- label="备注"
- sortable
- align="center"
- prop="remark"
- fixed
- show-overflow-tooltip
- />
- <el-table-column
- label="操作"
- align="center"
- class-name="small-padding fixed-width"
- >
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-view"
- @click="handleUpdate(scope.row)"
- >查看
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-if="scope.row.fBillstatus === '暂存'"
- v-hasPermi="['warehouseBusiness:containerPort:edit']"
- >修改
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-if="scope.row.fBillstatus === '暂存'"
- v-hasPermi="['warehouseBusiness:containerPort:remove']"
- >删除
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div style="padding-top: 10px;float: right;padding-bottom: 20px">
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 20, 30, 40]"
- background
- layout="sizes, prev, pager, next"
- :total="total">
- </el-pagination>
- </div>
- </div>
- <div v-show="jiGang == true">
- <div style="margin-bottom: 20px;">
- <el-button round icon="el-icon-arrow-left" @click="open" size="small">返回列表</el-button>
- <el-button type="primary" round size="small" @click="submitForm" icon="el-icon-edit">保 存</el-button>
- <el-button type="success" round size="small" @click="submit" icon="el-icon-check" :disabled="disabled">提 交</el-button>
- <el-button type="danger" round size="small" icon="el-icon-close" @click="cancellation"
- v-if="queryParams.fBillstatus >2">撤销提交
- </el-button>
- </div>
- <el-form
- :model="queryParams"
- ref="rules"
- :rules="rules"
- :inline="true"
- label-width="88px"
- >
- <el-row>
- <el-form-item label="日期" prop="fBsdate">
- <el-date-picker
- v-model="queryParams.fBsdate"
- type="date"
- value-format="yyyy-MM-dd"
- :disabled="disabled"
- clearable
- size="small"
- placeholder="选择日期"
- >
- </el-date-picker>
- </el-form-item>
- <el-form-item label="参看编号" prop="fMblno">
- <el-input
- v-model="queryParams.fMblno"
- placeholder="请输入参看编号"
- :disabled="disabled"
- clearable
- size="small"
- />
- </el-form-item>
- <el-form-item label="单据编号" prop="fMblno">
- <el-input
- v-model="queryParams.fBillno"
- placeholder="请输入单据编号"
- :disabled="disabled"
- clearable
- size="small"
- />
- </el-form-item>
- <el-form-item label="备注" prop="fMblno">
- <el-input
- v-model="queryParams.remark"
- placeholder="请输入备注"
- :disabled="disabled"
- clearable
- size="small"
- />
- </el-form-item>
- </el-row>
- </el-form>
- <h3><i class="el-icon-circle-plus"></i>收款信息</h3>
- <div
- class="dialogTableTitle flex a-center jlr"
- style="
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin: 10px 0;
- "
- >
- <div>
- <el-button
- size="small"
- type="primary"
- @click.prevent="addCollection()"
- :disabled="disabled"
- >新行
- </el-button>
- <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
- >删除
- </el-button> -->
- </div>
- </div>
- <el-table
- :data="warehouseDrList"
- ref="table"
- tooltip-effect="dark"
- border
- stripe
- show-summary
- :disabled="disabled"
- :summary-method="warehouseDrSummaries"
- >
- <el-table-column type="selection" width="55" align="center"/>
- <el-table-column label="序号" type="index" width="80">
- </el-table-column>
- <el-table-column
- prop="fCorpid"
- header-align="center"
- align="center"
- width="180px"
- label="客户名称"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fCorpid"
- filterable
- remote
- :remote-method="corpsRemoteMethod"
- placeholder="客户名称"
- :disabled="disabled"
- >
- <el-option
- v-for="(dict, index) in KHblnoOptions"
- :key="index.fId"
- :label="dict.fName"
- :value="dict.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="fFeeunitid"-->
- <!-- header-align="center"-->
- <!-- align="center"-->
- <!-- width="180px"-->
- <!-- label="码头"-->
- <!-- >-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-select-->
- <!-- style="width: 80%"-->
- <!-- v-model="scope.row.fFeeunitid"-->
- <!-- filterable-->
- <!-- :disabled="disabled"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="(dict, index) in businessTypeOption"-->
- <!-- :key="index.dictValue"-->
- <!-- :label="dict.dictLabel"-->
- <!-- :value="dict.dictValue"-->
- <!-- ></el-option>-->
- <!-- </el-select>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="fFeeid"
- header-align="center"
- align="center"
- width="180px"
- label="费用名称"
- >
- <template slot-scope="scope">
- <el-select
- style="width: 80%"
- v-model="scope.row.fFeeid"
- filterable
- :disabled="disabled"
- >
- <el-option
- v-for="(dict, index) in fDNameOptions"
- :key="index.fId"
- :label="dict.fName"
- :value="dict.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fFeeUnitid"
- header-align="center"
- align="center"
- width="180px"
- label="计费单位"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fFeeunitid"
- placeholder="请选择计费单位"
- :disabled="disabled"
- clearable
- >
- <el-option
- v-for="dict in fFeetUnitOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="fInventoryDays"-->
- <!-- header-align="center"-->
- <!-- align="center"-->
- <!-- width="180px"-->
- <!-- label="箱型"-->
- <!-- >-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-select-->
- <!-- v-model="scope.row.fInventoryDays"-->
- <!-- placeholder="请选择箱型"-->
- <!-- clearable-->
- <!-- :disabled="disabled"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="(dict, index) in jFeetunitOptions"-->
- <!-- :key="index.fId"-->
- <!-- :label="dict.fNo"-->
- <!-- :value="dict.fId"-->
- <!-- />-->
- <!-- </el-select>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- prop="fQty"-->
- <!-- header-align="center"-->
- <!-- align="center"-->
- <!-- width="130px"-->
- <!-- label="箱量"-->
- <!-- >-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-input-->
- <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
- <!-- v-model="scope.row.fQty"-->
- <!-- placeholder="箱量"-->
- <!-- @input="calculation(scope.row)"-->
- <!-- show-word-limit-->
- <!-- :disabled="disabled"-->
- <!-- />-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="fUnitprice"
- header-align="center"
- align="center"
- width="130px"
- label="单价"
- >
- <template slot-scope="scope">
- <el-input
- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
- v-model="scope.row.fUnitprice"
- placeholder="单价"
- show-word-limit
- @input="calculation(scope.row)"
- :disabled="disabled"
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fAmt"
- header-align="center"
- align="center"
- width="130px"
- label="金额"
- >
- <template slot-scope="scope">
- <el-input
- :disabled="disabled"
- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
- v-model="scope.row.fAmt"
- placeholder="金额"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fCurrency"
- header-align="center"
- align="center"
- width="130px"
- label="币别"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fCurrency"
- :disabled="disabled"
- placeholder="币别"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fExrate"
- header-align="center"
- align="center"
- width="130px"
- label="汇率"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fExrate"
- :disabled="disabled"
- placeholder="汇率"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="remark"
- header-align="center"
- align="center"
- width="150px"
- label="备注"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.remark"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- placeholder="备注"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- label="操作"
- >
- <template slot-scope="scope">
- <el-button
- @click.native.prevent="
- deleteRow(scope.$index, warehouseDrList)
- "
- size="small"
- :disabled="disabled"
- >移除
- </el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <h3><i class="el-icon-remove"></i>付款信息</h3>
- <div
- class="dialogTableTitle flex a-center jlr"
- style="
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin: 10px 0;
- "
- >
- <div>
- <el-button
- type="primary"
- @click.prevent="addpayment()"
- size="small"
- :disabled="disabled"
- >新行
- </el-button>
- </div>
- </div>
- <el-table
- :data="warehouseCrList"
- :disabled="disabled"
- ref="table"
- tooltip-effect="dark"
- border
- stripe
- show-summary
- :summary-method="warehouseDrSummaries"
- >
- <el-table-column type="selection" width="55" align="center"/>
- <el-table-column label="序号" type="index" width="80">
- </el-table-column>
- <el-table-column
- prop="fCorpid"
- header-align="center"
- align="center"
- width="180px"
- label="客户名称"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fCorpid"
- filterable
- remote
- :remote-method="corpsRemoteMethod"
- placeholder="客户名称"
- :disabled="disabled"
- >
- <el-option
- v-for="(dict, index) in KHblnoOptions"
- :key="index.fId"
- :label="dict.fName"
- :value="dict.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="fFeeunitid"-->
- <!-- header-align="center"-->
- <!-- align="center"-->
- <!-- width="180px"-->
- <!-- label="码头"-->
- <!-- >-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-select-->
- <!-- style="width: 80%"-->
- <!-- v-model="scope.row.fFeeunitid"-->
- <!-- filterable-->
- <!-- :disabled="disabled"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="(dict, index) in businessTypeOption"-->
- <!-- :key="index.dictValue"-->
- <!-- :label="dict.dictLabel"-->
- <!-- :value="dict.dictValue"-->
- <!-- ></el-option>-->
- <!-- </el-select>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="fFeeid"
- header-align="center"
- align="center"
- width="180px"
- label="费用名称"
- >
- <template slot-scope="scope">
- <el-select
- style="width: 80%"
- v-model="scope.row.fFeeid"
- filterable
- :disabled="disabled"
- >
- <el-option
- v-for="(dict, index) in fCNameOptions"
- :key="index.fId"
- :label="dict.fName"
- :value="dict.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fFeeUnitid"
- header-align="center"
- align="center"
- width="180px"
- label="计费单位"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fFeeunitid"
- placeholder="请选择计费单位"
- :disabled="disabled"
- clearable
- >
- <el-option
- v-for="dict in fFeetUnitOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="fInventoryDays"-->
- <!-- header-align="center"-->
- <!-- align="center"-->
- <!-- width="180px"-->
- <!-- label="箱型"-->
- <!-- >-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-select-->
- <!-- v-model="scope.row.fInventoryDays"-->
- <!-- placeholder="请选择箱型"-->
- <!-- clearable-->
- <!-- :disabled="disabled"-->
- <!-- >-->
- <!-- <el-option-->
- <!-- v-for="(dict, index) in jFeetunitOptions"-->
- <!-- :key="index.fId"-->
- <!-- :label="dict.fNo"-->
- <!-- :value="dict.fId"-->
- <!-- />-->
- <!-- </el-select>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- prop="fQty"-->
- <!-- header-align="center"-->
- <!-- align="center"-->
- <!-- width="130px"-->
- <!-- label="箱量"-->
- <!-- >-->
- <!-- <template slot-scope="scope">-->
- <!-- <el-input-->
- <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
- <!-- v-model="scope.row.fQty"-->
- <!-- placeholder="箱量"-->
- <!-- @input="calculation(scope.row)"-->
- <!-- show-word-limit-->
- <!-- :disabled="disabled"-->
- <!-- />-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="fUnitprice"
- header-align="center"
- align="center"
- width="130px"
- label="单价"
- >
- <template slot-scope="scope">
- <el-input
- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
- v-model="scope.row.fUnitprice"
- placeholder="单价"
- show-word-limit
- @input="calculation(scope.row)"
- :disabled="disabled"
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fAmt"
- header-align="center"
- align="center"
- width="130px"
- label="金额"
- >
- <template slot-scope="scope">
- <el-input
- :disabled="disabled"
- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
- v-model="scope.row.fAmt"
- placeholder="金额"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fCurrency"
- header-align="center"
- align="center"
- width="130px"
- label="币别"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fCurrency"
- :disabled="disabled"
- placeholder="币别"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fExrate"
- header-align="center"
- align="center"
- width="130px"
- label="汇率"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fExrate"
- :disabled="disabled"
- placeholder="汇率"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="remark"
- header-align="center"
- align="center"
- width="150px"
- label="备注"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.remark"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- placeholder="备注"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- label="操作"
- >
- <template slot-scope="scope">
- <!-- <el-button size="small">审核费用</el-button> -->
- <el-button
- @click.native.prevent="
- deleteRow(scope.$index, warehouseCrList)
- "
- size="small"
- :disabled="disabled"
- >移除
- </el-button
- >
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- </template>
- <script>
- import {
- listCorps,
- preservation,
- submit,
- allInformation,
- single,
- singleDeletion,
- listCorps_s,
- revokeContainerPort
- } from '@/api/otherFinancial'
- import {listFees} from '@/api/basicdata/fees'
- export default {
- name: 'jiGang',
- data() {
- return {
- rules:{
- fBsdate:[{required: true, message: ' ', trigger: 'blur'}],
- fMblno:[{required: true, message: ' ', trigger: 'blur'}]
- },
- showSearch: true,
- jiGang: false,
- disabled: false,
- agreementList: [],
- warehouseCrList: [],
- fCNameOptions: [],
- fFeeid_s: [],
- fStltypeOptions: [],
- jFeetunitOptions: [],
- KHblnoOptions: [],
- browseStatus: false,
- fDNameOptions: [],
- warehouseDrList: [],
- businessTypeOption: [],
- loading: true,
- blnoOptions: [],
- single: true,
- total: 0,
- query: {
- pageNum: 1,
- pageSize: 10
- },
- selection: [],
- queryParams: {},
- fFeetUnitOptions:[]
- }
- },
- created() {
- //付费
- listFees({fDc: "C"}).then((response) => {
- this.fCNameOptions = response.rows;
- });
- //收费
- listFees({fDc: "D"}).then((response) => {
- this.fDNameOptions = response.rows;
- });
- this.getDicts("data_unitfees").then((response) => {
- this.fFeetUnitOptions = response.data;
- });
- allInformation().then(res => {
- if (res.data.corpList) {
- this.KHblnoOptions = res.data.corpList
- }
- if (res.data.pierList) {
- this.businessTypeOption = res.data.pierList
- }
- if (res.data.cntrList) {
- this.jFeetunitOptions = res.data.cntrList
- }
- if (res.data.fees) {
- this.fFeeid_s = res.data.fees
- }
- })
- this.getList()
- },
- methods: {
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`);
- this.query.pageSize = val
- this.getList()
- },
- handleCurrentChange(val) {
- console.log(`当前页: ${val}`);
- this.query.pageNum = val
- this.getList()
- },
- getList() {
- listCorps_s(this.query).then(res => {
- this.total = res.total
- console.log(res)
- this.loading = false
- this.agreementList = res.rows
- })
- },
- corpsRemoteMethod(name) {
- if (name == null || name === '') {
- return false
- }
- let queryParams = {pageNum: 1, fName: name, fTypeid: 1}
- listCorps(queryParams).then((response) => {
- console.log(response)
- this.fMblnoOptions = response.rows
- })
- },
- corpsRemote(name) {
- if (name == null || name === '') {
- return false
- }
- let queryParams = {pageNum: 1, fName: name, fTypeid: 2}
- listCorps(queryParams).then((response) => {
- console.log(response)
- this.blnoOptions = response.rows
- })
- },
- changeFeeId(row) {
- for (let li in this.fWbuOptions) {
- if (row.fFeeid === this.fWbuOptions[li].fId) {
- this.$set(row, 'fFeeunitid', this.fWbuOptions[li].fFeeunitid + '')
- this.changeFeeUnit(row)
- break
- }
- }
- },
- resetQuery() {
- this.query = {
- pageNum: 1,
- pageSize: 10
- }
- },
- open() {
- this.$confirm('是否确定返回列表?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.jiGang = false
- }).catch(() => {
- })
- },
- handleSelectionChange(selection) {
- console.log(selection)
- this.selection = selection
- if (selection.length === 1) {
- this.single = false
- } else {
- this.single = true
- }
- },
- handleUpdate(row) {
- let fId
- if (this.selection.length == 1) {
- fId = this.selection[0].fId
- } else {
- fId = row.fId
- }
- single(fId).then(res => {
- if (res.code === 200) {
- this.jiGang = true
- this.queryParams = res.data.warehouseBills
- this.warehouseDrList = res.data.feesDrList
- this.warehouseCrList = res.data.feesCrList
- for (let item in this.warehouseDrList){
- this.warehouseDrList[item].fFeeunitid = this.warehouseDrList[item].fFeeunitid + ''
- }
- for (let item in this.warehouseCrList){
- this.warehouseCrList[item].fFeeunitid = this.warehouseCrList[item].fFeeunitid + ''
- }
- if (this.queryParams.fBillstatus !== 2) {
- this.disabled = true
- } else {
- this.disabled = false
- }
- }
- })
- },
- handleDelete(row) {
- singleDeletion(row.fId).then(res => {
- console.log(res)
- if (res.code === 200){
- this.$message.success(res.msg);
- this.getList()
- }
- })
- },
- handleAdd() {
- this.jiGang = true
- this.disabled = false
- this.queryParams = {}
- this.warehouseDrList = []
- this.warehouseCrList = []
- },
- addpayment() {
- this.warehouseCrList.push({
- fCorpid:'',
- fFeeid:'',
- fFeeUnitid:'',
- fUnitprice:'',
- fAmt:'',
- fExrate:'',
- remark:'',
- fCurrency:'RMB'
- })
- this.fWbuOptions = []
- let queryParams = {pageNum: 1, fDc: 'C'}
- listFees(queryParams).then((response) => {
- this.fCNameOptions = response.rows
- })
- },
- deleteRow(index, rows) {
- rows.splice(index, 1)
- },
- submitForm() {
- this.$refs["rules"].validate((valid) => {
- if (valid) {
- let formDatae = new window.FormData()
- formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
- formDatae.append('feesDr', JSON.stringify(this.warehouseDrList))
- formDatae.append('feesCr', JSON.stringify(this.warehouseCrList))
- preservation(formDatae).then(res => {
- console.log(res)
- if (res.code === 200) {
- this.$message.success('保存成功');
- this.getList()
- this.jiGang = false
- }
- })
- }
- });
- },
- submit() {
- this.$refs["rules"].validate((valid) => {
- if (valid) {
- let formDatae = new window.FormData()
- formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
- formDatae.append('feesDr', JSON.stringify(this.warehouseDrList))
- formDatae.append('feesCr', JSON.stringify(this.warehouseCrList))
- submit(formDatae).then(res => {
- console.log(res)
- if (res.code === 200) {
- this.$message.success('提交成功');
- this.getList()
- this.jiGang = false
- }
- })
- }
- });
- },
- cancellation() {
- // let formDatae = new window.FormData()
- // formDatae.append('warehouseBills', JSON.stringify(this.queryParams))
- // formDatae.append('feesDr', JSON.stringify(this.warehouseDrList))
- // formDatae.append('feesCr', JSON.stringify(this.warehouseCrList))
- revokeContainerPort(this.queryParams.fId).then(res => {
- console.log(res)
- if (res.code === 200) {
- this.$message.success('撤销成功');
- this.getList()
- this.jiGang = false
- }
- })
- },
- calculation(row) {
- console.log(row)
- if (row.fQty && row.fUnitprice) {
- row.fAmt = Number(row.fQty) * Number(row.fUnitprice)
- }
- },
- addCollection() {
- this.warehouseDrList.push({
- fCorpid:'',
- fFeeid:'',
- fFeeUnitid:'',
- fUnitprice:'',
- fAmt:'',
- fExrate:'',
- remark:'',
- fCurrency:'RMB'
- })
- this.fWbuOptions = []
- let queryParams = {pageNum: 1, fDc: 'D'}
- listFees(queryParams).then((response) => {
- this.fDNameOptions = response.rows
- })
- },
- // 付款合计
- warehouseDrSummaries(param) {
- const {columns, data} = param
- const sums = []
- columns.forEach((column, index) => {
- if (index === 0) {
- sums[index] = '合计'
- return
- }
- const values = data.map((item) => Number(item[column.property]))
- if (
- column.property === 'fUnitprice' ||
- column.property === 'fAmount' ||
- column.property === 'fQty' ||
- column.property === 'fQty' ||
- column.property === 'fAmt'
- ) {
- sums[index] = values.reduce((prev, curr) => {
- const value = Number(curr)
- if (!isNaN(value)) {
- return prev + curr
- } else {
- return prev
- }
- }, 0)
- sums[index] = sums[index].toFixed(2)
- }
- })
- return sums
- },
- }
- }
- </script>
- <style scoped>
- </style>
|