123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818 |
- <template>
- <!-- 详情 成本分配汇总-->
- <div id="costDetailDrawer">
- <!-- 主表信息 -->
- <a-card :bordered="true">
- <div class="table-page-search-wrapper">
- <a-form-model layout="inline">
- <a-row :gutter="24">
- <a-col :md="6" :sm="8">
- <a-form-model-item label="计划单号" prop="planNum">
- {{ detailsPlanNum.planNum }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="产品款号" prop="poStyleNum">
- {{ detailsPlanNum.poStyleNum }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="外销员" prop="exportSales">
- {{ detailsPlanNum.exportSales }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="成衣合同号" prop="garmentContractno">
- {{ detailsPlanNum.garmentContractno }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="部门" prop="department">
- {{ detailsPlanNum.department }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="客户简称" prop="customerShortame">
- {{ detailsPlanNum.customerShortame }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="加工单位" prop="processUnit">
- {{ detailsPlanNum.processUnit }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="出运日期" prop="outdata">
- {{ detailsPlanNum.outdata }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="计划数量" prop="planQuantity">
- {{ detailsPlanNum.planQuantity }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="美元外销总价" prop="usdTotalexportprice">
- {{ detailsPlanNum.usdTotalexportprice }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="人民币费用支出" prop="rmbExpense">
- {{ detailsPlanNum.rmbExpense }}
- <!-- <a href="javascript:void(0)" @click="mainTableExpenseCNY()">{{ detailsPlanNum.rmbExpense }}</a> -->
- </a-form-model-item>
- </a-col>
- <!-- <a-col :md="6" :sm="8">
- <a-form-model-item label="税率%" prop="taxrate">
- {{ detailsPlanNum.taxrate }}
- </a-form-model-item>
- </a-col> -->
- <a-col :md="6" :sm="8">
- <a-form-model-item label="实际出货数量" prop="actualShipquantity">
- {{ detailsPlanNum.actualShipquantity }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="人民币外销金额" prop="rmbExportamount">
- {{ detailsPlanNum.rmbExportamount }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="美元费用支出" prop="usdExpense">
- {{ detailsPlanNum.usdExpense }}
- <!-- <a href="javascript:void(0)" @click="mainTableExpenseUSD()">{{ detailsPlanNum.usdExpense }}</a> -->
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="加工费" prop="rmbProcesscost">
- {{ detailsPlanNum.rmbProcesscost }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="短出数" prop="shortseveral">
- {{ detailsPlanNum.shortseveral }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="短出货值" prop="shortvalue">
- {{ detailsPlanNum.shortvalue }}
- </a-form-model-item>
- </a-col>
- <!-- <a-col :md="6" :sm="8">
- <a-form-model-item label="短出面料成本" prop="fabricshortcost">
- {{ detailsPlanNum.fabricshortcost }}
- </a-form-model-item>
- </a-col> -->
- <a-col :md="6" :sm="8">
- <a-form-model-item label="事故单美金金额" prop="accidentUsdamount">
- {{ detailsPlanNum.accidentUsdamount }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="面料含税成本" prop="fabriccostIncludestax">
- {{ detailsPlanNum.fabriccostIncludestax }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="辅料含税成本" prop="excipiencostIncludestax">
- {{ detailsPlanNum.excipiencostIncludestax }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="销售订单本币总额" prop="salesordersLocaltotal">
- {{ detailsPlanNum.salesordersLocaltotal }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="事故单人民币金额" prop="accidentcnyAmount">
- {{ detailsPlanNum.accidentcnyAmount }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="面料不含税成本" prop="fabriccostNotincludestax">
- {{ detailsPlanNum.fabriccostNotincludestax }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="辅料不含税成本" prop="excipiencostNotincludestax">
- {{ detailsPlanNum.excipiencostNotincludestax }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="销售订单原币总额" prop="salesrrdersOriginaltotal">
- {{ detailsPlanNum.salesrrdersOriginaltotal }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="制单人" prop="preparedBy">
- {{ detailsPlanNum.preparedBy }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <h4 style="color:red;">
- 标记
- <span>(计算结果是负值时,该标记是红色)</span>
- </h4>
- </a-col>
- </a-row>
- </a-form-model>
- </div>
- </a-card>
- <!-- 子表 -->
- <a-card :bordered="true" style="margin:10px 0">
- <!--tabs 组件引入 style="marginTop:60px;" -->
- <div>
- <a-tabs @change="tabsCallback" :default-active-key="activeKey">
- <a-tab-pane v-for="(item, index) in tabNameList" :key="index" :tab="item">
- <div>
- <h6 class="table-title">面料</h6>
- <a-table
- rowKey="(item)=>item.id"
- :loading="loading"
- :columns="fabColumns"
- :data-source="fabData"
- bordered
- :pagination="false"
- :scroll="{ x: 1500,y:300 }"
- >
- </a-table>
- </div>
- <!-- tabs 辅料 -->
- <div style="margin:30px 0">
- <h6 class="table-title">辅料</h6>
- <a-table
- rowKey="(item)=>item.id"
- :loading="loading"
- :columns="ingColumns"
- :data-source="ingData"
- bordered
- :pagination="false"
- :scroll="{ x: 1000,y:300 }"
- >
- </a-table>
- </div>
- <!-- tabs 发运明细 :scroll="{ x: 1500 }"-->
- <div>
- <h6 class="table-title">发运明细</h6>
- <a-table
- rowKey="(item)=>item.id"
- :loading="loading"
- :columns="shipColumns"
- :data-source="shipData"
- bordered
- :pagination="false"
- :scroll="{ x: 1500,y:300 }"
- >
- </a-table>
- </div>
- <!-- tabs 合计 信息 -->
- <div style="marginTop:30px;">
- <h6 class="table-title">合计信息</h6>
- <div style="border: 1px solid #e8e8e8;padding: 20px 20px 0 20px;">
- <a-row :gutter="24">
- <div class="table-page-search-wrapper">
- <a-form layout="inline" class="kk">
- <a-col :md="6" :sm="8">
- <a-form-item label="出货数量合计" >
- <span >{{sumInfo.shipQua}}</span>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="辅料金额合计">
- <span >{{sumInfo.ingAmount}}</span>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="辅料不含税金额合计" >
- <span >{{sumInfo.ingExcludAmount}}</span>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="出运美元外销总价" >
- <span>{{sumInfo.exportPriceUSD}}</span>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="出运加工费">
- <span >{{sumInfo.shipProcesFees}}</span>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="面料不含税金额合计">
- <span>{{sumInfo.fabricExcludTax}}</span>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="出运人民币外销金额">
- <span >{{sumInfo.exportedAmountRMB}}</span>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="合计金额">
- <span >{{sumInfo.amountTotal}}</span>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-item label="面料金额合计" >
- <span>{{sumInfo.fabricAmount}}</span>
- </a-form-item>
- </a-col>
- </a-form>
- </div>
- </a-row>
- </div>
- </div>
- </a-tab-pane>
- </a-tabs>
- <!-- <tabs ref="unitTabs" /> -->
- </div>
- </a-card>
- <!-- 事故单 -->
- <a-card :bordered="true" style="margin:10px 0">
- <div style="margin:60px 0 40px 0">
- <h6 class="table-title">事故单</h6>
- <a-table
- rowKey="id"
- :loading="loading"
- :columns="accidentListColumns"
- :data-source="accidentListData"
- bordered
- :pagination="false"
- :scroll="{ x: 1500,y:300 }"
- >
- </a-table>
- </div>
- <!-- 费用支出 -->
- <div>
- <h6 class="table-title">费用支出</h6>
- <a-table
- rowKey="id"
- :loading="loading"
- :columns="costPayColumns"
- :data-source="costPayData"
- :scroll="{ x: 1500,y:300 }"
- bordered
- :pagination="false"
- >
- </a-table>
- </div>
- <!-- 备注信息 根据角色权限控制【填写】、【查看】-->
- <div class="note-one" style="marginTop:40px;">
- <h6 class="table-title">备注信息</h6>
- <div class="noteDetail">
- {{ detailsPlanNum.remarks }}
- </div>
- </div>
- </a-card>
- </div>
- </template>
- <script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import moment from 'moment'
- import { costByPlanNum } from '@api/document/cost-allocation-total.js'
- export default {
- name: 'CostDetailDrawer', // 详情抽屉
- mixins: [JeecgListMixin],
- components: { JEllipsis, moment },
- data() {
- return {
- loading: false, // 表格加载
- detailsPlanNum: {}, //详情所有数据
- remarks: '', // 备注
- // 事故单 表头
- accidentListColumns: [
- {
- title: '单号',
- width: 120,
- dataIndex: 'accidentNum',
- className: 'replacecolor',
- },
- { title: '事故承担方', width: 120, dataIndex: 'accidentUndertaker',ellipsis: true, className: 'replacecolor' },
- { title: '金额', dataIndex: 'amount', width: 120,ellipsis: true, className: 'replacecolor' }
- ],
- accidentListData: [],
- // 费用支出 表头
- costPayColumns: [
- { title: '账套号', width: 120, dataIndex: 'setNo',ellipsis: true, className: 'replacecolor' },
- { title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo',ellipsis: true, className: 'replacecolor' },
- { title: '费用项目', dataIndex: 'expenseItem', width: 120,ellipsis: true, className: 'replacecolor' },
- { title: ' 支出本币金额', dataIndex: 'disbursedLocalmoney', width: 120,ellipsis: true, className: 'replacecolor' },
- { title: '支出原币金额', dataIndex: 'disbursedOriginalmoney', width: 120,ellipsis: true, className: 'replacecolor' },
- { title: '发票号', dataIndex: 'invoicenum', width: 120,ellipsis: true, className: 'replacecolor' },
- { title: '制单人', dataIndex: 'preparedBy', width: 120,ellipsis: true, className: 'replacecolor' }
- ],
- // 面料
- fabColumns: [
- {
- title: '序号',
- width: 90,
- dataIndex: 'index',
- key: 'index',
- customRender: (text, record, index) => `${index + 1}`,
- className: 'replacecolor'
- },
- { title: '货物名称', width: 160, dataIndex: 'goodsName',ellipsis: true, className: 'replacecolor' },
- {
- title: '转入数量',
- dataIndex: 'fabrictransferQuantity',
- width: 120,
- ellipsis: true,
- className: 'replacecolor',
- },
- {
- title: '转入成本',
- dataIndex: 'transferCost',
- width: 120,
- ellipsis: true,
- className: 'replacecolor',
- // slots:{title:'transferCostTitle'} ,
- },
- { title: '单耗/件', dataIndex: 'unitConsumption', width: 120,ellipsis: true, className: 'replacecolor' },
- { title: '使用数量', dataIndex: 'usageQuantity', width: 120,ellipsis: true, className: 'replacecolor' },
- { title: '计划数量', dataIndex: 'planQuantity', width: 120,ellipsis: true, className: 'replacecolor' },
- {
- title: '购入数量',
- dataIndex: 'purchaseQuantity',
- ellipsis: true,
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '余下数量',
- dataIndex: 'fabricremainingQuantity',
- ellipsis: true,
- width: 100,
- className: 'replacecolor',
- },
- {
- title: '损耗',
- dataIndex: 'loss',
- ellipsis: true,
- width: 120,
- className: 'replacecolor'
- },
- {
- title: '余下数量的成本',
- dataIndex: 'remainingQuantitycost',
- ellipsis: true,
- width: 120,
- className: 'replacecolor',
- }
- ],
- // 辅料
- ingColumns: [
- {
- title: '序号',
- width: 90,
- dataIndex: 'index',
- key: 'index',
- fixed: 'left',
- customRender: (text, record, index) => `${index + 1}`,
- className: 'replacecolor'
- },
- { title: '货物名称', width: 200, dataIndex: 'goodsName', fixed: 'left',ellipsis: true, className: 'replacecolor' },
- {
- title: '转入数量',
- dataIndex: 'ingredientsTransferQuantity',
- width: 150,
- ellipsis: true,
- className: 'replacecolor',
- },
- {
- title: '转入成本',
- dataIndex: 'transferCost',
- width: 130,
- ellipsis: true,
- className: 'replacecolor',
- // slots:{title:'transferCostTitle'} ,
- },
- { title: '使用数量', dataIndex: 'usageQuantity',ellipsis: true, width: 120, className: 'replacecolor' },
- {
- title: '购入数量',
- dataIndex: 'purchaseQuantity',
- width: 120,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '余下数量',
- dataIndex: 'ingredientsRemainingQuantity',
- width: 140,
- ellipsis: true,
- className: 'replacecolor',
- },
- {
- title: '损耗',
- dataIndex: 'loss',
- width: 120,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '人民币金额',
- dataIndex: 'rmbAmount',
- width: 160,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '美元金额',
- dataIndex: 'usdAmount',
- width: 160,
- ellipsis: true,
- className: 'replacecolor',
- customRender: (text, record, index) => {
- if (record.rmbAmount == record.usdAmount)
- return "";
- else
- return record.usdAmount;
- }
- },
- {
- title: '不含税金额',
- dataIndex: 'priceExcludingtax',
- width: 120,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '用量',
- dataIndex: 'dosage',
- width: 120,
- ellipsis: true,
- className: 'replacecolor'
- }
- ],
- // 发运明细
- shipColumns: [
- {
- title: '序号',
- width: 80,
- dataIndex: 'index',
- key: 'index',
- fixed: 'left',
- ellipsis: true,
- customRender: (text, record, index) => `${index + 1}`,
- className: 'replacecolor'
- },
- { title: '发票号码', width: 150, dataIndex: 'invoiceNum', fixed: 'left',ellipsis: true, className: 'replacecolor' },
- {
- title: '出运日期',
- dataIndex: 'outdata',
- width: 120,
- fixed: 'left',
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '小po',
- width: 90,
- dataIndex: 'smallPo',
- fixed: 'left',
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '汇率',
- dataIndex: 'exchangeRate',
- width: 90,
- ellipsis: true,
- className: 'replacecolor'
- },
- { title: '订单号', dataIndex: 'orderNum', width: 180,ellipsis: true, className: 'replacecolor' },
- {
- title: '产品款号',
- dataIndex: 'poStyleNum',
- width: 220,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '出货数量',
- dataIndex: 'shipQuantity',
- width: 100,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '外销单价',
- dataIndex: 'exportUnitPrice',
- width: 100,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '外销总价',
- dataIndex: 'exportPrice',
- width: 100,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '人民币金额',
- dataIndex: 'rmbAmount',
- width: 120,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '加工单价(人民币)',
- dataIndex: 'procesUnitPricermb',
- width: 150,
- ellipsis: true,
- className: 'replacecolor'
- },
- {
- title: '加工单价(美元)',
- dataIndex: 'procesUnitPriceusd',
- width: 150,
- ellipsis: true,
- className: 'replacecolor',
- customRender: (text, record, index) => {
- if (record.procesUnitPricermb == record.procesUnitPriceusd)
- return "";
- else
- return record.procesUnitPriceusd;
- }
- },
- {
- title: '加工费',
- dataIndex: 'processCost',
- width: 100,
- ellipsis: true,
- className: 'replacecolor'
- }
- ],
- shipData: [],
- ingData: [],
- fabData: [],
- sumInfo: {} ,//合计对象
- costPayData: [],
- tabNameList:[],
- tabsAllData: [],
- isView:false,
- visible: false,
- activeKey: '0',
- record: {} //点击的计划单号
- }
- },
- created(){
- var ccode = this.$route.query.ccode;
- if (ccode != undefined && ccode != ""){
- this.planNum = ccode;
- // this.showSelect=1;
- this.isView = true;
- this.getALLDetail(this.planNum,'0');
- }
- },
- methods: {
- // 详情所有数据
- getALLDetail(planNum) {
- this.$nextTick(() => {
- // console.log('详情拿到planNum', this.record.planNum)
- costByPlanNum({ plannum:planNum, type: 'queryNew' }).then(res => {
- if (res.success) {
- this.detailsPlanNum = res.result //所有详情
- this.accidentListData = res.result.syCostAllocationAccidentList //事故单
- this.accidentCalculation(this.accidentListData)
- var accidentNum = 0
- this.accidentListData.map(item =>{
- item.id = accidentNum + 1
- accidentNum += 1
- })
- this.costPayData = res.result.syCostAllocationCostpayList //支出费用
- var num = 0
- this.costPayData.map(item =>{
- item.id = num + 1
- num += 1
- })
- this.tabNameList = res.result.processUnit.split(',')
- this.tabsAllData = res.result.processUnitList
- var oneData = this.tabsAllData[0]
- this.fabData = oneData.syCostAllocationFabricList
- this.fabData.map(item=>{
- if(item.remainingQuantitycost!=='' && item.remainingQuantitycost){
- item.remainingQuantitycost = item.remainingQuantitycost.toFixed(2)
- }
- })
- this.ingData = oneData.syCostAllocationIngredientList
- this.shipData = oneData.syCostAllocationShipdetail
- this.calculation(oneData.syCostAllocationShipdetail)
- //合计中面料相关金额
- var s=0
- oneData.syCostAllocationFabricList.map(item=>{
- s+=Number(item.transferCost)
- })
- this.sumInfo.fabricAmount =(this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(this.detailsPlanNum.fabriccostIncludestax).toFixed(3):''//合计中的面料总额
- this.sumInfo.fabricExcludTax = (s/1.13).toFixed(3)//合计中的不含税面料总额
-
- //合计中辅料相关金额
- var s = 0,
- v =0
- oneData.syCostAllocationIngredientList.map(item=>{
- s+=Number(item.priceExcludingtax),
- v+=Number(item.rmbAmount)
- })
- this.sumInfo.ingExcludAmount = s.toFixed(3),//辅料不含税金额合计
-
- this.sumInfo.ingAmount =v.toFixed(3)//辅料金额合计
- //合计中出运明细相关金额
- var s =0,
- v = 0,
- d = 0,
- b = 0,
- f=0
- oneData.syCostAllocationShipdetail.map(item=>{
- s+=Number(item.exportPrice)
- v+=Number(item.shipQuantity)
- d+=Number(item.processCost)
- b+=Number(item.exportPrice)
- })
- this.sumInfo.exportPriceUSD = s.toFixed(3)//出运美元外销总价
- this.sumInfo.shipQua =v.toFixed(3)//出货数量合计
- this.sumInfo.shipProcesFees =d.toFixed(3)//出运加工费
- this.sumInfo.exportedAmountRMB =b.toFixed(3)//出运人民币外销金额 f
- f=Number(this.sumInfo.ingAmount)+Number(this.sumInfo.shipProcesFees)
- this.sumInfo.amountTotal =f.toFixed(3)//合计金额
- this.pagination = {
- total: res.result.total,
- current: res.result.current,
- pageSize: res.result.size
- }
- }
- })
- })
- },
- //计算短出货值
- calculation(val){
- var average = 0
- val.map(item=>{
- average += Number(item.exportUnitPrice)
- })
- this.detailsPlanNum.shortvalue = (this.detailsPlanNum.shortseveral*average).toFixed(3)
- var shipQuantityAll =0,
- exportUnitPriceALll = 0,
- exportPriceAll =0,
- rmbAmountAll = 0,
- procesUnitPricermbAll = 0,
- procesUnitPriceusdAll = 0,
- processCostAll = 0
- val.map(item=>{
- shipQuantityAll+=Number(item.shipQuantity)
- exportUnitPriceALll+=Number(item.exportUnitPrice)
- exportPriceAll+=Number(item.exportPrice)
- rmbAmountAll+=Number(item.rmbAmount)
- procesUnitPricermbAll+=Number(item.procesUnitPricermb)
- procesUnitPriceusdAll+=Number(item.procesUnitPriceusd)
- processCostAll+=Number(item.processCost)
- })
- var allObj ={
- outdata:'合计',
- shipQuantity:shipQuantityAll.toFixed(3),
- exportUnitPrice:exportUnitPriceALll.toFixed(3),
- exportPrice:exportPriceAll.toFixed(3),
- rmbAmount:rmbAmountAll.toFixed(3),
- procesUnitPricermb:procesUnitPricermbAll.toFixed(3),
- procesUnitPriceusd:procesUnitPriceusdAll.toFixed(3),
- processCost:processCostAll.toFixed(3)
- }
- this.shipData.push(allObj)
- },
- //计算事故单美元金额和事故单人民币金额
- accidentCalculation(val){
- var usaMoney = 0,
- rmbMoney = 0
- val.map(item=>{
- usaMoney += item.amount,
- rmbMoney+=item.rmbAmount
- })
- this.detailsPlanNum.accidentUsdamount = usaMoney
- this.detailsPlanNum.accidentcnyAmount = usaMoney
- },
- tabsCallback(key) {
- this.activeKey = key
- // console.log('点击的是', this.activeKey)
- if (key == 0) {
- var oneData = this.tabsAllData[0]
- this.fabData = oneData.syCostAllocationFabricList
- this.ingData = oneData.syCostAllocationIngredientList
- this.shipData = oneData.syCostAllocationShipdetailList
- }
- if (key == 1) {
- var twoData = this.tabsAllData[1]
- this.fabData = twoData.syCostAllocationFabricList
- this.ingData = twoData.syCostAllocationIngredientList
- this.shipData = twoData.syCostAllocationShipdetailList
- }
- },
- onClose() {
- this.visible = false
- },
- // --------------------------------------------------
- // father 方法
- aa() {},
- bb() {},
- cc() {}
- }
- }
- </script>
- <style lang="less" scoped>
- @import '~@assets/less/common.less';
- @import '~@assets/less/overwriter.less';
- /deep/ .ant-table-thead > tr > th {
- text-align: center;
- // font-weight: 700;
- }
- /deep/ .ant-table-tbody {
- text-align: center;
- }
- // /deep/ th.replacecolor {
- // background-color: #ccc;
- // }
- // 抽屉里的card样式
- /deep/ .ant-drawer-content {
- background-color: #f0f2f5;
- }
- /deep/ .ant-drawer-body {
- padding: 10px;
- }
- // 回显label文字
- /deep/.ant-form-item-label > label {
- font-weight: 700;
- color: #333;
- }
- </style>
|