| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258 |
- <template>
- <div>
- <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"
- :disabled="browseStatus"
- @click.prevent="addCollection()"
- >新行
- </el-button>
- <el-button
- type="primary"
- size="small"
- :disabled="browseStatus"
- @click="saveForm"
- >保 存
- </el-button
- >
- <el-button
- size="small"
- @click.prevent="handleSelect()"
- type="danger"
- >作业费协议
- </el-button>
- <el-button
- v-if="feeDisplay"
- size="small"
- :disabled="browseStatus"
- type="warning"
- >计算仓储费
- </el-button>
- <el-button
- size="small"
- type="primary"
- @click="feesConfirm"
- v-if="isShowFeesConfirm == 0"
- >费用确认单</el-button>
- <el-button
- type="primary"
- size="small"
- v-if="browseStatus"
- @click="feeChange"
- >费用变更</el-button>
- </div>
- </div>
- <el-table
- :data="warehouseDrList"
- ref="table"
- tooltip-effect="dark"
- border
- stripe
- show-summary
- @selection-change="Collectionoptions"
- :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="300px"
- label="客户名称"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fCorpid"
- filterable
- clearable
- placeholder="客户名称"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- >
- <el-option
- v-for="(item, index) in fMblnoOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fFeeid"
- header-align="center"
- align="center"
- width="240px"
- label="费用名称"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fFeeid"
- clearable
- filterable
- placeholder="费用名称"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- >
- <el-option
- v-for="(item, index) in fDNameOptions"
- :key="index.fId"
- :label="item.fName"
- :value="item.fId"
- ></el-option>
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fBusinessType"
- header-align="center"
- align="center"
- width="180px"
- label="作业类型"
- >
- <template slot-scope="scope">
- <el-select
- style="width: 80%"
- v-model="scope.row.fBusinessType"
- filterable
- disabled
- >
- <el-option
- v-for="(item, index) in businessTypeOption"
- :key="index.dictValue"
- :label="item.dictLabel"
- :value="item.dictValue"
- ></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="请选择计价单位"
- clearable
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- @change="changeFeeUnit(scope.row)"
- >
- <el-option
- v-for="(item, index) in fFeetUnitOptions"
- :key="index.dictValue"
- :label="item.dictLabel"
- :value="item.dictValue"
- />
- </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(/[^0-9.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d).*$/,"$1$2.$3")'
- v-model="scope.row.fQty"
- placeholder="数量"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- @change="changeContractAmt(scope.row)"
- show-word-limit
- />
- </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="单价"
- :disabled="browseStatus || scope.row.fSrcTypeId !== 0 || scope.row.fBillstatus == 6"
- @change="changeContractAmt(scope.row)"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fAmount"
- 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.fAmount"
- :disabled="browseStatus || scope.row.fSrcTypeId !== 0 || scope.row.fBillstatus == 6"
- placeholder="金额"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fStltypeid"
- header-align="center"
- align="center"
- width="130px"
- label="结算方式"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fStltypeid"
- placeholder="请选择结算表票结、月结"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- >
- <el-option
- v-for="(item, index) in fStltypeOptions"
- :key="index.dictValue"
- :label="item.dictLabel"
- :value="item.dictValue"
- ></el-option>
- </el-select>
- </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="browseStatus || scope.row.fBillstatus == 6"
- 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="browseStatus || scope.row.fBillstatus == 6"
- placeholder="汇率"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fTaxrate"
- header-align="center"
- align="center"
- width="130px"
- label="税率"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fTaxrate"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- placeholder="税率"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fMblno"
- header-align="center"
- align="center"
- width="130px"
- label="提单号"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fMblno"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- placeholder="提单号"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fProductName"
- header-align="center"
- align="center"
- width="140px"
- label="品名"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fProductName"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- placeholder="品名"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fMarks"
- header-align="center"
- align="center"
- width="130px"
- label="品牌"
- >
- <template slot-scope="scope">
- <el-input
- v-model="scope.row.fMarks"
- :disabled="browseStatus || scope.row.fBillstatus == 6"
- placeholder="品牌"
- show-word-limit
- />
- </template>
- </el-table-column>
- <el-table-column
- prop="fSrcTypeId"
- header-align="center"
- align="center"
- width="130px"
- label="来源"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.fSrcTypeId === 0">录入</span>
- <span v-if="scope.row.fSrcTypeId == 1">协议</span>
- <span v-if="scope.row.fSrcTypeId == 10">变更</span>
- </template>
- </el-table-column>
- <span v-if="feeDisplay">
- <el-table-column
- prop="fBilltype"
- header-align="center"
- align="center"
- width="140px"
- label="业务来源"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.fBilltype === 'SJRK'">入库</span>
- <span v-if="scope.row.fBilltype === 'SJCK'">出库</span>
- <span v-if="scope.row.fBilltype === 'KCZZ'">库存总账</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="fMblno"
- header-align="center"
- align="center"
- width="140px"
- label="业务单号"
- >
- </el-table-column>
- <el-table-column
- prop="fProductName"
- header-align="center"
- align="center"
- width="140px"
- label="货物名称"
- >
- </el-table-column>
- <el-table-column
- prop="fMarks"
- header-align="center"
- align="center"
- width="140px"
- label="唛头"
- />
- <el-table-column
- prop="fBsdate"
- header-align="center"
- align="center"
- width="140px"
- label="业务日期"
- >
- <template slot-scope="scope">
- <el-date-picker
- v-model="scope.row.fBsdate"
- size="large"
- type="date"
- disabled
- value-format="timestamp"
- placeholder="业务日期"
- >
- </el-date-picker>
- </template>
- </el-table-column>
- <el-table-column
- prop="fBillingway"
- header-align="center"
- align="center"
- width="180px"
- label="计费单位"
- >
- <template slot-scope="scope">
- <el-select
- v-model="scope.row.fBillingway"
- placeholder="请选择计费单位"
- 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="fBillingQty"
- header-align="center"
- align="center"
- width="140px"
- label="计费数量"
- >
- </el-table-column>
- <el-table-column
- prop="fChargedate"
- header-align="center"
- align="center"
- width="140px"
- label="计费起始日期"
- >
- <template slot-scope="scope">
- <el-date-picker
- v-model="scope.row.fChargedate"
- size="large"
- type="date"
- disabled
- value-format="timestamp"
- placeholder="计费起始日期"
- >
- </el-date-picker>
- </template>
- </el-table-column>
- <el-table-column
- prop="fBillingDeadline"
- header-align="center"
- align="center"
- width="140px"
- label="计费截止日期"
- >
- <template slot-scope="scope">
- <el-date-picker
- v-model="scope.row.fBillingDeadline"
- size="large"
- type="date"
- disabled
- value-format="timestamp"
- placeholder="计费截止日期"
- >
- </el-date-picker>
- </template>
- </el-table-column>
- <el-table-column
- prop="fBillingDays"
- header-align="center"
- align="center"
- width="140px"
- label="计费天数"
- >
- </el-table-column>
- <el-table-column
- prop="fInventoryDays"
- header-align="center"
- align="center"
- width="140px"
- label="库存天数"
- >
- </el-table-column>
- <el-table-column
- prop="fAmt"
- header-align="center"
- align="center"
- width="140px"
- label="计费金额"
- >
- </el-table-column>
- </span>
- <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="操作"
- width="200px"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button
- @click.native.prevent="deleteRow(scope.$index, warehouseDrList)"
- size="small"
- :disabled="scope.row.fBillstatus == 6 || browseStatus"
- >移除
- </el-button>
- <el-button
- size="small"
- @click="listCheck(scope.row)"
- v-if="scope.row.fBillstatus < 6"
- :disabled="browseStatus"
- >请核</el-button>
- <el-button
- size="small"
- @click="revokeListCheck(scope.row)"
- :disabled="browseStatus"
- v-if="scope.row.fBillstatus == 6"
- >撤销请核</el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- 选择作业费协议数据 -->
- <el-dialog
- v-dialogDrag
- title="作业费协议"
- :close-on-click-modal="false"
- :modal="false"
- style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
- :visible.sync="warehousingagreements"
- width="70%"
- >
- <template slot="作业费协议">
- <div class="avue-crud__dialog__header">
- <span class="el-dialog__title">
- <span
- style="
- display: inline-block;
- width: 3px;
- height: 20px;
- margin-right: 5px;
- float: left;
- margin-top: 2px;
- "
- ></span>
- </span>
- </div>
- </template>
- <el-menu
- :default-active="activeIndex"
- v-if="Navigation === true"
- class="el-menu-demo"
- mode="horizontal"
- @select="handleSelect"
- >
- <el-menu-item index="1">车队作业费</el-menu-item>
- <el-menu-item index="2">劳务作业费</el-menu-item>
- </el-menu>
- <el-table
- :data="tasklegList"
- ref="table"
- tooltip-effect="dark"
- width="100%"
- border
- stripe
- @selection-change="whgenlegSelectionChange"
- >
- <el-table-column type="selection" width="55"></el-table-column>
- <el-table-column label="行号" type="index" width="80">
- </el-table-column>
- <el-table-column
- prop="fCorpname"
- header-align="center"
- align="center"
- label="客户名称"
- />
- <el-table-column
- prop="fName"
- header-align="center"
- align="center"
- label="费用名称"
- />
- <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="请选择计价单位"
- @change="changeFeeUnit(scope.row)"
- disabled
- clearable
- >
- <el-option
- v-for="(dict, index) in fFeetUnitOptions"
- :key="index.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </template>
- </el-table-column>
- <el-table-column
- prop="fPrice"
- header-align="center"
- align="center"
- label="单价"
- width="100px"
- />
- <el-table-column
- prop="remark"
- header-align="center"
- align="center"
- label="备注"
- />
- </el-table>
- <pagination
- v-show="whgenlegTotal > 0"
- :total="whgenlegTotal"
- :page.sync="pageNum"
- :limit.sync="pageSize"
- @pagination="getWhgenlegList"
- />
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="zhgenlegData" :disabled="browseStatus">导 入</el-button>
- <el-button
- @click="
- warehousingagreements = false;
- Navigation = false;
- "
- >取 消
- </el-button
- >
- </div>
- </el-dialog>
- <!-- 费用确认单-->
- <el-dialog
- :visible.sync="print_fyqr"
- width="70%"
- :close-on-click-modal="false"
- :modal="false"
- >
- <div id="print_fyqr" class="print-div">
- <div
- class="print-title"
- style="
- display: flex;
- justify-content: center;
- font-size: 28px;
- margin-bottom: 5px;
- "
- >
- {{ fCompanyName? fCompanyName: company }}
- </div>
- <div
- style="
- display: flex;
- justify-content: center;
- margin-bottom: 5px;
- ">
- <div style="font-size: 24px;">费用确认</div>
- </div>
- <div style="display: flex;justify-content: space-between;">
- <div>
- <div>业务编号:{{ form.fBillno }}</div>
- <div>客户名称:{{ form.fCorpidName }}</div>
- <div>提单号:{{ form.fMblno }}</div>
- <div>结算单位: {{ form.chargeUnit }}</div>
- </div>
- <div>
- <div>制单日期:{{ form.createTime | fBsdateFormat }}</div>
- <div>仓库名称:{{ form.fWarehouseid | warehouseFormat(warehouseOptions) }}</div>
- <div>箱型/箱量:{{ form.fCntval }}</div>
- </div>
- <div>
- <div>制单人:{{ form.createBy }}</div>
- <div>打印日期:{{ nowTime | fBsdateFormat }}</div>
- <div>品名:{{ form.fGoodsid | goodsFormat(goodsOptions) }}</div>
- </div>
- </div>
- <div class="print_table" style="display: flex">
- <table
- border="0"
- cellspacing="0"
- cellpadding="0"
- style="width: 100%; line-height: 30px"
- >
- <tr>
- <td>序号</td>
- <td>费用项目</td>
- <td>计价单位</td>
- <td>数量</td>
- <td>单价</td>
- <td>是否含税</td>
- <td>税率</td>
- <td>不含税金额</td>
- <td>税额</td>
- <td>应收金额</td>
- <td>备注</td>
- </tr>
- <tr v-for="(item, index) in Collectionoptionss" :key="index">
- <td>{{ index + 1 }}</td>
- <td>{{ item.fFeeid | fFeetFormat(fDNameOptions) }}</td>
- <td>{{ item.fFeeUnitid | fFeetUnitFormat(fFeetUnitOptions) }}</td>
- <td>{{ item.fQty }}</td>
- <td>{{ item.fUnitprice }}</td>
- <td>{{ item.fTaxrate != 0? '√': '×' }}</td>
- <td>{{ item.fTaxrate }}</td>
- <td>{{ item.taxAmount }}</td>
- <td>{{ item.exclTax }}</td>
- <td>{{ item.fAmount }}</td>
- <td>{{ item.remark }}</td>
- </tr>
- <tr>
- <td colspan="7">合计</td>
- <td>{{ allTaxAmount }}</td>
- <td>{{ allExclTax }}</td>
- <td>{{ allDrAmount }}</td>
- <td></td>
- </tr>
- </table>
- </div>
- <div>人民币汇款路径:</div>
- <div>公司名称:{{ fCompanyName? fCompanyName: company }}</div>
- <div>纳税人识别号:{{ printFeeConfirm.fTax }}</div>
- <div>地址:{{ printFeeConfirm.fAddr }}</div>
- <div>电话:{{ printFeeConfirm.fTel }}</div>
- <div>开户行:{{ printFeeConfirm.fBankname }}</div>
- <div>银行账户:{{ printFeeConfirm.fBankno }}</div>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button
- type="primary"
- @click="
- addprint('fyqrd');
- print_fyqr = false;
- "
- >打印
- </el-button>
- <el-button @click="print_fyqr = false">取消 </el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {operationAgreement} from "@/api/agreement/agreement";
- import {feesCheck,revokefeeCheck} from "@/api/warehouseBusiness/warehouseInStock";
- import print from "print-js";
- import Cookies from "js-cookie";
- import {
- listWarehouse,
- treeselect,
- listWarehousesss,
- deliveryDetails
- } from "@/api/basicdata/warehouse";
- export default {
- props: {
- feeDisplay:false,
- browseStatus: {
- type: Boolean,
- default: false,
- },
- warehouseDrList: {
- type: Array,
- default: [],
- },
- businessTypeOption: {
- type: Array,
- default: [],
- },
- fMblnoOptions: {
- type: Array,
- default: [],
- },
- fDNameOptions: {
- type: Array,
- default: [],
- },
- fFeetUnitOptions: {
- type: Array,
- default: [],
- },
- fStltypeOptions: {
- type: Array,
- default: [],
- },
- fGrossweight: {
- type: Number,
- default: null,
- },
- fQty: {
- type: Number,
- default: null,
- },
- fNetweight: {
- type: Number,
- default: null,
- },
- fCntqty: {
- type: Number,
- default: null,
- },
- form: {
- type: Object,
- default: null,
- },
- CntrTable: {
- type: Array,
- default: [],
- },
- cntrList: {
- type: Array,
- default: [],
- },
- goodsOptions: {
- type: Array,
- default: [],
- },
- fCompanyName: {
- type: String
- },
- printFeeConfirm: {
- type: Object,
- },
- },
- data() {
- return {
- Collectionoptionss: [],
- warehousingagreements: false,
- whgenlegTotal: 0,
- Navigation: false,
- tasklegList: [],
- dialogWhgenlegList: [],
- pageNum: 1,
- pageSize: 10,
- nowTime: '',
- // 税额总数
- allTaxAmount: 0,
- // 不含税金额总数
- allExclTax: 0,
- // 收款金额合计
- allDrAmount: 0,
- print_fyqr: false,
- company: '',
- warehouseOptions:[],
- // 是否启用请款单
- isShowInvoice: null,
- // 是否启用费用确认单
- isShowFeesConfirm: null,
- };
- },
- created() {
- this.getConfigKey("warehouse.show.invoice").then((response) => {
- this.isShowInvoice = response.msg;
- });
- this.getConfigKey("warehouse.show.feesConfirm").then((response) => {
- this.isShowFeesConfirm = response.msg;
- });
- this.company = Cookies.get("companyName")
- listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
- this.warehouseOptions = response.rows;
- });
- },
- filters: {
- fBsdateFormat(row) {
- if (row) {
- const dateMat = new Date(row);
- const year = dateMat.getFullYear();
- const month = dateMat.getMonth() + 1;
- const day = dateMat.getDate();
- const timeFormat = year + "-" + month + "-" + day;
- return timeFormat;
- }
- },
- warehouseFormat(row, warehouseOptions) {
- let warehouse;
- warehouseOptions.map((e) => {
- if (row == e.fId) {
- warehouse = e.fName;
- }
- });
- return warehouse;
- },
- fFeetFormat(row, fNameOptions) {
- let name;
- fNameOptions.map((e) => {
- if (row == e.fId) {
- name = e.fName;
- }
- });
- return name;
- },
- fFeetUnitFormat(row, fFeetUnitOptions) {
- let name;
- fFeetUnitOptions.map((e) => {
- if (row == e.dictValue) {
- name = e.dictLabel;
- }
- });
- return name;
- },
- goodsFormat(row, goodsOptions) {
- let goods;
- goodsOptions.map((e) => {
- if (row == e.fId) {
- goods = e.fName;
- }
- });
- return goods;
- },
- },
- methods: {
- feeChange() {
- this.$emit("feeChangeD", 'D');
- },
- saveForm() {
- this.$emit("chiSave");
- },
- addCollection() {
- this.$emit("chiAdd");
- },
- // 付款合计
- 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]));
- // column.property === "fUnitprice" ||
- if (
- column.property === "fAmount"
- // column.property === "fAmount" ||
- // column.property === "fQty"
- ) {
- 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;
- },
- // 收款选
- Collectionoptions(selection) {
- this.Collectionoptionss = selection;
- for (let item in this.fWbuOptions) {
- for (let li in this.Collectionoptionss) {
- if (
- this.fWbuOptions[item].fId === this.Collectionoptionss[li].fFeeid
- ) {
- this.$set(
- this.Collectionoptionss[li],
- "fFeeids",
- this.fWbuOptions[item].fName
- );
- }
- }
- }
- },
- deleteRow(index, rows) {
- rows.splice(index, 1);
- },
- // 变更计价单位
- changeFeeUnit(row) {
- if (!row.fFeeUnitid) {
- return false;
- }
- if (row.fFeeUnitid === "2") {
- this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
- } else if (row.fFeeUnitid === "1") {
- this.$set(row, "fQty", this.fQty.toFixed(2));
- } else if (row.fFeeUnitid === "3") {
- this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
- } else if (row.fFeeUnitid === "7") {
- this.$set(row, "fQty", this.fCntqty);
- } else {
- this.$set(row, "fQty", 0);
- }
- if (row.fUnitprice) {
- this.$set(
- row,
- "fAmount",
- parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
- );
- }
- },
- // 数量计算
- changeContractAmt(row) {
- let fQty = 0;
- let fUnitprice = 0;
- if (row.fUnitprice) {
- fUnitprice = row.fUnitprice;
- }
- if (row.fQty) {
- fQty = row.fQty;
- }
- this.$set(row, "fAmount", Number(fUnitprice) * Number(fQty)).toFixed(2);
- },
- handleSelect() {
- if (!this.form.fCorpid) {
- this.$message({
- message: "请维护客户",
- type: "warning",
- });
- } else if (this.form.fProductName == undefined) {
- this.$message({
- message: "请维护入库明细品名",
- type: "warning",
- });
- } else {
- this.pageNum = 1;
- this.pageSize = 10;
- this.dialogWhgenlegList = [];
- this.whgenlegTotal = 0;
- this.warehousingagreements = true;
- this.getWhgenlegList();
- }
- },
- // 查询作业费信息
- getWhgenlegList() {
- let data = {};
- this.Navigation = false;
- data = {
- pageNum: this.pageNum,
- pageSize: this.pageSize,
- fCorpid: this.form.fCorpid,
- };
- operationAgreement(data).then((response) => {
- response.rows.map((e) => {
- if (e.fFeeUnitid) {
- e.fFeeUnitid = e.fFeeUnitid.toString();
- }
- });
- this.tasklegList = response.rows;
- this.whgenlegTotal = response.total;
- });
- },
- // 库存总账多选框
- whgenlegSelectionChange(selection) {
- this.dialogWhgenlegList = selection;
- },
- //导入收付款信息明细
- zhgenlegData() {
- if (this.dialogWhgenlegList.length === 0) {
- this.$message({
- message: "请选择需要导入的数据",
- type: "warning",
- });
- } else {
- this.dialogWhgenlegList.map((e) => {
- let qty = 1;
- if (e.fFeeUnitid == 1) {
- qty = this.fQty;
- } else if (e.fFeeUnitid == 2) {
- qty = (this.fGrossweight / 1000).toFixed(2);
- } else if (e.fFeeUnitid == 3) {
- qty = (this.fNetweight / 1000).toFixed(2);
- } else if (e.fFeeUnitid == 7) {
- qty = this.fCntqty;
- }
- let fAmount = 0;
- fAmount = e.fPrice * qty;
- this.warehouseDrList.push({
- fQty: qty,
- fCorpid: e.fCorpid,
- fFeeid: e.feeFId,
- fFeeUnitid: e.fFeeUnitid,
- fUnitprice: e.fPrice,
- fCurrency: "RMB",
- fExrate: 1,
- fAmount: fAmount,
- fTaxrate: '0',
- fMblno: this.form.fMblno,
- fProductName: this.form.fProductName,
- fMarks: this.form.fMarks,
- fBusinessType: this.form.fBusinessType,
- fSrcTypeId: 1,
- fStltypeid: '1',
- });
- });
- this.warehousingagreements = false;
- }
- },
- // 费用明细请核
- listCheck(row) {
- feesCheck(row.fId).then(res => {
- this.$message.success('请核成功')
- res.data.fFeeUnitid = res.data.fFeeunitid.toString();
- if (res.data.fDc == 'D') {
- let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
- this.warehouseDrList.splice(index, 1, res.data)
- } else {
- let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
- this.warehouseCrList.splice(index, 1, res.data)
- }
- })
- },
- // 费用明细撤销请核
- revokeListCheck(row) {
- revokefeeCheck(row.fId).then(res => {
- res.data.fFeeUnitid = res.data.fFeeunitid.toString();
- this.$message.success('操作成功')
- if (res.data.fDc == 'D') {
- let index = this.warehouseDrList.findIndex(item => item.fId == res.data.fId)
- this.warehouseDrList.splice(index, 1, res.data)
- } else {
- let index = this.warehouseCrList.findIndex(item => item.fId == res.data.fId)
- this.warehouseCrList.splice(index, 1, res.data)
- }
- })
- },
- // 打印费用确认单准备
- feesConfirm() {
- if (this.Collectionoptionss.length > 0) {
- for (let item in this.Collectionoptionss) {
- if (!this.Collectionoptionss[item].fId) {
- return this.$message.error("请先保存!");
- }
- }
- if (this.CntrTable.length > 0) {
- let arr = [];
- this.CntrTable.map((e) => {
- this.cntrList.map((item) => {
- if (item.fId == e.fCntrid) {
- arr.push(item.fName + "X" + e.fCntrcount);
- }
- });
- });
- arr = [...new Set(arr)];
- this.form.fCntval = arr.join(",");
- } else {
- this.form.fCntval = null;
- }
- this.allTaxAmount = 0;
- this.allExclTax = 0;
- this.allDrAmount = 0;
- this.Collectionoptionss.forEach(item => {
- // 税额
- this.$set(item, 'taxAmount', Number(item.fAmount) / (1 + Number(Number(item.fTaxrate) / 100)))
- item.taxAmount = item.taxAmount.toSuperFixed(2)
- // 不含税金额
- this.$set(item, 'exclTax', Number(item.fAmount) - Number(item.taxAmount))
- item.exclTax = item.exclTax.toSuperFixed(2)
- this.allTaxAmount = Number(this.allTaxAmount) + Number(item.taxAmount)
- this.allExclTax = Number(this.allExclTax) + Number(item.exclTax)
- this.allDrAmount = Number(this.allDrAmount) + Number(item.fAmount)
- this.allTaxAmount = this.allTaxAmount.toSuperFixed(2)
- this.allExclTax = this.allExclTax.toSuperFixed(2)
- this.allDrAmount = this.allDrAmount.toSuperFixed(2)
- })
- this.nowTime = new Date().toLocaleDateString()
- for (let corp in this.fMblnoOptions) {
- if (this.form.fCorpid === this.fMblnoOptions[corp].fId) {
- this.$set(
- this.form,
- "fCorpidName",
- this.fMblnoOptions[corp].fName
- );
- }
- if (this.Collectionoptionss[0].fCorpid === this.fMblnoOptions[corp].fId) {
- this.$set(
- this.form,
- "chargeUnit",
- this.fMblnoOptions[corp].fName
- );
- }
- }
- this.print_fyqr = true;
- } else {
- this.$message.error("请选择需要打印的明细!");
- }
- },
- // 打印
- addprint(status) {
- const style =
- "@page { } " +
- "@media print { .print-div{ padding:8px;background-color:#cccccc;} .print-title{display:flex;justify-content: center;font-size:24px} .print_form{font-size:12px} .print_table table {border-right: 1px solid #000;border-bottom: 1px solid #000;font-size:12px} .print_table table td {border-left: 1px solid #000;border-top: 1px solid #000;padding:2px;vertical-align:middle;text-align: center;}";
- switch (status) {
- case "fyqrd":
- print({
- printable: "print_fyqr",
- type: "html",
- style: style, // 亦可使用引入的外部css;
- scanStyles: false,
- });
- break;
- }
- },
- },
- watch: {
- browseStatus(val) {
- this.browseStatus = val;
- },
- warehouseDrList(val) {
- this.warehouseDrList = val;
- },
- },
- };
- </script>
- <style scoped lang="scss">
- .print_table {
- table {
- border-right: 1px solid #000;
- border-bottom: 1px solid #000;
- font-size: 12px;
- margin-bottom: 5px;
- }
- table td {
- border-left: 1px solid #000;
- border-top: 1px solid #000;
- vertical-align: middle;
- padding: 2px;
- text-align: center;
- }
- }
- .print_form {
- font-size: 12px;
- }
- </style>
|