1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114 |
- <template>
- <a-modal
- title="详情"
- v-model="detailModVis"
- width="86%"
- style="top:330px;left:100px;"
- @cancel="handlecLose"
- >
- <template slot="footer">
- <a-button @click="Submit" :disabled="!(status=='保存'||status=='返单')">
- 提交
- </a-button>
- <a-button @click="assign" :disabled="!(status=='提交')" v-if="AssignedPerson=='no'&& authority=='yes'">
- 指派
- </a-button>
- <a-button @click="Approved" :disabled="!(status=='已指派')" v-if="AssignedPersonQx=='yes'">
- 审批通过
- </a-button>
- <a-button @click="reject" :disabled="!(status=='已指派')" v-if="AssignedPersonQx=='yes'">
- 驳回
- </a-button>
- <a-button @click="revokeApproval" :disabled="!(status=='完成')" v-if="AssignedPersonQx=='yes'">
- 撤销审批
- </a-button>
- <a-button @click="handlecLose">
- 取消
- </a-button>
- </template>
- <!--报表 成本分配表 (保存后数据到单证的成本分配汇总内)-->
- <div id="costAllocationTable">
- <a-card :bordered="true">
- <!-- 主表信息 点击搜索后 回显--->
- <a-row :gutter="24">
- <div class="table-page-search-wrapper">
- <!-- ref="form" :model="costAllocationTable" -->
- <a-form-model layout="inline" class="kk">
- <a-col :md="6" :sm="8">
- <a-form-model-item label="计划单号" prop="plannum">
- {{ planNo }}
- </a-form-model-item>
- </a-col>
- <!-- 回显以下【备注】需要输入,后进行保存 disabled -->
- <a-col :md="6" :sm="8">
- <a-form-model-item label="产品款号" prop="poStyleNum">
- <span :title=" detailsPlanNum.poStyleNum">{{ detailsPlanNum.poStyleNum | ellipsis}}</span>
- <!-- {{ 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">
- <span :title=" detailsPlanNum.processUnit">{{ detailsPlanNum.processUnit | ellipsis}}</span>
- <!-- {{ 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="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="usdTotalexportprice">
- {{ detailsPlanNum.usdTotalexportprice }}
- </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="actualShipquantity">
- {{ detailsPlanNum.actualShipquantity }}
- </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="usdProcesscost">
- {{ detailsPlanNum.usdProcesscost }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="运杂费($)" prop="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="rmbExpense" >
- {{detailsPlanNum.rmbNorTaxExpense }}
- </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="accidentcnyAmount" >
- {{ detailsPlanNum.accidentcnyAmount }}
- </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="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="UsdfabriccostIncludestax" >
- {{ detailsPlanNum.fabriccostIncludestaxUsd }}
- </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="UsdexcipiencostIncludestax">
- {{ detailsPlanNum.excipiencostIncludestaxUsd }}
- </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="salesrrdersOriginaltotal">
- {{ detailsPlanNum.salesrrdersOriginaltotal }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="运杂费(¥)" prop="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="salesrrdersOriginaltotal">
- {{detailsPlanNum.shuiemoney }}
- </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="UsdfabriccostNotincludestax" >
- {{ detailsPlanNum.memo }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="制单人" prop="maker">
- {{ detailsPlanNum.preparedBy }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="查询人" prop="queryBy">
- {{ detailsPlanNum.queryBy }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="查询时间" prop="queryTime">
- {{ detailsPlanNum.queryTime }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8">
- <a-form-model-item label="订单汇率" prop="queryTime">
- {{ detailsPlanNum.exchangeRate }}
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8" class="noprint">
- <a-form-model-item label="" prop="" >
- <h4 style="color:red;" v-if="color1<0">
- 标记(A)
- <!-- <span>(计算结果是负值时,该标记是红色)</span> -->
- </h4>
- <h4 style="color:black;" v-else>
- 标记(A)
- <!-- <span>(计算结果是负值时,该标记是红色)</span> -->
- </h4>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8" class="noprint">
- <a-form-model-item label="" prop="" >
- <h4 style="color:blue;" v-if="color2>=0&&color2<0.8">
- 标记(B)
- <!-- <span>(计算结果小于O.8 时,该标记是蓝色)</span> -->
- </h4>
- <h4 style="color:black;" v-else>
- 标记(B)
- <!-- <span>(计算结果小于O.8 时,该标记是蓝色)</span> -->
- </h4>
- </a-form-model-item>
- </a-col>
- <a-col :md="6" :sm="8" class="noprint">
- <a-upload productName="file" :showUploadList="true" :file-list="fileList" :headers="tokenHeader" :multiple="false" :action="importExcelUrl" :data="{code:this.detailsPlanNum.planNum,name:this.fileName}" >
- <a-button type="primary" disabled>附件上传</a-button>
- </a-upload>
- </a-col>
- <a-col :md="6" :sm="8" class="noprint">
- <a-button type="primary" @click="openEnclosure">附件</a-button>
- </a-col>
- </a-form-model>
- </div>
- </a-row>
- </a-card>
- <!--tabs 组件引入 -->
- <a-card :bordered="true" style=" marginTop:10px;">
- <div><tabs ref="unitTabs" :showSelect='showSelect' @number="number" :showAll="showAll" @FabInQua="FabInQua" @IngInQua="IngInQua"/></div>
- </a-card>
- <!-- 事故单 -->
- <a-card :bordered="true" style="margin:10px 0">
- <div style="margin:60px 0 40px 0" :class="[(accidentListData.length==0?'noprint': '')]">
- <h6 class="table-title">事故单</h6>
- <a-table
- rowKey="id"
- :loading="loading"
- :columns="accidentListColumns"
- :data-source="accidentListData"
- bordered
- :pagination="false"
- :scroll="{ }"
- >
- <!-- 事故单 -->
- <span slot="accidentNum" slot-scope="text,record">
- <a :href="'http://www.myfitt.cn:18086/IncidentTicketModalDetail?id='+record.id" target="_blank">{{ text }}</a>
- </span>
- </a-table>
- </div>
- <!-- 费用支出 -->
- <div :class="[(costPayData.length==0?'noprint': '')]">
- <h6 class="table-title" >费用支出</h6>
- <a-table
- rowKey="id"
- :loading="loading"
- :columns="costPayColumns"
- :data-source="costPayData"
- bordered
- :pagination="false"
- >
- </a-table>
- </div>
- <!-- 备注信息 根据角色权限控制【填写】、【查看】-->
- <div class="note-one" style="marginTop:40px;">
- <h6 class="table-title">备注</h6>
- <div class="noteDetail">
- <a-form-model ref="form" :model="detailsPlanNum">
- <a-form-model-item prop="remarks">
- <a-input type="textarea" v-model="detailsPlanNum.remarks" placeholder="请输入备注" style="minHeight:100px;" v-show='showSelect==0' />
- <a-input type="textarea" v-text="detailsPlanNum.remarks" style="minHeight:100px;" v-show='showSelect==1'/>
- </a-form-model-item>
- </a-form-model>
- </div>
- </div>
- <!-- 页面底部保存 -->
- <!-- <a-row :gutter="24" style="marginTop:40px;float:right" class="noprint">
- <a-col :md="12" :sm="12" style="display:flex">
- <a-button type="primary" @click="daYin" style="margin-right:6px" :disabled ="PrintButton">
- 打印
- </a-button>
- <a-button type="primary" @click="save" :disabled="isDisabled">
- 保存
- </a-button>
- </a-col> -->
- <!-- </a-row> -->
- </a-card>
- <!-- 弹框 -->
- <div>
- <!-- 主表 人民币费用支出 弹框 -->
- <mainTableExpenseCNY-modal ref="mainTableExpenseCNYModal" ></mainTableExpenseCNY-modal>
- <!-- 主表 美元费用支出 弹框 -->
- <mainTableExpenseUSD-modal ref="mainTableExpenseUSDModal" :father="bb"></mainTableExpenseUSD-modal>
- <!-- 事故单 -->
- <accidentList-modal ref="accidentListModal" :father="cc"></accidentList-modal>
- <!-- 提交信息 -->
- <Csubmit-information ref="CsubmitInformation" @close="closeInformation"></Csubmit-information>
- <!-- 选择指派人员 -->
- <select-user-modal ref="SelectUserModal" @selectFinished="selectFinished"></select-user-modal>
- <attachment-display ref="attachmentDisplay"></attachment-display>
- </div>
- </div>
- </a-modal>
- </template>
- <script>
- import { JeecgListMixin } from '@/mixins/JeecgListMixin'
- import JEllipsis from '@/components/jeecg/JEllipsis'
- import moment from 'moment'
- // 原始文件(应该跟单证内弹框一样,尝试公用,成功后可删除以下注释)
- // import mainTableExpenseCNYModal from '@views/reportForms/cost-allocation-table/mainTableExpenseCNYModal.vue'
- // import mainTableExpenseUSDModal from '@views/reportForms/cost-allocation-table/mainTableExpenseUSDModal.vue'
- // import accidentListModal from '@views/reportForms/fabric-loss-table/accidentListModal.vue' // 事故单
- // import tabs from '@views/cost-allocation-total/tabs.vue' // tabs组件
- import tabs from '@views/reportForms/cost-allocation-table/tabs.vue' // tabs组件
- import CsubmitInformation from '@views/cost-allocation-total/modal/CsubmitInformation.vue'
- import mainTableExpenseCNYModal from '@views/cost-allocation-total/modal/mainTableExpenseCNYModal.vue'
- import mainTableExpenseUSDModal from '@views/cost-allocation-total/modal/mainTableExpenseUSDModal.vue'
- import accidentListModal from '@views/cost-allocation-total/modal/accidentListModal.vue' // 事故单
- import SelectUserModal from '@views/cost-allocation-total/modal/SelectUserModal.vue'
- import { USER_AUTH } from "@/store/mutation-types"
- import { seachPlanNum, addHalfInfo,deleteFileDetail,assignedData,cancelSubmit } from '@api/document/cost-allocation-total.js'
- import AttachmentDisplay from '@views/reportForms/fabric-loss-table/attachment-display.vue'
- export default {
- name: 'CostAllocationTable', // 成本分配 (新增)
- mixins: [JeecgListMixin],
- components: { JEllipsis,AttachmentDisplay,SelectUserModal,CsubmitInformation, moment, tabs, mainTableExpenseCNYModal, mainTableExpenseUSDModal, accidentListModal },
- data() {
- return {
- key: '', //客户输入的订单号
- PrintButton:true,//打印按钮
- showSelect:0,//计划号是否是输入框
- loading: false, // 表格加载
- showAll:'yes',
- detailsPlanNum: {
- planNum: ''
- }, // 详情所有数据
- remarks: '', // 备注
- fileName:'',
- disableMixinCreated:'1',
- // 事故单 表头
- accidentListColumns: [
- {
- title: '单号',
- width: 120,
- dataIndex: 'accidentNumber',
- className: 'replacecolor',
- customCell: this.accidentListCustomCell,
- scopedSlots: { customRender: 'accidentNum' }
- },
- { title: '事故承担方', width: 120, dataIndex: 'accidentUndertaker', className: 'replacecolor' },
- {
- title: '美元金额',
- width: 120,
- dataIndex: 'amount',
- className: 'replacecolor' ,
- customRender: (text, record, index) => {
- if(text!==''&&text){
- return Number(text).toFixed(2)
- }
- },
- },
- {
- title: '人民币金额',
- width: 120,
- dataIndex: 'amountrmb',
- className: 'replacecolor' ,
- customRender: (text, record, index) => {
- if(text!==''&&text){
- return Number(text).toFixed(2)
- }
- },
- },
- { title: '事故单主题', width: 120, dataIndex: 'accidentTheme', className: 'replacecolor' },
- { title: '责任人', width: 120, dataIndex: 'responsibilityPerson1', className: 'replacecolor' },
- // { title: '币种', width: 120, dataIndex: 'moneyType', className: 'replacecolor' },
- // { title: '金额', dataIndex: 'amount', width: 120, className: 'replacecolor' }
- ],
- accidentListData: [],
- // 费用支出 表头
- costPayColumns: [
- { title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
- { title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
- { title: '费用项目', dataIndex: 'expenseItem', width: 120, className: 'replacecolor' },
- {
- title: '美元',
- dataIndex: 'disbursedOriginalmoney',
- width: 120,
- className: 'replacecolor' ,
- customRender: (text, record, index) => {
- if(text!==''&&text){
- return Number(text).toFixed(2)
- }
- },
- },
- {
- title: '人民币(不含税)',
- dataIndex: 'disbursedLocalmoney',
- width: 120, className: 'replacecolor',
- customRender: (text, record, index) => {
- if(text!==''&&text){
- return Number(text).toFixed(2)
- }
- },
- },
- {
- title: '人民币(税额)',
- dataIndex: 'shuiemoney',
- width: 120,
- className: 'replacecolor',
- customRender: (text, record, index) => {
- if(text!==''&&text){
- return Number(text).toFixed(2)
- }
- },
- },
- {
- title: '人民币(价税合计)',
- dataIndex: 'iNatMoney',
- width: 120,
- className: 'replacecolor',
- customRender: (text, record, index) => {
- if(text!==''&&text){
- return Number(text).toFixed(2)
- }
- }, },
- { title: '发票号', dataIndex: 'invoicenum', width: 120, className: 'replacecolor' },
- { title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
- ],
- costPayData: [],
- detailModVis:false,
- planNo:'',
- isDisabled: false, //按钮禁止
- billstatus: '', // 单据状态
- status:'',
- color1:0,
- color2:0,
- fileList:[],
- AssignedPerson:'no',
- AssignedPersonQx:'no',
- authority:'no',
- url: {
- list: '/sys/user/list',
- importExcelUrl: 'cost/syCostAllocation/addFile' ,// 导入
- }
- // dateFormat: 'YYYY-MM-DD',
- }
- },
- created() {},
- filters: {
- //文字数超出时,超出部分使用...
- ellipsis(value) {
- if (!value) return ''
- if (value.length > 20) {
- return value.slice(0, 20) + '...'
- }
- return value
- }
- },
- methods: {
- // 【计划单号】 搜索
- onSearch() {
- // TODO:接口完善后,type 应改为 add(暂时为了回显数据)
- this.loading = true
- seachPlanNum({ plannum: this.planNo, type: 'query' }).then(res => {
- if (res.success) {
- this.PrintButton = false
- this.loading = false
- this.detailsPlanNum = res.result //所有详情
- if(Number(this.detailsPlanNum.shortseveral)<0){
- this.detailsPlanNum.shortseveral = 0
- this.detailsPlanNum.shortvalue = 0
- }
- var fileList = (this.detailsPlanNum.attachs!==''&&this.detailsPlanNum.attachs)?this.detailsPlanNum.attachs.split(","):[]
- this.fileList = []
- if(fileList.length!==0){
- fileList.map(item=>{
- this.fileList.push({
- uid: '-1',
- name: item,
- status: 'done',
- url:'http://www.myfitt.cn:18001/jeecg-boot/sys/common/static' +'/'+item
- })
- })
- }
- // this.accidentListData = res.result.syCostAllocationAccidentList //事故单
- // this.accidentCalculation(this.accidentListData)
- // var accidentNum = 0
- // this.accidentListData.map(item =>{
- // item.id = accidentNum + 1
- // accidentNum += 1
- // })
- this.accidentListData = res.result.syCostAllocationAccidentList //事故单
- this.accidentCalculation(this.accidentListData) //计算事故单美元金额和事故单人民币金额
- this.costPayData = res.result.syCostAllocationCostpayList //支出费用
- var num = 0
- this.costPayData.map(item =>{
- item.id = num + 1
- num += 1
- })
- // tabs 名称集合
- this.$refs.unitTabs.tabNameList = res.result.processUnit.split(',')
- //所有tabs数据
- this.$refs.unitTabs.tabsAllData = res.result.processUnitList
- // 页面打开加载的数据
- var oneData = this.$refs.unitTabs.tabsAllData[0]
- this.$refs.unitTabs.fabData = oneData.syCostAllocationFabricList
- var all = 0,//面料sheet-转入成本总计
- allYu = 0//面料sheet-余下数量成本总计
- this.$refs.unitTabs.fabData.map(item=>{
- if(item.remainingQuantitycost!=='' && item.remainingQuantitycost){
- item.remainingQuantitycost = Number(item.remainingQuantitycost).toFixed(2)
- allYu +=Number(item.remainingQuantitycost)
- }
- if(item.transferCost&&item.transferCost!==''){
- all+=Number(item.transferCost)
- }
- })
- this.fabricCost = this.detailsPlanNum.fabriccostIncludestax
- this.detailsPlanNum.fabriccostIncludestax = (all+Number(this.detailsPlanNum.fabriccostIncludestax)-allYu).toFixed(2) // 表头面料成本(¥)
- // this.detailsPlanNum.fabriccostIncludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)-allYu).toFixed(2) // 表头面料成本(¥)
- this.detailsPlanNum.fabriccostIncludestaxUsd = (Number(this.detailsPlanNum.fabriccostIncludestax)/1.13/this.detailsPlanNum.exchangeRate).toFixed(2)//表头面料成本($)
- this.detailsPlanNum.fabriccostNotincludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//表头-面料不含税成本(¥)
- this.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList //辅料sheet数据源
- this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail //发运明细sheet数据源
- this.detailsPlanNum.outdata = oneData.syCostAllocationShipdetail.length!==0?oneData.syCostAllocationShipdetail[0].outdata:'' //表头-出运日期
- this.addAmountIng(oneData.syCostAllocationIngredientList) //辅料sheet合计行
- this.addAmountCostPay(this.costPayData) //费用支出合计行
- this.addAccident(this.accidentListData)//事故单合计行
- this.calculation(oneData.syCostAllocationShipdetail) //出运明细合计行
- //合计中面料相关金额
- var s=0
- oneData.syCostAllocationFabricList.map(item=>{
- s+=Number(item.transferCost)
- })
- this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2):'' //合计中的面料总额
- this.$refs.unitTabs.sumInfo.fabricExcludTax =(this.detailsPlanNum.fabriccostNotincludestax!==''&&this.detailsPlanNum.fabriccostNotincludestax)?(Number(this.detailsPlanNum.fabriccostNotincludestax)).toFixed(2):''//合计中的不含税面料总额
- //合计中辅料相关金额
- var s = 0,
- v =0,
- t=0
- oneData.syCostAllocationIngredientList.map(item=>{
- s+=item.priceExcludingtax?Number(item.priceExcludingtax):0,
- v+=item.rmbAmount?Number(item.rmbAmount):0
- t+=item.transferCost?Number(item.transferCost):0
- })
- this.$refs.unitTabs.sumInfo.ingAmount =((v/2)+(t/2)).toFixed(2)//辅料金额合计
- this.$refs.unitTabs.sumInfo.ingExcludAmount = (((s/2)+(t/2)/(1+(Number(this.detailsPlanNum.taxrate)/100)))).toFixed(2)//合计sheet辅料不含税金额合计
- this.detailsPlanNum.excipiencostNotincludestax = ( this.$refs.unitTabs.sumInfo.ingExcludAmount==''|| !this.$refs.unitTabs.sumInfo.ingExcludAmount)?0:Number(this.$refs.unitTabs.sumInfo.ingExcludAmount).toFixed(2)//表头辅料料不含税成本
- this.detailsPlanNum.excipiencostIncludestaxUsd = (this.detailsPlanNum.excipiencostNotincludestax/Number(this.detailsPlanNum.exchangeRate)).toFixed(2)
- this.detailsPlanNum.excipiencostIncludestax = ( this.$refs.unitTabs.sumInfo.ingAmount ==''|| ! this.$refs.unitTabs.sumInfo.ingAmount )?0:Number( this.$refs.unitTabs.sumInfo.ingAmount ).toFixed(2)//表头辅料成本(¥)
- //合计中出运明细相关金额
- var s =0,
- v = 0,
- d = 0,
- b = 0,
- f=0,
- e=0
- oneData.syCostAllocationShipdetail.map(item=>{
- s+=Number(item.exportPrice)
- v+=Number(item.shipQuantity)
- d+=Number(item.processCost)
- b+=Number(item.rmbAmount)
- if(item.outdata!=='合计'){
- e+=Number(item.processCostUsd)
- }
-
- })
- this.$refs.unitTabs.sumInfo.exportPriceUSD = (s/2).toFixed(2)//出运美元外销总价
- this.detailsPlanNum.usdTotalexportprice = this.$refs.unitTabs.sumInfo.exportPriceUSD //表头-外销总价($)
- this.$refs.unitTabs.sumInfo.shipQua =(v/2).toFixed(4)//出货数量合计
- this.$refs.unitTabs.sumInfo.shipProcesFees =(d/2).toFixed(2)//出运加工费
- this.$refs.unitTabs.sumInfo.exportedAmountRMB =(b/2).toFixed(2)//出运人民币外销金额 f
- this.detailsPlanNum.rmbExportamount = this.$refs.unitTabs.sumInfo.exportedAmountRMB //表头-外销总价(¥)
- //调整表头格式
- this.adjustingHeader()
- if(oneData.syCostAllocationShipdetail.length!==0&&Number(oneData.syCostAllocationShipdetail[0].procesUnitPriceusd)>0){
- this.$refs.unitTabs.sumInfo.excludingTaxProcessing =this.$refs.unitTabs.sumInfo.shipProcesFees//出运不含税加工费-合计信息
- }else{
- this.$refs.unitTabs.sumInfo.excludingTaxProcessing =( this.$refs.unitTabs.sumInfo.shipProcesFees/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//出运不含税加工费
- }
- this.detailsPlanNum.rmbProcesscost = this.$refs.unitTabs.sumInfo.excludingTaxProcessing //表头-加工费人民币
- f= Number(this.$refs.unitTabs.sumInfo.excludingTaxProcessing)/Number(this.detailsPlanNum.exchangeRate)
- this.detailsPlanNum.usdProcesscost =e==0?(Number(this.detailsPlanNum.rmbProcesscost)/Number(this.detailsPlanNum.exchangeRate)).toFixed(2):e.toFixed(2)//表头-加工费美元
- f=Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number(this.$refs.unitTabs.sumInfo.shipProcesFees)
- this.$refs.unitTabs.sumInfo.amountTotal = (Number(this.$refs.unitTabs.sumInfo.fabricAmount)+Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).toFixed(2)//合计金额
- this.pagination = {
- total: res.result.total,
- current: res.result.current,
- pageSize: res.result.size
- }
- this.determineAssignedPerson()
- }else {
- this.loading = false
- this.$message.error(res.message);
- }
- })
- },
- //调整表头格式
- adjustingHeader(){
- this.detailsPlanNum.planQuantity=( this.detailsPlanNum.planQuantity==''|| !this.detailsPlanNum.planQuantity)?0:Number( this.detailsPlanNum.planQuantity).toFixed(0)//计划数量
- this.detailsPlanNum.usdTotalexportprice=( this.detailsPlanNum.usdTotalexportprice==''|| !this.detailsPlanNum.usdTotalexportprice)?0:Number( this.detailsPlanNum.usdTotalexportprice).toFixed(2)//美元外销总价
- this.detailsPlanNum.actualShipquantity=( this.detailsPlanNum.actualShipquantity==''|| !this.detailsPlanNum.actualShipquantity)?0:Number( this.detailsPlanNum.actualShipquantity).toFixed(0)//实际出库数量
- this.detailsPlanNum.rmbExportamount=( this.detailsPlanNum.rmbExportamount==''|| !this.detailsPlanNum.rmbExportamount)?0:Number( this.detailsPlanNum.rmbExportamount).toFixed(2)//人民币外销金额
- this.detailsPlanNum.usdExpense=( this.detailsPlanNum.usdExpense==''|| !this.detailsPlanNum.usdExpense)?0:Number( this.detailsPlanNum.usdExpense).toFixed(2)//美元费用支出
- this.detailsPlanNum.usdProcesscost=( this.detailsPlanNum.usdProcesscost==''|| !this.detailsPlanNum.usdProcesscost)?'':Number( this.detailsPlanNum.usdProcesscost).toFixed(2)//加工费(人民币)
- this.detailsPlanNum.accidentUsdamount=( this.detailsPlanNum.accidentUsdamount==''|| !this.detailsPlanNum.accidentUsdamount)?0:Number( this.detailsPlanNum.accidentUsdamount).toFixed(2)//事故单美元金额
- this.detailsPlanNum.salesordersLocaltotal=( this.detailsPlanNum.salesordersLocaltotal==''|| !this.detailsPlanNum.salesordersLocaltotal)?0:Number( this.detailsPlanNum.salesordersLocaltotal).toFixed(2)//销售本币金额
- this.detailsPlanNum.accidentcnyAmount=( this.detailsPlanNum.accidentcnyAmount==''|| !this.detailsPlanNum.accidentcnyAmount)?0:Number( this.detailsPlanNum.accidentcnyAmount).toFixed(2)//事故单人民币金额
- this.detailsPlanNum.salesrrdersOriginaltotal=( this.detailsPlanNum.salesrrdersOriginaltotal==''|| !this.detailsPlanNum.salesrrdersOriginaltotal)?0:Number( this.detailsPlanNum.salesrrdersOriginaltotal).toFixed(2)//销售订单原币金额
- this.detailsPlanNum.excipiencostIncludestaxUsd=( this.detailsPlanNum.excipiencostIncludestaxUsd==''|| !this.detailsPlanNum.excipiencostIncludestaxUsd)?0: this.detailsPlanNum.excipiencostIncludestaxUsd//辅料成本($)
- this.detailsPlanNum.shuiemoney=( this.detailsPlanNum.shuiemoney==''|| !this.detailsPlanNum.shuiemoney)?0: this.detailsPlanNum.shuiemoney//运费税额
- this.detailsPlanNum.shortvalue=( this.detailsPlanNum.shortvalue==''|| !this.detailsPlanNum.shortvalue)?'': (this.detailsPlanNum.shortvalue).toFixed(2)//短出货值
- this.color1 = Number(this.detailsPlanNum.rmbExportamount)-Number(this.detailsPlanNum.fabriccostNotincludestax)-Number(this.detailsPlanNum.excipiencostNotincludestax)-Number(this.detailsPlanNum.rmbProcesscost)-Number(this.detailsPlanNum.rmbExpense)
- if(this.detailsPlanNum.usdTotalexportprice==0.00){
- this.color2 = -1
- }else{
- this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
- }
- // this.color2 = this.color2>0?this.color2:-this.color2
- },
- openEnclosure(){
- this.$refs.attachmentDisplay.AttachmentModVis = true
- var attachList = [];
- if (this.detailsPlanNum != null && this.detailsPlanNum.accessorItemList != null && this.detailsPlanNum.accessorItemList.length!==0){
- this.detailsPlanNum.accessorItemList.forEach(e=>{
- var attach = {};
- attach.name = e.filename;
- attach.src=e.fileurl;
- attachList.push(attach);
- });
- }
- this.$refs.attachmentDisplay.attachmentData = attachList;
- },
- //判断有无指派人
- determineAssignedPerson(){
- this.AssignedPerson='no'
- this.authority='no'
- this.AssignedPersonQx='no'
- assignedData({code:this.planNo}).then(res => {
- if (res.success) {
- var array = res.result!==''?res.result.split(","):[]
- if(array.length!==0){
- this.AssignedPerson='yes'
- }
- let allAuthes = JSON.parse(sessionStorage.getItem(USER_AUTH));
- var quanXian = []
- allAuthes.map(item=>{ quanXian.push(item.action)})
- if(quanXian.indexOf('zpqx:kj2')!==-1){
- this.authority = 'yes'
- }
- array.every(item=>{
- if(item==this.$store.getters.userInfo.realname){
- this.AssignedPersonQx='yes'
- return false
- }
- return true
- })
- }else{
- this.$message.error(res.message);
- }
- })
- },
- //提交
- Submit(){
- this.$refs.CsubmitInformation.submitInformationModVis = true
- this.$refs.CsubmitInformation.text = '提交'
- },
- closeInformation(data,text){
- var syApprovalHistory={
- stuta:text=='提交'?'提交':'驳回',
- planNo:this.planNo,
- processingOpinion:data,
- processedBy:this.$store.getters.userInfo.realname,
- processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
- assignedBy:''
- }
- cancelSubmit({planNum:this.planNo,status:this.status,currentState:text=='提交'?'提交':'驳回',syApprovalHistory:syApprovalHistory}).then(res => {
- if (res.success) {
- this.$message.success(text+'成功')
- this.handlecLose()
- this.$emit('close')
- this.determineAssignedPerson()
- }else{
- this.$message.error(res.message);
- }
- })
- },
- Approved(){
- var syApprovalHistory={
- stuta:'审批通过',
- planNo:this.planNo,
- processingOpinion:'',
- processedBy:this.$store.getters.userInfo.realname,
- processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
- assignedBy:''
- }
- cancelSubmit({planNum:this.planNo,status:this.status,currentState:'审批通过',syApprovalHistory:syApprovalHistory}).then(res => {
- if (res.success) {
- this.$message.success('审批通过')
- this.handlecLose()
- this.$emit('close')
- this.determineAssignedPerson()
- }else{
- this.$message.error(res.message);
- }
- })
- },
- assign(){
- this.$refs.SelectUserModal.visible = true
- },
- selectFinished(data){
- var syApprovalHistory={
- stuta:'指派',
- planNo:this.planNo,
- processingOpinion:'',
- processedBy:this.$store.getters.userInfo.realname,
- processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
- assignedBy:data
- }
- cancelSubmit({planNum:this.planNo,status:this.status,currentState:'指派',syApprovalHistory:syApprovalHistory}).then(res => {
- if (res.success) {
- this.$message.success('指派成功')
- this.handlecLose()
- this.$emit('close')
- this.determineAssignedPerson()
- }else{
- this.$message.error(res.message);
- }
- })
- },
- reject(){
- this.$refs.CsubmitInformation.submitInformationModVis = true
- this.$refs.CsubmitInformation.text = '返单'
- },
- revokeApproval(){
- var syApprovalHistory={
- stuta:'撤销审批',
- planNo:this.planNo,
- processingOpinion:'',
- processedBy:this.$store.getters.userInfo.realname,
- processingTime:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
- assignedBy:''
- }
- cancelSubmit({planNum:this.planNo,status:this.status,currentState:'撤销审批',syApprovalHistory:syApprovalHistory}).then(res => {
- if (res.success) {
- this.$message.success('撤销审批成功')
- this.handlecLose()
- this.$emit('close')
- this.AssignedPerson='yes'
- }else{
- this.$message.error(res.message);
- }
- })
- },
- //计算出运明细合计行
- calculation(val){
- var shipQuantityAll =0,
- exportPriceAll =0,
- rmbAmountAll = 0,
- processCostAll = 0
- val.map(item=>{
- if(item.outdata !=='合计'){
- shipQuantityAll+=Number(item.shipQuantity)
- exportPriceAll+=Number(item.exportPrice)
- rmbAmountAll+=Number(item.rmbAmount)
- processCostAll+=Number(item.processCost)
- }
- })
- var allObj ={
- outdata:'合计',
- shipQuantity:shipQuantityAll.toFixed(3),
- exportPrice:exportPriceAll.toFixed(3),
- rmbAmount:rmbAmountAll.toFixed(3),
- processCost:processCostAll.toFixed(3)
- }
- //发运明细-合计行
- if(this.$refs.unitTabs.shipData.length!==0 ){
- if(this.$refs.unitTabs.shipData[this.$refs.unitTabs.shipData.length-1].outdata=='合计'){
- this.$refs.unitTabs.shipData.pop()
- }
- this.$refs.unitTabs.shipData.push(allObj)
- }
- this.$refs.unitTabs.shipData.map(item=>{
- item.shipQuantity = Number(item.shipQuantity)
- item.exportUnitPrice = Number(item.exportUnitPrice)
- item.exportPrice = Number(item.exportPrice)
- item.rmbAmount = Number(item.rmbAmount)
- item.procesUnitPricermb = Number(item.procesUnitPricermb)
- item.procesUnitPriceusd = Number(item.procesUnitPriceusd)
- item.processCost = Number(item.processCost)
- })
- },
- //辅料中的合计行
- addAmountIng(val){
- var
- transferCostAll =0,
- rmbAmountAll = 0,
- usdAmountAll = 0,
- priceExcludingtaxAll = 0
- this.$refs.unitTabs.ingData.map(item=>{
- if(item.goodsName!=='合计'){
- if((!item.usdAmount|| item.usdAmount=='')||item.rmbAmount == item.usdAmount){
- item.usdAmount = ((item.priceExcludingtax?Number(item.priceExcludingtax):0)/Number(this.detailsPlanNum.exchangeRate)).toFixed(2)
- }
- if(item.rmbAmount !== item.usdAmount){ usdAmountAll+=item.usdAmount?Number(item.usdAmount):0 }
- transferCostAll+=item.transferCost?Number(item.transferCost):0
- rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
- priceExcludingtaxAll+=item.priceExcludingtax?Number(item.priceExcludingtax):0
- }
- })
- var allObj ={
- goodsName:'合计',
- transferCost:transferCostAll,
- rmbAmount:rmbAmountAll,
- usdAmount:usdAmountAll,
- priceExcludingtax:priceExcludingtaxAll,
- ingredientsTransferQuantity:'',
- ingredientsRemainingQuantity:''
- }
- if(this.$refs.unitTabs.ingData.length!==0 ){
- if(this.$refs.unitTabs.ingData[this.$refs.unitTabs.ingData.length-1].goodsName=='合计'){this.$refs.unitTabs.ingData.pop()}
- this.$refs.unitTabs.ingData.push(allObj)
- }
- if(rmbAmountAll == usdAmountAll){
- this.detailsPlanNum.excipiencostIncludestaxUsd = 0
- }else{
- this.detailsPlanNum.excipiencostIncludestaxUsd = usdAmountAll.toFixed(2)
- }
- },
- //事故单合计行
- addAccident(val){
- var amountAll=0,
- amountrmbAll=0
- val.map(item=>{
- if(item.accidentUndertaker!=='合计'){
- amountAll+=Number(item.amount)
- amountrmbAll+=Number(item.amountrmb)
- }
- })
- var allObj={
- accidentUndertaker:'合计',
- amount:amountAll,
- amountrmb:amountrmbAll
- }
- if(this.accidentListData.length!==0 ){
- if(this.accidentListData[this.accidentListData.length-1].accidentUndertaker=='合计'){this.accidentListData.pop()}
- this.accidentListData.push(allObj)
- }
- },
- //费用支出合计行
- addAmountCostPay(val){
- var disbursedLocalmoneyALL=0,
- disbursedOriginalmoneyALL=0,
- shuiemoneyAll = 0
- val.map(item=>{
- if(item.setNo!=='合计'){
- disbursedLocalmoneyALL+=item.disbursedLocalmoney?Number(item.disbursedLocalmoney):0
- disbursedOriginalmoneyALL+=Number(item.disbursedOriginalmoney)
- shuiemoneyAll+=Number(item.shuiemoney)
- }
- })
- var obj={
- setNo:'合计',
- disbursedLocalmoney:disbursedLocalmoneyALL,
- disbursedOriginalmoney:disbursedOriginalmoneyALL,
- shuiemoney:shuiemoneyAll.toFixed(3),
- iNatMoney:(disbursedLocalmoneyALL+shuiemoneyAll)
- }
- if(this.costPayData.length!==0){
- if(this.costPayData[this.costPayData.length-1].setNo=='合计'){this.costPayData.pop()}
- this.costPayData.push(obj)
- }
- this.detailsPlanNum.shuiemoney = shuiemoneyAll.toFixed(2)
- this.detailsPlanNum.rmbNorTaxExpense = Number(obj.disbursedLocalmoney).toFixed(2)
- this.detailsPlanNum.rmbExpense = Number(obj.iNatMoney).toFixed(2)
- this.detailsPlanNum.usdExpense = (Number(this.detailsPlanNum.rmbNorTaxExpense)/Number(this.detailsPlanNum.exchangeRate)).toFixed(2)
- },
- daYin(){
- this.showSelect = 1
- this.$nextTick(() => {
- const html = window.document.getElementById('costAllocationTable').innerHTML
- const win = window.open();
- const style = '<style>\n'
- +'.noprint{display:none}'
- // +'.ant-table-body-inner{overflow-x: hidden !important;overflow-y: hidden !important }' //去除滚动条
- +'.ant-table-body{overflow-x: hidden !important ;overflow-y: hidden !important}'
- +'.ant-table-header {overflow-x: hidden !important ;overflow-y: hidden !important}'
- +'.ant-table-fixed-left{display: none !important}'
- +'.ant-tabs-nav-container{display: none !important}'
- +'.kk{display:flex;flex-wrap: wrap}' //主要信息并排
- +'.ant-col-sm-8{width:40%;margin-bottom: 6px;}'
- +'.ant-form-item-label{width:55%;font-size: 12px;}'
- +'.ant-form-item-children{font-size: 12px}'
- +'.ant-card-head-title{font-weight: bold;font-size: 0.67em;margin-bottom: 9px;}'
- +'.ant-form-item-control-wrapper{width:100%}'
- +'.ant-input{width:100%}'
- +'.ant-form-item{display:flex}'
- + 'table{width: 100% !important;border-collapse: collapse;border-spacing: 0;overflow-x:hidden;}\n'
- + 'th,td{width:2%;height: 18px;border: 1px solid #999;font-size: 12px;color: #666;max-width:2000px;text-align: center;word-wrap: break-word;}\n'
- +'.ant-table-row-cell-break-word{width:5% !important}'
- + 'th{color: #333}\n'
- + 'a{color: #666; text-decoration:none;}\n'
- + '</style>';
- win.document.write(style+html);
- win.focus();
- win.print();
- win.close();
- this.showSelect = 0
- })
-
- },
- //该表税率
- changeTaxrate(){
- this.$refs.unitTabs.changeTaxrate(this.detailsPlanNum.taxrate)
- },
- //计算事故单美元金额和事故单人民币金额
- accidentCalculation(val){
- var usaMoney = 0,
- rmbMoney = 0
- val.map(item=>{
- if(item.accidentType=='应补' && item.amount!==''&&item.amount&&item.amount!=='0'&&Number(item.amount)>0){
- item.amount=Number(item.amount)*(-1)
- }else if(item.accidentType=='应补' && item.amountrmb!==''&&item.amountrmb&&item.amountrmb!=='0'&&Number(item.amount)>0){
- item.amountrmb = Number(item.amountrmb)*(-1)
- }
- if(item.accidentUndertaker!=='合计'){
- usaMoney += Number(item.amount),
- rmbMoney+=Number(item.amountrmb)
- }
- })
- this.detailsPlanNum.accidentUsdamount = usaMoney.toFixed(2)
- this.detailsPlanNum.accidentcnyAmount = rmbMoney.toFixed(2)
- },
- // 主表:人民币费用支出 弹框
- mainTableExpenseCNY() {
- console.log('点击:主表人民币费用支出')
- this.$refs.mainTableExpenseCNYModal.mainTableExpenseCNYModVis = true
- this.$refs.mainTableExpenseCNYModal.mainTableExpenseCNYData = this.costPayData
- this.$refs.mainTableExpenseCNYModal.fixedData = this.costPayData
- },
- // 主表:美元费用支出 弹框
- mainTableExpenseUSD() {
- console.log('点击:主表美元费用支出')
- this.$refs.mainTableExpenseUSDModal.mainTableExpenseUSDModVis = true
- this.$refs.mainTableExpenseUSDModal.mainTableExpenseUSDData = this.costPayData
- this.$refs.mainTableExpenseUSDModal.fixedData = this.costPayData
- },
- orderDataChange(data){
- this.detailsPlanNum.queryTime = moment(data).format('yyyy-MM-DD')
- },
- // 事故单 单号 弹框
- accidentListCustomCell(record) {
- return {
- on: {
- click: event => {
-
- // this.$router.push({path:'http://localhost:3000/#/IncidentTicketModalDetail'})
- // console.log('this:', this)
- // // 调用【面料损耗表】中的【事故单】弹框
- // this.$refs.accidentListModal.accidentListModVis = true
- // this.$refs.accidentListModal.accidentList = record
-
- }
- }
- }
- },
- number(data1,data2){
- this.detailsPlanNum.fabriccostNotincludestax = data1
- },
- FabInQua(data,allYu){
- this.detailsPlanNum.fabriccostIncludestax=(Number(data)+Number(this.fabricCost)-Number(allYu)).toFixed(2)//面料含税成本
- // this.detailsPlanNum.fabriccostIncludestax=(Number(this.fabricCost)-Number(allYu)).toFixed(2)//面料含税成本
- this.detailsPlanNum.fabriccostIncludestaxUsd = (Number(this.detailsPlanNum.fabriccostIncludestax)/1.13/this.detailsPlanNum.exchangeRate).toFixed(2)//表头面料成本($)
- this.detailsPlanNum.fabriccostNotincludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
- this.$refs.unitTabs.sumInfo.fabricAmount=this.detailsPlanNum.fabriccostIncludestax
- this.$refs.unitTabs.sumInfo.fabricExcludTax =(this.detailsPlanNum.fabriccostNotincludestax!==''&&this.detailsPlanNum.fabriccostNotincludestax)?(Number(this.detailsPlanNum.fabriccostNotincludestax)).toFixed(2):''//合计中的不含税面料总额
- this.$refs.unitTabs.sumInfo.amountTotal = (Number(this.$refs.unitTabs.sumInfo.fabricAmount)+Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).toFixed(2)//合计金额
-
- },
- IngInQua(dataArr){
- var s = 0,
- v =0,
- t=0
- dataArr.map(item=>{
- s+=item.priceExcludingtax?Number(item.priceExcludingtax):0,
- v+=item.rmbAmount?Number(item.rmbAmount):0
- t+=item.transferCost?Number(item.transferCost):0
- })
- this.$refs.unitTabs.sumInfo.ingAmount =((v/2)+(t/2)).toFixed(2)//辅料金额合计
- this.$refs.unitTabs.sumInfo.ingExcludAmount = (((s/2)+(t/2)/(1+(Number(this.detailsPlanNum.taxrate)/100)))).toFixed(2)//合计sheet辅料不含税金额合计
- this.detailsPlanNum.excipiencostNotincludestax = ( this.$refs.unitTabs.sumInfo.ingExcludAmount==''|| !this.$refs.unitTabs.sumInfo.ingExcludAmount)?0:Number(this.$refs.unitTabs.sumInfo.ingExcludAmount).toFixed(2)//表头辅料料不含税成本
- this.detailsPlanNum.excipiencostIncludestaxUsd = (this.detailsPlanNum.excipiencostNotincludestax/Number(this.detailsPlanNum.exchangeRate)).toFixed(2)
- this.detailsPlanNum.excipiencostIncludestax = ( this.$refs.unitTabs.sumInfo.ingAmount ==''|| ! this.$refs.unitTabs.sumInfo.ingAmount )?0:Number( this.$refs.unitTabs.sumInfo.ingAmount ).toFixed(2)//表头辅料成本(¥)
- this.$refs.unitTabs.sumInfo.amountTotal = (Number(this.$refs.unitTabs.sumInfo.fabricAmount)+Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).toFixed(2)//合计金额
- },
- // father 方法
- handlecLose() {
- this.detailModVis = false
- this.AssignedPerson='no',
- this.AssignedPersonQx='no',
- this.authority='no',
- this.detailsPlanNum= {
- planNum: ''
- }
- },
- bb() {},
- cc() {}
- },
- computed: {
- importExcelUrl: function() {
- return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
- },
- },
- mounted() {}
- }
- </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/ .fontColor .ant-form-item-label > label{
- color: red !important;
- }
- // /deep/ th.replacecolor {
- // background-color: #ccc;
- // }
- // 抽屉里的card样式
- // /deep/ .ant-drawer-content {
- // background-color: #f0f2f5;
- // }
- // /deep/ .ant-drawer-body {
- // padding: 10px;
- // }
- // /deep/ form :not(.ant-input-group-wrapper) > .ant-input-group, form .ant-input-group-wrapper{
- // width: 65% !important;
- // }
- // /deep/ .ant-input-group{
- // padding-right: 6px !important;
- // }
- // .taxrate{
- // width: 40%;
- // }
- /deep/.ant-modal-body{
- height: 571px;
- overflow-y: scroll;
- }
- /deep/ .ant-table.ant-table-bordered .ant-table-footer {
- border: none;
- padding: 0;
- }
- </style>
|