|
@@ -0,0 +1,958 @@
|
|
|
+<template>
|
|
|
+ <a-modal
|
|
|
+ title="详情"
|
|
|
+ v-model="detailModVis"
|
|
|
+ :confirmLoading="confirmLoading"
|
|
|
+ width="86%"
|
|
|
+ style="top:330px;left:100px;"
|
|
|
+ >
|
|
|
+ <template slot="footer">
|
|
|
+ <a-button >
|
|
|
+ 提交
|
|
|
+ </a-button>
|
|
|
+ <a-button >
|
|
|
+ 指派
|
|
|
+ </a-button>
|
|
|
+ <a-button >
|
|
|
+ 审批通过
|
|
|
+ </a-button>
|
|
|
+ <a-button >
|
|
|
+ 驳回
|
|
|
+ </a-button>
|
|
|
+ <a-button >
|
|
|
+ 撤销审批
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+ <!-- 面料损耗表 -->
|
|
|
+ <div id="fabricLossTable" >
|
|
|
+ <div >
|
|
|
+ <!-- 主要信息 点击搜索后 全部回显-->
|
|
|
+ <a-card title="主要信息" >
|
|
|
+ <a-row :gutter="24" >
|
|
|
+ <div class="table-page-search-wrapper" >
|
|
|
+ <a-form-model layout="inline" ref="form" :model="fabricLoss" :rules="validatorRules" class="kk">
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="计划单号">
|
|
|
+ {{ planNO }}
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="款号" has-feedback>
|
|
|
+ {{fabricLoss.cdefine22}}
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="计划员">
|
|
|
+ {{fabricLoss.planner}}
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="成衣合同号">
|
|
|
+ {{fabricLoss.contractNo}}
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="排单数量">
|
|
|
+ {{fabricLoss.number}}
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="业务员">
|
|
|
+ {{fabricLoss.cpersonName}}
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="总成本">
|
|
|
+ {{fabricLoss.actualMoney}}
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="实际出库数量">
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="制单人">
|
|
|
+ {{fabricLoss.makingPeople}}
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
+ <a-form-model-item label="查询日期">
|
|
|
+ {{fabricLoss.dateTime}}
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
+ <!-- <a-col :md="6" :sm="8" class="noprint">
|
|
|
+ <a-button type="primary" @click="openEnclosure">附件</a-button>
|
|
|
+ </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" @change="handleImportExcel" :data="{code:this.planNO,name:this.fileName}" :beforeUpload="uploadFlie" :remove="removeFile">
|
|
|
+ <a-button type="primary" >附件上传</a-button>
|
|
|
+ </a-upload> -->
|
|
|
+ <!-- <j-upload v-model="fabricLoss.attachs" ></j-upload> -->
|
|
|
+ <!-- <a-upload name="file" action="https://www.mocky.io/v2/5cc8019d300000980a055e76" :multiple="true" :default-file-list="fileList">
|
|
|
+ <a-button type="primary" >附件上传</a-button>
|
|
|
+ </a-upload> -->
|
|
|
+ <!-- <a-button type="primary" @click="openEnclosure">附件</a-button> -->
|
|
|
+ <!-- </a-col> -->
|
|
|
+ </a-form-model>
|
|
|
+ </div>
|
|
|
+ </a-row>
|
|
|
+ <!-- <a-row :gutter="24" > -->
|
|
|
+ <!-- <a-col :md="24" :sm="8" class="noprint">
|
|
|
+ <a-upload name="file" action="https://www.mocky.io/v2/5cc8019d300000980a055e76" :multiple="true" :default-file-list="fileList">
|
|
|
+ <a-button type="primary" >附件上传</a-button>
|
|
|
+ </a-upload>
|
|
|
+ </a-col> -->
|
|
|
+ <!-- </a-row> -->
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
+ <div >
|
|
|
+ <!-- 子表 -->
|
|
|
+ <a-card style="margin:10px 0;">
|
|
|
+ <!-- 采购订单 -->
|
|
|
+ <div :class="[purchase-order-table,(fabricLoss.fabricPoOrderList.length==0?'noprint': '')]">
|
|
|
+ <h6 class="table-title">采购订单</h6>
|
|
|
+
|
|
|
+ <a-table
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :loading="loading"
|
|
|
+ :columns="purchaseOrderColumns"
|
|
|
+ :data-source="fabricLoss.fabricPoOrderList"
|
|
|
+ bordered
|
|
|
+ :pagination="false"
|
|
|
+ :rowClassName="setRowClassName"
|
|
|
+ >
|
|
|
+
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 委外订单国内 -->
|
|
|
+ <div style="margin:40px 0" id="mm" :class="[outsource-orders-table,fabricLoss.fabricOMOrderList1.length==0?'noprint': '']">
|
|
|
+ <h6 class="table-title">委外订单国内</h6>
|
|
|
+ <a-table
|
|
|
+ id="print1"
|
|
|
+ ref="form"
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :columns="outsourceOrderColumns"
|
|
|
+ :data-source="fabricLoss.fabricOMOrderList1"
|
|
|
+ bordered
|
|
|
+ :pagination="false"
|
|
|
+ :scroll="{ x: 1500 }"
|
|
|
+ :loading="loading">
|
|
|
+ <!-- 附件 -->
|
|
|
+ <span slot="enclosure" slot-scope="text, record">
|
|
|
+ <a-button type="primary" @click="openItemOnclosure(record)" :disabled="record.buttonStatus">附件</a-button>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 委外订单国外 -->
|
|
|
+ <div id="cb" :class="[outsourceOrder-abroad-table,fabricLoss.fabricOMOrderList2.length==0?'noprint': '']">
|
|
|
+ <h6 class="table-title">委外订单国外</h6>
|
|
|
+ <a-table
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :loading="loading"
|
|
|
+ :columns="outsourceOrderColumns"
|
|
|
+ :data-source="fabricLoss.fabricOMOrderList2"
|
|
|
+ :scroll="{ x: 1500 }"
|
|
|
+ bordered
|
|
|
+ :pagination="false"
|
|
|
+ >
|
|
|
+ <!-- 附件 -->
|
|
|
+ <span slot="enclosure" slot-scope="text, record">
|
|
|
+ <a-button type="primary" @click="openItemOnclosure(record)" :disabled="record.buttonStatus">附件</a-button>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 成本发票 -->
|
|
|
+ <div style="margin:40px 0" :class="[cost-invoice-table,fabricLoss.fabricCostInvoiceList.length==0?'noprint': '']">
|
|
|
+ <h6 class="table-title">成本发票</h6>
|
|
|
+ <a-table
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :loading="loading"
|
|
|
+ :columns="costInvoiceColumns"
|
|
|
+ :data-source="fabricLoss.fabricCostInvoiceList"
|
|
|
+ bordered
|
|
|
+ :pagination="false"
|
|
|
+ >
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 开票成本-面料 -->
|
|
|
+ <div :class="[costInvoice-fabric-table,fabricLoss.fabricCostClothList.length==0?'noprint': '']">
|
|
|
+ <h6 class="table-title">开票成本-面料</h6>
|
|
|
+ <!-- ref="" -->
|
|
|
+ <a-table
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :loading="loading"
|
|
|
+ :columns="costInvoiceFabricColumns"
|
|
|
+ :data-source="fabricLoss.fabricCostClothList"
|
|
|
+ bordered
|
|
|
+ :pagination="false"
|
|
|
+ >
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 开票成本-成衣 :footer="clothesFooterShow"-->
|
|
|
+ <div :class="[costInvoice-clothes-table,fabricLoss.fabricCostClothesList.length==0?'noprint': '']" style="margin:40px 0">
|
|
|
+ <h6 class="table-title">开票成本-成衣</h6>
|
|
|
+ <a-table
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :loading="loading"
|
|
|
+ :columns="costInvoiceClothesColumns"
|
|
|
+ :data-source="fabricLoss.fabricCostClothesList"
|
|
|
+ bordered
|
|
|
+ :pagination="false"
|
|
|
+ >
|
|
|
+ <!-- 发票数量 -->
|
|
|
+ <span slot="clInvoiceQuantity" slot-scope="text">
|
|
|
+ <a>{{ text }}</a>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 开票成本-辅料 -->
|
|
|
+ <div :class="[costInvoice-ingredient-table,fabricLoss.fabricCostAssistList.length==0?'noprint': '']">
|
|
|
+ <h6 class="table-title">开票成本-辅料</h6>
|
|
|
+ <a-table
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :loading="loading"
|
|
|
+ :columns="costInvoiceIngredientColumns"
|
|
|
+ :data-source="fabricLoss.fabricCostAssistList"
|
|
|
+ bordered
|
|
|
+ :pagination="false"
|
|
|
+ >
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 费用支出 -->
|
|
|
+ <div class="costPay-table noprint" style="margin:40px 0">
|
|
|
+ <h6 class="table-title">费用支出</h6>
|
|
|
+ <a-table
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :loading="loading"
|
|
|
+ :columns="costPayColumns"
|
|
|
+ :data-source="fabricLoss.fabricExpensesList"
|
|
|
+ bordered
|
|
|
+ :pagination="false"
|
|
|
+ :footer="costPayFooterShow"
|
|
|
+ >
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 事故单 -->
|
|
|
+ <div :class="[accidentBill-table,fabricLoss.fabricAccidentList.length==0?'noprint': '']">
|
|
|
+ <h6 class="table-title">事故单</h6>
|
|
|
+ <a-table
|
|
|
+ :row-key="record => record.id"
|
|
|
+ :loading="loading"
|
|
|
+ :columns="accidentListColumns"
|
|
|
+ :data-source="fabricLoss.fabricAccidentList"
|
|
|
+ bordered
|
|
|
+ :pagination="false"
|
|
|
+ >
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 备注信息 1 根据角色判断 显示备注 1 或备注 2-->
|
|
|
+ <div class="note-one" style="marginTop:40px;">
|
|
|
+ <h6 class="table-title">备注</h6>
|
|
|
+ <div class="noteDetail">
|
|
|
+ <a-form-model ref="form" :model="fabricLoss" :rues="validatorRules">
|
|
|
+ <a-form-model-item prop="noteOne">
|
|
|
+ <a-input type="textarea" v-model="fabricLoss.noteOne" style="minHeight:160px;" v-show='showSelect==0'/>
|
|
|
+ <a-input type="textarea" v-text="fabricLoss.noteOne" style="minHeight:160px;" v-show='showSelect==1'/>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-form-model>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 采购订单 -->
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 备注信息 2 根据角色判断 显示备注 1 或备注 2-->
|
|
|
+ <!-- <div class="note-one" style="marginTop:40px;">
|
|
|
+ <h6 class="table-title">备注信息 2</h6>
|
|
|
+ <div class="noteDetail">
|
|
|
+ <a-form-model ref="form" :model="fabricLoss" :rues="validatorRules">
|
|
|
+ <a-form-model-item prop="noteOne">
|
|
|
+ <a-input
|
|
|
+ type="textarea"
|
|
|
+ v-model="fabricLoss.noteTwo"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ style="minHeight:100px;"
|
|
|
+ />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-form-model>
|
|
|
+ </div>
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <!-- 页面底部保存 -->
|
|
|
+ <a-row :gutter="24" style="marginTop:40px;float:right" class="noprint" v-if="!isView">
|
|
|
+ <!-- <a-col :md="12" :sm="12" style="display:flex">
|
|
|
+ <a-button type="primary" @click="daYin" style="margin-right:6px" :disabled ="PrintButton">
|
|
|
+ 打印
|
|
|
+ </a-button>
|
|
|
+ <a-popconfirm title="已完成,是否要继续保存?" ok-text="是" cancel-text="否" @confirm="save()" v-if="fabricLoss.status=='完成'">
|
|
|
+ <a-button type="primary" :loading="loadingBtn" :disabled="!(fabricLoss.status==''||fabricLoss.status=='保存'|| fabricLoss.status=='完成'|| fabricLoss.status=='返单')">
|
|
|
+ 保存
|
|
|
+ </a-button>
|
|
|
+ </a-popconfirm>
|
|
|
+ <a-button type="primary" @click="save" :loading="loadingBtn" :disabled="!(fabricLoss.status==''||fabricLoss.status=='保存'|| fabricLoss.status=='完成'|| fabricLoss.status=='返单')" v-if="fabricLoss.status!=='完成'">
|
|
|
+ 保存
|
|
|
+ </a-button>
|
|
|
+ </a-col> -->
|
|
|
+ </a-row>
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
+ <!-- 附件 -->
|
|
|
+ <attachment-display ref="attachmentDisplay"></attachment-display>
|
|
|
+ </div>
|
|
|
+ </a-modal>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+// import PurchaseAmountModal from '@views/reportForms/fabric-loss-table/purchaseAmountModal.vue'
|
|
|
+// import materialsOutQuantityModal from '@views/reportForms/fabric-loss-table/materialsOutQuantityModal.vue'
|
|
|
+// import purchaseInQuantityModal from '@views/reportForms/fabric-loss-table/purchaseInQuantityModal.vue'
|
|
|
+// import invoiceNumModal from '@views/reportForms/fabric-loss-table/invoiceNumModal.vue'
|
|
|
+// import invoiceQuantityModal from '@views/reportForms/fabric-loss-table/invoiceQuantityModal.vue'
|
|
|
+// import accidentListModal from '@views/reportForms/fabric-loss-table/accidentListModal.vue'
|
|
|
+// import surplusYarnModal from '@views/reportForms/fabric-loss-table/surplusYarnModal.vue'
|
|
|
+// import purchaseLeftModal from '@views/reportForms/fabric-loss-table/purchaseLeftModal.vue'
|
|
|
+// import imoneyCell from '@views/reportForms/fabric-loss-table/imoneyCell.vue'
|
|
|
+// import iquantityMoreLessModal from '@views/reportForms/fabric-loss-table/iquantityMoreLessModal.vue'
|
|
|
+// import otherYarnsInModal from '@views/reportForms/fabric-loss-table/otherYarnsInModal.vue'
|
|
|
+import AttachmentDisplay from '@views/reportForms/fabric-loss-table/attachment-display.vue'
|
|
|
+import { getFabricLossDatas,saveFabricLossData,fileDetail,deleteFileDetail } from '@api/reportForms/fabric-loss-table'
|
|
|
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
+import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
+import JUpload from '@/components/jeecg/JUpload'
|
|
|
+import moment from 'moment'
|
|
|
+import { runInThisContext } from 'vm'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'FabricLossTable', // 面料损耗表
|
|
|
+ mixins: [JeecgListMixin],
|
|
|
+ components: {
|
|
|
+ // 面料损耗表 所有弹框
|
|
|
+ // PurchaseAmountModal,
|
|
|
+ // otherYarnsInModal,
|
|
|
+ // materialsOutQuantityModal,
|
|
|
+ // purchaseInQuantityModal,
|
|
|
+ // invoiceNumModal,
|
|
|
+ // invoiceQuantityModal,
|
|
|
+ // iquantityMoreLessModal,
|
|
|
+ // accidentListModal,
|
|
|
+ // surplusYarnModal,
|
|
|
+ // purchaseLeftModal,
|
|
|
+ JEllipsis,
|
|
|
+ moment,
|
|
|
+ JUpload,
|
|
|
+ AttachmentDisplay,
|
|
|
+ accessory2:[],
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ PrintButton:true,//打印按钮
|
|
|
+ showSelect:0,//计划号是否是输入框
|
|
|
+ fabricLoss: {fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[],fabricCostAssistList:[],fabricCostClothList:[],fabricCostClothesList:[],fabricCostInvoiceList:[],fabricExpensesList:[],fabricAccidentList:[]}, // 主表信息
|
|
|
+ loading: false, // 表格加载
|
|
|
+ loadingBtn:false, //保存按钮加载
|
|
|
+
|
|
|
+ fileList: [
|
|
|
+ ],
|
|
|
+ fileName:'',
|
|
|
+ edit:'0',
|
|
|
+ planNO:'',//计划单号
|
|
|
+ isView:false,//是否查看状态
|
|
|
+ // 采购订单 表头
|
|
|
+ purchaseOrderColumns: [
|
|
|
+ { title: '货物名称', width: '21%', dataIndex: 'cinvName', className: 'replacecolor specel-width'},
|
|
|
+ /*
|
|
|
+ { title: '批号', width: 80, dataIndex: 'cbatch', className: 'replacecolor',
|
|
|
+ customRender:function(text,record,index){
|
|
|
+ if (text == null || text == undefined){
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ if (text.indexOf(",")>-1){
|
|
|
+ const arr = text.split(',');
|
|
|
+ return (<div>
|
|
|
+ {
|
|
|
+ arr.map(t=>{
|
|
|
+ return (<li>{t}</li>)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </div>)
|
|
|
+ }else{
|
|
|
+ return text;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },*/
|
|
|
+ { title: '订单号', width:'8%' , dataIndex: 'cpoid', className: 'replacecolor',
|
|
|
+ customRender:function(text,record,index){
|
|
|
+ if (text == null || text == undefined){
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ if (text.indexOf(",")>-1){
|
|
|
+ const arr = text.split(',');
|
|
|
+ return (<div>
|
|
|
+ {
|
|
|
+ arr.map(t=>{
|
|
|
+ return (<li>{t}</li>)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </div>)
|
|
|
+ }else{
|
|
|
+ return text;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { title: '计划数量', dataIndex: 'iquantity', width:'6%', className: 'replacecolor' },
|
|
|
+ {
|
|
|
+ title: '采购数量',
|
|
|
+ dataIndex: 'iquantityIn',
|
|
|
+ width: '6%',
|
|
|
+ className: 'replacecolor',
|
|
|
+ },
|
|
|
+
|
|
|
+ { title: '采购供应商', dataIndex: 'cvenAbbName', width: '7%', className: 'replacecolor' },
|
|
|
+ { title: '分配数量', dataIndex: 'iquantityOut', width: '5%', className: 'replacecolor' },
|
|
|
+ { title: '委外供应商', dataIndex: 'omcVenAbbName', width: '10%', className: 'replacecolor', },
|
|
|
+ {
|
|
|
+ title: '余纱',
|
|
|
+ dataIndex: 'iquantityLeft',
|
|
|
+ width:'5%',
|
|
|
+ className: 'replacecolor',
|
|
|
+ },
|
|
|
+ { title: '采购损耗', dataIndex: 'iquantityLeftRate', width: '6%', className: 'replacecolor' }
|
|
|
+ ],
|
|
|
+
|
|
|
+ // 委外订单国内 表头
|
|
|
+ outsourceOrderColumns: [
|
|
|
+ { title: '制造工艺', width: '10%', dataIndex: 'cvcname', className: 'replacecolor' },
|
|
|
+ { title: '工厂', width: 80, dataIndex: 'cvenAbbName', className: 'replacecolor specleWidth' },
|
|
|
+ {
|
|
|
+ title: '材料出库数量',
|
|
|
+ dataIndex: 'iquantityOut',
|
|
|
+ width: '5%',
|
|
|
+ className: 'replacecolor',
|
|
|
+ },
|
|
|
+ { title: '计划数量', dataIndex: 'iquantity', width: '6%', className: 'replacecolor' },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '单位',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ title: '根',
|
|
|
+ dataIndex: 'iquantityPCS',
|
|
|
+ width: '5%',
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '米',
|
|
|
+ dataIndex: 'iquantityM',
|
|
|
+ width: '5%',
|
|
|
+ className: 'replacecolor'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '采购入库数量',
|
|
|
+ dataIndex: 'iquantityIn',
|
|
|
+ width: '7%',
|
|
|
+ className: 'replacecolor',
|
|
|
+ customCell: this.purchaseInQuantityCustomCell,
|
|
|
+ scopedSlots: { customRender: 'purchaseInQuantity' }
|
|
|
+ },
|
|
|
+ { title: '染厂色号', dataIndex: 'ccolorNumber', width:'10%', className: 'replacecolor' },
|
|
|
+ { title: '物料编码', dataIndex: 'cinvCode', width: '7%', className: 'replacecolor noprint' },
|
|
|
+ { title: '货物名称', dataIndex: 'cinvName', width: '20%',className: 'replacecolor specel-width' },
|
|
|
+ { title: '颜色', dataIndex: 'ccolor', width: '7%', className: 'replacecolor' },
|
|
|
+ { title: '损耗', dataIndex: 'cquantityLoss', width: '6%',className: 'replacecolor' },
|
|
|
+ { title: '多发少发', dataIndex: 'iquantityMoreLess', width: '6%', className: 'replacecolor',},
|
|
|
+ { title: '附件', dataIndex: 'enclosure', width: '6%', className: 'noprint', scopedSlots: { customRender: 'enclosure' }}
|
|
|
+ ],
|
|
|
+
|
|
|
+ // 成本发票 表头
|
|
|
+ costInvoiceColumns: [
|
|
|
+ { title: '类型', width: 120, dataIndex: 'cvcname', className: 'replacecolor' },
|
|
|
+ { title: '采购类型', width: 120, dataIndex: 'cbusType', className: 'replacecolor' },
|
|
|
+ { title: '工厂', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor'},
|
|
|
+ { title: '成本金额', dataIndex: 'imoney', width: 120, className: 'replacecolor'},
|
|
|
+ { title: '无税金额', dataIndex: 'inoTaxMoney', width: 120, className: 'replacecolor' }
|
|
|
+ ],
|
|
|
+ costInvoiceData: [
|
|
|
+ { costInvoiceType: '纱款', factory: '17TW-C-17B', costAmount: '5081.72' },
|
|
|
+ { costInvoiceType: '纱款', factory: '17TW-C-17C', costAmount: '127754.31' },
|
|
|
+ { costInvoiceType: '织款', factory: '18TW-C-8', costAmount: '17045.48' },
|
|
|
+ { costInvoiceType: '染款', factory: '福隆', costAmount: '59762.4' },
|
|
|
+ { costInvoiceType: '织款', factory: '江阴美纶', costAmount: '20482.95' }
|
|
|
+ ],
|
|
|
+
|
|
|
+ // 开票成本-面料 表头
|
|
|
+ costInvoiceFabricColumns: [
|
|
|
+ { title: '序号', width: 80, dataIndex: 'index', className: 'replacecolor' },
|
|
|
+ {
|
|
|
+ title: '发票号码',
|
|
|
+ width: 120,
|
|
|
+ dataIndex: 'csbvcode',
|
|
|
+
|
|
|
+ className: 'replacecolor',
|
|
|
+ customCell: this.invoiceNumCustomCell,
|
|
|
+ scopedSlots: { customRender: 'invoiceNum' }
|
|
|
+ },
|
|
|
+ { title: '供应商', width: 120, dataIndex: 'cvenName', className: 'replacecolor' },
|
|
|
+ { title: '采购发票金额', width: 120, dataIndex: 'inatSum', className: 'replacecolor' },
|
|
|
+ { title: '出运日期', width: 120, dataIndex: 'cshipTime', className: 'replacecolor' }
|
|
|
+ ],
|
|
|
+ costInvoiceFabricData: [
|
|
|
+ { invoiceNum: '18TW-MYA-44', supplier: '供应商1', PurchaseinvoiceCost: '888.88', outData: '2018-05-04' },
|
|
|
+ { invoiceNum: '18TW-MYA-78', supplier: '供应商1', PurchaseinvoiceCost: '888.88', outData: '2018-05-18' },
|
|
|
+ { invoiceNum: '18TW-MYA-34', supplier: '供应商1', PurchaseinvoiceCost: '888.88', outData: '2018-06-1' }
|
|
|
+ ],
|
|
|
+ costInvoiceClothesColumns:[],
|
|
|
+ // 开票成本-成衣 表头无美元
|
|
|
+ costInvoiceClothesColumnsM1:[
|
|
|
+ { title: '序号', width: 80, dataIndex: 'index', className: 'replacecolor' },
|
|
|
+ { title: '发票号码', width: 120, dataIndex: 'cpbvcode', className: 'replacecolor' },
|
|
|
+ { title: '委外供应商', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
|
|
|
+ { title: '成衣加工费(人民币)', width: 120, dataIndex: 'isum', className: 'replacecolor' },
|
|
|
+
|
|
|
+ { title: '出运日期', width: 120, dataIndex: 'cshipTime', className: 'replacecolor' },
|
|
|
+ { title: '入库数量', width: 120, dataIndex: 'iquantity', className: 'replacecolor' },
|
|
|
+ {
|
|
|
+ title: '发票数量',
|
|
|
+ dataIndex: 'ipbvquantity',
|
|
|
+
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // 开票成本-成衣 表头
|
|
|
+ costInvoiceClothesColumnsAll: [
|
|
|
+ { title: '序号', width: 80, dataIndex: 'index', className: 'replacecolor' },
|
|
|
+ { title: '发票号码', width: 120, dataIndex: 'cpbvcode', className: 'replacecolor' },
|
|
|
+ { title: '委外供应商', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
|
|
|
+ { title: '成衣加工费(人民币)', width: 120, dataIndex: 'isum', className: 'replacecolor' },
|
|
|
+ { title: '成衣加工费(美元)', width: 120, dataIndex: 'ioriSum', className: 'replacecolor' },
|
|
|
+ { title: '出运日期', width: 120, dataIndex: 'cshipTime', className: 'replacecolor' },
|
|
|
+ { title: '入库数量', width: 120, dataIndex: 'iquantity', className: 'replacecolor' },
|
|
|
+ {
|
|
|
+ title: '发票数量',
|
|
|
+ dataIndex: 'ipbvquantity',
|
|
|
+
|
|
|
+ width: 120,
|
|
|
+ className: 'replacecolor',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+
|
|
|
+ // 开票成本-辅料 表头
|
|
|
+
|
|
|
+ costInvoiceIngredientColumns:[],
|
|
|
+ costInvoiceIngredientColumnsM1:[
|
|
|
+ { title: '序号', width: '10%', dataIndex: 'index', className: 'replacecolor' },
|
|
|
+ { title: '账套号', width: '10%', dataIndex: 'caccount', className: 'replacecolor' },
|
|
|
+ { title: '订单号', width: '10%', dataIndex: 'cpoid', className: 'replacecolor' },
|
|
|
+ { title: '供应商', width: '7%', dataIndex: 'cvenAbbName', className: 'replacecolor' },
|
|
|
+ { title: ' 类型', width: '13%', dataIndex: 'cinvName', className: 'replacecolor',align:"left" },
|
|
|
+ {
|
|
|
+ title: '发票数量',
|
|
|
+ width: '7%',
|
|
|
+ dataIndex: 'iquantityInvoice',
|
|
|
+ className: 'replacecolor',
|
|
|
+ customCell: this.ingredientsInvoiceQuantityCustomCell,
|
|
|
+ scopedSlots: { customRender: 'ingredientsInvoiceQuantity' }
|
|
|
+ },
|
|
|
+ { title: '开票金额(人民币)', width: '10%', dataIndex: 'isum', className: 'replacecolor' },
|
|
|
+ { title: '无税金额', width: '6%', dataIndex: 'inoTaxMoney', className: 'replacecolor' },
|
|
|
+ { title: '单位', width: '10%', dataIndex: 'ccomUnitName', className: 'replacecolor' },
|
|
|
+ { title: '订单数', width: '10%', dataIndex: 'iquantity', className: 'replacecolor' },
|
|
|
+ { title: '采购入库数', width: '10%', dataIndex: 'iquantityIn', className: 'replacecolor' }
|
|
|
+ ],
|
|
|
+ costInvoiceIngredientColumnsAll: [
|
|
|
+ { title: '账套号', width: '10%', dataIndex: 'caccount', className: 'replacecolor' },
|
|
|
+ { title: '订单号', width: '10%', dataIndex: 'cpoid', className: 'replacecolor' },
|
|
|
+ { title: '供应商', width: '7%', dataIndex: 'cvenAbbName', className: 'replacecolor' },
|
|
|
+ { title: ' 类型', width: '10%', dataIndex: 'cinvName', className: 'replacecolor',align:"left" },
|
|
|
+ {
|
|
|
+ title: '发票数量',
|
|
|
+ width: '10%',
|
|
|
+ dataIndex: 'iquantityInvoice',
|
|
|
+ className: 'replacecolor',
|
|
|
+ },
|
|
|
+ { title: '开票金额(人民币)', width: '10%', dataIndex: 'isum', className: 'replacecolor' },
|
|
|
+ { title: '开票金额(美元)', width: '10%', dataIndex: 'ioriSum', className: 'replacecolor',customRender: (text, record, index) => {
|
|
|
+ if (record.isum == record.ioriSum)
|
|
|
+ return "";
|
|
|
+ else
|
|
|
+ return record.ioriSum;
|
|
|
+ } },
|
|
|
+ { title: '无税金额', width: '6%', dataIndex: 'inoTaxMoney', className: 'replacecolor' },
|
|
|
+ { title: '单位', width: '10%', dataIndex: 'ccomUnitName', className: 'replacecolor' },
|
|
|
+ { title: '订单数', width: '10%', dataIndex: 'iquantity', className: 'replacecolor' },
|
|
|
+ { title: '采购入库数', width: '10%', dataIndex: 'iquantityIn', className: 'replacecolor' }
|
|
|
+ ],
|
|
|
+ costInvoiceIngredientData: [
|
|
|
+ { factory: '森加', type: '主标', ingredientsInvoiceQuantity: '45900', invoiceAmountCNY: '259.42' },
|
|
|
+ { factory: '森加', type: '尺码标', ingredientsInvoiceQuantity: '3670', invoiceAmountCNY: '1475.6' }
|
|
|
+ ],
|
|
|
+
|
|
|
+ // 费用支出 表头
|
|
|
+ costPayColumns: [
|
|
|
+ { title: '账套号', width: 120, dataIndex: 'caccount', className: 'replacecolor' },
|
|
|
+ { title: '支出单号', width: 120, dataIndex: 'cspvcode', className: 'replacecolor' },
|
|
|
+ { title: '费用项目', dataIndex: 'cexpName', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '支出人民币金额', dataIndex: 'inatMoney', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '支出美元金额', dataIndex: 'imoney', width: 120, className: 'replacecolor',customRender: (text, record, index) => {
|
|
|
+ if (record.imoney == record.inatMoney)
|
|
|
+ return "";
|
|
|
+ else
|
|
|
+ return record.imoney;
|
|
|
+ } },
|
|
|
+ { title: '发票号', dataIndex: 'cinvoinceNo', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '制单人', dataIndex: 'cmaker', width: 120, className: 'replacecolor' }
|
|
|
+ ],
|
|
|
+ costPayData: [{}],
|
|
|
+
|
|
|
+ // 事故单 表头
|
|
|
+ accidentListColumns: [
|
|
|
+ {
|
|
|
+ title: '单号',
|
|
|
+ width: 120,
|
|
|
+ dataIndex: 'cpbvcode',
|
|
|
+ className: 'replacecolor',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '事故单号',
|
|
|
+ width: 120,
|
|
|
+ dataIndex: 'cpbvmemo',
|
|
|
+ className: 'replacecolor',
|
|
|
+ },
|
|
|
+ { title: '事故承担方', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
|
|
|
+ { title: '金额', dataIndex: 'ioriSum', width: 120, className: 'replacecolor' }
|
|
|
+ ],
|
|
|
+ accidentListData: [{ accidentNum: '1100011' }, { accidentNum: '3540011' }],
|
|
|
+ url: {
|
|
|
+ list: '/sys/user/list',
|
|
|
+ importExcelUrl: 'report/FabricLoss/addFile' ,// 导入
|
|
|
+ },
|
|
|
+ noteOne: '', // 备注 1
|
|
|
+ noteTwo: '', // 备注 2
|
|
|
+ dd:0,
|
|
|
+ detailModVis:false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // uploadFlie(file) {
|
|
|
+ // this.fileName = file.name
|
|
|
+ // // const formData = new FormData()
|
|
|
+ // // formData.append('file',file.file)
|
|
|
+ // // fileDetail({code:this.planNO,name:this.fileName}).then(res => {
|
|
|
+ // // if (res.success) {
|
|
|
+ // // this.onSearch(this.planNO,'0')
|
|
|
+ // // }else{
|
|
|
+ // // this.$message.error(res.message);
|
|
|
+ // // }
|
|
|
+ // // })
|
|
|
+ // },
|
|
|
+ // handleImportExcel(data){
|
|
|
+ // if(data.fileList.length>this.fileList.length&&data.file.status=='uploading'){
|
|
|
+ // var that =this
|
|
|
+ // setTimeout(()=>{
|
|
|
+ // that.onSearch(this.planNO,'0')
|
|
|
+ // },1000)
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ // },
|
|
|
+ // removeFile(data){
|
|
|
+ // deleteFileDetail({code:this.planNO,name:data.name}).then(res => {
|
|
|
+ // if (res.success) {
|
|
|
+ // var cc=[]
|
|
|
+ // this.fileList.map(item=>{
|
|
|
+ // if(item.name !== data.name){
|
|
|
+ // cc.push(item)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // this.fileList = cc
|
|
|
+ // this.loading =false
|
|
|
+ // this.$message.success('删除成功');
|
|
|
+ // }else{
|
|
|
+ // this.$message.error(res.message);
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // daYin(){
|
|
|
+ // this.showSelect = 1
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // const html = window.document.getElementById('fabricLossTable').innerHTML
|
|
|
+ // const win = window.open();
|
|
|
+ // const style = '<style>\n'
|
|
|
+ // +'.noprint{display:none}'
|
|
|
+ // +'.specleWidth{width:15% !important}'
|
|
|
+ // +'.ant-table-body{overflow-x: hidden !important }' //去除滚动条
|
|
|
+ // +'.kk{display:flex;flex-wrap: wrap}' //主要信息并排
|
|
|
+ // +'.ant-col-sm-8{width:40%;margin-bottom: 6px;}'
|
|
|
+ // +'.ant-form-item-label{width:45%;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:5%;height: 18px;border: 1px solid #999;font-size: 12px;color: #666;max-width:2000px;text-align: center;}\n'
|
|
|
+ // +'.ant-table-row-cell-break-word{width:5%}'
|
|
|
+ // +'.specel-width{width:25% !important}'
|
|
|
+ // + 'th{color: #333}\n'
|
|
|
+ // + 'a{color: #666; text-decoration:none;}\n'
|
|
|
+ // +'.table-title{margin-bottom: 0% !important;margin-top: 0% !important;}'
|
|
|
+ // +'.outsource-orders-table{margin: 15px 0px !important;}'
|
|
|
+ // +'.cost-invoice-table{ margin: 15px 0px !important;}'
|
|
|
+ // +'.costInvoice-fabric-table{margin: 15px 0px !important;}'
|
|
|
+ // +'.costInvoice-ingredient-table{margin: 15px 0px !important;}'
|
|
|
+ // +'.note-one{ margin-top: 15px;}'
|
|
|
+ // +'.title{text-align: center;}'
|
|
|
+ // + '</style>';
|
|
|
+ // win.document.write(style+html);
|
|
|
+ // win.focus();
|
|
|
+ // setTimeout(function(){
|
|
|
+ // let textArea = win.document.getElementsByTagName('textarea')
|
|
|
+ // for (let i = 0; i < textArea.length; i++) {
|
|
|
+ // textArea[i].style.height = 'auto' // 先设置成auto,再设置高度,删除文字的时候高度才会改变
|
|
|
+ // textArea[i].style.height = textArea[i].scrollHeight+100 + 'px'
|
|
|
+ // }
|
|
|
+ // win.print();
|
|
|
+ // win.close();
|
|
|
+ // },500)
|
|
|
+ // this.showSelect = 0
|
|
|
+ // // win.print();
|
|
|
+ // // win.close();
|
|
|
+ // // this.showSelect = 0
|
|
|
+ // })
|
|
|
+
|
|
|
+ // },
|
|
|
+ // 【计划单号】 搜索
|
|
|
+ onSearch(value,update) {
|
|
|
+ if (value == "" || value == null){
|
|
|
+ this.$message.error('请输入计划号!');
|
|
|
+ }else{
|
|
|
+ this.loading = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ getFabricLossDatas({csocode:value,update:update}).then(res => {
|
|
|
+ this.loading = false;
|
|
|
+ if (res.success) {
|
|
|
+ this.planNO = value
|
|
|
+ this.PrintButton = false
|
|
|
+ this.fabricLoss = res.result;
|
|
|
+ var fileList = this.fabricLoss.attachs!==''?this.fabricLoss.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.edit = this.fabricLoss.edit
|
|
|
+ // 开票成本成衣:获取原币和本币金额是否完全相同,完全相同隐藏美元列
|
|
|
+ var findList = this.fabricLoss.fabricCostClothesList.filter(e=>e.ioriSum!=e.isum);
|
|
|
+ if (findList.length == 0)
|
|
|
+ this.costInvoiceClothesColumns = this.costInvoiceClothesColumnsM1;
|
|
|
+ else
|
|
|
+ this.costInvoiceClothesColumns = this.costInvoiceClothesColumnsAll;
|
|
|
+ // 开票成本辅料:获取原币和本币金额是否完全相同,完全相同隐藏美元列
|
|
|
+ findList = this.fabricLoss.fabricCostAssistList.filter(e=>e.ioriSum!=e.isum);
|
|
|
+ if (findList.length == 0)
|
|
|
+ this.costInvoiceIngredientColumns = this.costInvoiceIngredientColumnsM1;
|
|
|
+ else
|
|
|
+ this.costInvoiceIngredientColumns = this.costInvoiceIngredientColumnsAll;
|
|
|
+
|
|
|
+ // 委外订单国内附件按钮状态
|
|
|
+ this.fabricLoss.fabricOMOrderList1.map(item=>{
|
|
|
+ item.buttonStatus = false
|
|
|
+ if(!item.accessorItemList||item.accessorItemList.length == 0 ){
|
|
|
+ item.buttonStatus = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 委外订单国外附件按钮状态
|
|
|
+ this.fabricLoss.fabricOMOrderList2.map(item=>{
|
|
|
+ item.buttonStatus = false
|
|
|
+ if(!item.accessorItemList||item.accessorItemList.length == 0 ){
|
|
|
+ item.buttonStatus = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.fabricLoss.fabricCostClothesList.map((item,index) => {item.index = index +1})
|
|
|
+ this.fabricLoss.fabricCostClothList.map((item,index) => {item.index = index +1})
|
|
|
+ this.fabricLoss.fabricCostAssistList.map((item,index) => {item.index = index +1})
|
|
|
+ this.fabricLoss.fabricPoOrderList.map(item => {
|
|
|
+ item["omcVenAbbNameArray"] = item.omcVenAbbName ? (item.omcVenAbbName.split(",")) : ''
|
|
|
+ })
|
|
|
+ if (this.fabricLoss.fabricAccidentList == null){
|
|
|
+ this.fabricLoss.fabricAccidentList = [];
|
|
|
+ }
|
|
|
+ this.calculateTotal('frist')
|
|
|
+ this.$forceUpdate()
|
|
|
+ }else{
|
|
|
+ this.fabricLoss = {fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[],fabricCostAssistList:[],fabricCostClothList:[],fabricCostClothesList:[],fabricCostInvoiceList:[],fabricExpensesList:[],fabricAccidentList:[]};
|
|
|
+ this.$message.info(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //计算合计行
|
|
|
+ calculateTotal(data){
|
|
|
+ if(data =='notFrist'){
|
|
|
+ this.fabricLoss.fabricCostInvoiceList.pop()
|
|
|
+ this.fabricLoss.fabricCostClothList.pop()
|
|
|
+ this.fabricLoss.fabricAccidentList.pop()
|
|
|
+ this.fabricLoss.fabricCostClothesList.pop()
|
|
|
+ this.fabricLoss.fabricCostAssistList.pop()
|
|
|
+ }
|
|
|
+ //计算成本发票合计
|
|
|
+ var imoney = 0,
|
|
|
+ inoTaxMoney = 0
|
|
|
+ for (let row of this.fabricLoss.fabricCostInvoiceList){
|
|
|
+ imoney += row.imoney*1;
|
|
|
+ inoTaxMoney +=(row.inoTaxMoney?row.inoTaxMoney:0)*1
|
|
|
+ }
|
|
|
+ if(this.fabricLoss.fabricCostInvoiceList.length !==0){
|
|
|
+ this.fabricLoss.fabricCostInvoiceList.push({
|
|
|
+ cvcname:'',
|
|
|
+ cbusType:'合计',
|
|
|
+ cvenAbbName:'',
|
|
|
+ imoney:parseFloat(imoney.toFixed(2)),
|
|
|
+ inoTaxMoney:parseFloat(inoTaxMoney.toFixed(2)),
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //计算开票成本-面料合计
|
|
|
+ var inatSum = 0;
|
|
|
+ for (let row of this.fabricLoss.fabricCostClothList){
|
|
|
+ inatSum += row.inatSum*1;
|
|
|
+ }
|
|
|
+ if(this.fabricLoss.fabricCostClothList.length !==0){
|
|
|
+ this.fabricLoss.fabricCostClothList.push({
|
|
|
+ index:'',
|
|
|
+ csbvcode:'合计',
|
|
|
+ cvenName:'',
|
|
|
+ inatSum:parseFloat(inatSum.toFixed(2)),
|
|
|
+ cshipTime:''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //计算开票成本-成衣合计
|
|
|
+ var isum = 0,ioriSum=0,iquantity=0,ipbvquantity=0;
|
|
|
+ for (let row of this.fabricLoss.fabricCostClothesList){
|
|
|
+ isum += row.isum*1;
|
|
|
+ ioriSum += row.ioriSum*1;
|
|
|
+ iquantity += row.iquantity*1;
|
|
|
+ ipbvquantity += row.ipbvquantity*1;
|
|
|
+ }
|
|
|
+ if(this.fabricLoss.fabricCostClothesList.length!==0){
|
|
|
+ this.fabricLoss.fabricCostClothesList.push({
|
|
|
+ cpbvcode:'合计',
|
|
|
+ isum: parseFloat(isum.toFixed(2)),
|
|
|
+ ioriSum: parseFloat(ioriSum.toFixed(2)),
|
|
|
+ iquantity: parseFloat(iquantity.toFixed(4)),
|
|
|
+ ipbvquantity: parseFloat(ipbvquantity.toFixed(4)),
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //开票成本-辅料合计
|
|
|
+ var isum = 0,ioriSum=0,iquantity=0,iquantityIn=0,iquantityInvoice=0,inoTaxMoney = 0
|
|
|
+ for (let row of this.fabricLoss.fabricCostAssistList){
|
|
|
+ isum += row.isum*1;
|
|
|
+ iquantity += row.iquantity*1;
|
|
|
+ iquantityIn += row.iquantityIn*1;
|
|
|
+ iquantityInvoice += row.iquantityInvoice*1;
|
|
|
+ inoTaxMoney += (row.inoTaxMoney?row.inoTaxMoney:0)*1
|
|
|
+ if(row.isum!==row.ioriSum){
|
|
|
+ ioriSum += row.ioriSum*1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.fabricLoss.fabricCostAssistList.length !== 0){
|
|
|
+ this.fabricLoss.fabricCostAssistList.push({
|
|
|
+ caccount:'合计',
|
|
|
+ isum:parseFloat(isum.toFixed(2)),
|
|
|
+ ioriSum:parseFloat(ioriSum.toFixed(2)),
|
|
|
+ iquantity:parseFloat(iquantity.toFixed(4)),
|
|
|
+ iquantityIn:parseFloat(iquantityIn.toFixed(4)),
|
|
|
+ iquantityInvoice:parseFloat(iquantityInvoice.toFixed(4)),
|
|
|
+ inoTaxMoney:parseFloat(inoTaxMoney.toFixed(4)),
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ //事故单合计
|
|
|
+ var item = {
|
|
|
+ "cvenAbbName":"合计"
|
|
|
+ };
|
|
|
+ var ioriSum = 0
|
|
|
+ for (let row of this.fabricLoss.fabricAccidentList){
|
|
|
+ ioriSum += row.ioriSum*1
|
|
|
+ }
|
|
|
+ if(this.fabricLoss.fabricAccidentList.length !== 0){
|
|
|
+ this.fabricLoss.fabricAccidentList.push({
|
|
|
+ cvenAbbName:"合计",
|
|
|
+ ioriSum:parseFloat(ioriSum.toFixed(4))
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ //行样式
|
|
|
+ setRowClassName(record) {
|
|
|
+ return(record.iquantityLeft!==0&&record.fabricPoOrderOutList.length == 0) ? "inputRowStyl" : "inputRowSty2";//赋予点击行样式
|
|
|
+ },
|
|
|
+ openItemOnclosure(record){
|
|
|
+ var attachList = [];
|
|
|
+ record.accessorItemList.forEach(e=>{
|
|
|
+ var attach = {};
|
|
|
+ attach.name = e.filename;
|
|
|
+ attach.src=e.fileurl;
|
|
|
+ attachList.push(attach);
|
|
|
+ });
|
|
|
+ this.$refs.attachmentDisplay.AttachmentModVis = true
|
|
|
+ this.$refs.attachmentDisplay.attachmentData = attachList;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ // father
|
|
|
+ aa() {},
|
|
|
+ bb() {},
|
|
|
+ cc() {},
|
|
|
+ dd() {},
|
|
|
+ ee() {},
|
|
|
+ ff() {},
|
|
|
+ gg() {}
|
|
|
+ },
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+@import '~@assets/less/common.less';
|
|
|
+@import '~@assets/less/overwriter.less';
|
|
|
+/deep/.ant-modal-body{
|
|
|
+ height: 571px;
|
|
|
+ overflow-y: scroll;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+</style>
|