فهرست منبع

面损表调整行

jbb 2 سال پیش
والد
کامیت
145876b276
1فایلهای تغییر یافته به همراه52 افزوده شده و 66 حذف شده
  1. 52 66
      src/views/reportForms/fabric-loss-table.vue

+ 52 - 66
src/views/reportForms/fabric-loss-table.vue

@@ -224,15 +224,20 @@
           bordered
           :pagination="false"
         >
+        <span slot="cbusType" slot-scope="text,record">
+              <a-input placeholder="请输入" v-model="record.cbusType" v-if="record.bmanual"/>
+              <span v-else>{{text}}</span>
+          </span>
         
         <!-- 成本金额 -->
            <span slot="imoney" slot-scope="text,record">
-              <a v-if="(record.cbusType == '转出成本')|| (record.cbusType == '转入成本')" @click="imoneyCell(record)">{{text}}</a>
-              <span v-else >{{text}}</span>
+              <a v-if="(record.cbusType == '转出成本') || (record.cbusType == '转入成本')&& !record.bmanual" @click="imoneyCell(record)">{{text}}</a>
+              <span v-if="(record.cbusType !== '转出成本') && (record.cbusType !== '转入成本') && !record.bmanual" >{{text}}</span>
+              <a-input placeholder="请输入" v-model="record.imoney" v-if="record.bmanual"/>
           </span>
         <!-- 工厂 -->
         <span slot="cvenAbbName" slot-scope="text,record">
-              <a-input placeholder="请输入工厂" v-model="record.cvenAbbName" v-if="(record.cbusType == '转出成本' && showSelect==0)"/>
+              <a-input placeholder="请输入工厂" v-model="record.cvenAbbName" v-if="(record.cbusType == '转出成本' && showSelect==0) ||record.bmanual"/>
               <span v-else>{{text}}</span>
           </span>
         </a-table>
@@ -467,7 +472,7 @@ export default {
       planNO:'',//计划单号
       // 采购订单 表头
       purchaseOrderColumns: [
-        { title: '货物名称', width: 180, dataIndex: 'cinvName', className: 'replacecolor', align:'left'},
+        { title: '货物名称', width: '10%', dataIndex: 'cinvName', className: 'replacecolor', align:'left'},
         /*
         { title: '批号', width: 80, dataIndex: 'cbatch', className: 'replacecolor',
           customRender:function(text,record,index){
@@ -488,7 +493,7 @@ export default {
             }
           }
         },*/
-        { title: '订单号', width: 80, dataIndex: 'cpoid', className: 'replacecolor',
+        { title: '订单号', width:'10%' , dataIndex: 'cpoid', className: 'replacecolor',
           customRender:function(text,record,index){
             if (text == null || text == undefined){
               return "";
@@ -507,23 +512,23 @@ export default {
             }
           }
         },
-        { title: '计划数量', dataIndex: 'iquantity', width: 80, className: 'replacecolor' },
+        { title: '计划数量', dataIndex: 'iquantity', width:'10%', className: 'replacecolor' },
         {
           title: '采购数量',
           dataIndex: 'iquantityIn',
-          width: 80,
+          width: '10%',
           className: 'replacecolor',
           customCell: this.purchaseQuantityCustomCell,
           scopedSlots: { customRender: 'purchaseQuantity' }
         },
 
-        { title: '采购供应商', dataIndex: 'cvenAbbName', width: 100, className: 'replacecolor' },
-        { title: '分配数量', dataIndex: 'iquantityOut', width: 80, className: 'replacecolor' },
-        { title: '委外供应商', dataIndex: 'omcVenAbbName', width: 100, className: 'replacecolor',scopedSlots: { customRender: 'omcVenAbbName' }, },
+        { title: '采购供应商', dataIndex: 'cvenAbbName', width: '10%', className: 'replacecolor' },
+        { title: '分配数量', dataIndex: 'iquantityOut', width: '10%', className: 'replacecolor' },
+        { title: '委外供应商', dataIndex: 'omcVenAbbName', width: '10%', className: 'replacecolor',scopedSlots: { customRender: 'omcVenAbbName' }, },
         {
           title: '余纱',
           dataIndex: 'iquantityLeft',
-          width: 80,
+          width:'10%',
           className: 'replacecolor',
           customCell: this.surplusYarnCustomCell,
           scopedSlots: { customRender: 'surplusYarn' }
@@ -533,17 +538,17 @@ export default {
 
       // 委外订单国内 表头
       outsourceOrderColumns: [
-        { title: '制造工艺', width: 100, dataIndex: 'cvcname', className: 'replacecolor' },
+        { title: '制造工艺', width: '10%', dataIndex: 'cvcname', className: 'replacecolor' },
         { title: '工厂', width: 80, dataIndex: 'cvenAbbName', className: 'replacecolor' },
         {
           title: '材料出库数量',
           dataIndex: 'iquantityOut',
-          width: 100,
+          width: '10%',
           className: 'replacecolor',
           customCell: this.materialsOutQuantityCustomCell,
           scopedSlots: { customRender: 'materialsOutQuantity' }
         },
-        { title: '计划数量', dataIndex: 'iquantity', width: 100, className: 'replacecolor' },
+        { title: '计划数量', dataIndex: 'iquantity', width: '10%', className: 'replacecolor' },
 
         {
           title: '单位',
@@ -551,13 +556,13 @@ export default {
             {
               title: '根',
               dataIndex: 'iquantityPCS',
-              width: 100,
+              width: '5%',
               className: 'replacecolor'
             },
             {
               title: '米',
               dataIndex: 'iquantityM',
-              width: 100,
+              width: '5%',
               className: 'replacecolor'
             }
           ]
@@ -566,24 +571,24 @@ export default {
         {
           title: '采购入库数量',
           dataIndex: 'iquantityIn',
-          width: 100,
+          width: '10%',
           className: 'replacecolor',
           customCell: this.purchaseInQuantityCustomCell,
           scopedSlots: { customRender: 'purchaseInQuantity' }
         },
-        { title: '染厂色号', dataIndex: 'ccolorNumber', width: 120, className: 'replacecolor' },
-        { title: '物料编码', dataIndex: 'cinvCode', width: 120, className: 'replacecolor noprint' },
-        { title: '货物名称', dataIndex: 'cinvName', width: 200, className: 'replacecolor', align:'left' },
-        { title: '颜色', dataIndex: 'ccolor', width: 110, className: 'replacecolor' },
-        { title: '损耗', dataIndex: 'cquantityLoss',  width: 100,className: 'replacecolor' },
-        { title: '多发少发', dataIndex: 'iquantityMoreLess', width: 100, className: 'replacecolor', scopedSlots: { customRender: 'iquantityMoreLess' }, customCell: this.iquantityMoreLessCell, },
-        { title: '附件', dataIndex: 'enclosure', width: 100, className: 'noprint', scopedSlots: { customRender: 'enclosure' }}
+        { title: '染厂色号', dataIndex: 'ccolorNumber', width:'10%', className: 'replacecolor' },
+        { title: '物料编码', dataIndex: 'cinvCode', width: '10%', className: 'replacecolor noprint' },
+        { title: '货物名称', dataIndex: 'cinvName', width: '15%', className: 'replacecolor specleWidth', align:'left' },
+        { title: '颜色', dataIndex: 'ccolor', width: '10%', className: 'replacecolor' },
+        { title: '损耗', dataIndex: 'cquantityLoss',  width: '10%',className: 'replacecolor' },
+        { title: '多发少发', dataIndex: 'iquantityMoreLess', width: '10%', className: 'replacecolor', scopedSlots: { customRender: 'iquantityMoreLess' }, customCell: this.iquantityMoreLessCell, },
+        { title: '附件', dataIndex: 'enclosure', width: '10%', className: 'noprint', scopedSlots: { customRender: 'enclosure' }}
       ],
 
       // 成本发票 表头
       costInvoiceColumns: [
         { title: '类型', width: 120, dataIndex: 'cvcname', className: 'replacecolor' },
-        { title: '采购类型', width: 120, dataIndex: 'cbusType', className: 'replacecolor' },
+        { title: '采购类型', width: 120, dataIndex: 'cbusType', className: 'replacecolor' , scopedSlots: { customRender: 'cbusType' }},
         { title: '工厂', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor', scopedSlots: { customRender: 'cvenAbbName' } },
         { title: '成本金额', dataIndex: 'imoney', width: 120, className: 'replacecolor',scopedSlots: { customRender: 'imoney' } }
       ],
@@ -660,47 +665,47 @@ export default {
 
       costInvoiceIngredientColumns:[],
       costInvoiceIngredientColumnsM1:[
-        { title: '序号', width: 80, dataIndex: 'index', className: 'replacecolor' },
-        { title: '账套号', width: 80, dataIndex: 'caccount', className: 'replacecolor' },
-        { title: '订单号', width: 140, dataIndex: 'cpoid', className: 'replacecolor' },
-        { title: '供应商', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
-        { title: ' 类型', width: 330, dataIndex: 'cinvName', className: 'replacecolor',align:"left" },
+        { title: '序号', width: '10%', dataIndex: 'index', className: 'replacecolor' },
+        { title: '账套号', width: '10%', dataIndex: 'caccount', className: 'replacecolor' },
+        { title: '订单号', width: '10%', dataIndex: 'cpoid', className: 'replacecolor' },
+        { title: '供应商', width: '10%', dataIndex: 'cvenAbbName', className: 'replacecolor' },
+        { title: ' 类型', width: '10%', dataIndex: 'cinvName', className: 'replacecolor',align:"left" },
         {
           title: '发票数量',
-          width: 120,
+          width: '10%',
           dataIndex: 'iquantityInvoice',
           className: 'replacecolor',
           customCell: this.ingredientsInvoiceQuantityCustomCell,
           scopedSlots: { customRender: 'ingredientsInvoiceQuantity' }
         },
-        { title: '开票金额(人民币)', width: 120, dataIndex: 'isum', className: 'replacecolor' },
-        { title: '单位', width: 120, dataIndex: 'ccomUnitName', className: 'replacecolor' },
-        { title: '订单数', width: 120, dataIndex: 'iquantity', className: 'replacecolor' },
-        { title: '采购入库数', width: 120, dataIndex: 'iquantityIn', className: 'replacecolor' }
+        { title: '开票金额(人民币)', width: '10%', dataIndex: 'isum', 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: 80, dataIndex: 'caccount', className: 'replacecolor' },
-        { title: '订单号', width: 140, dataIndex: 'cpoid', className: 'replacecolor' },
-        { title: '供应商', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
-        { title: ' 类型', width: 330, dataIndex: 'cinvName', className: 'replacecolor',align:"left" },
+        { title: '账套号', width: '10%', dataIndex: 'caccount', className: 'replacecolor' },
+        { title: '订单号', width: '10%', dataIndex: 'cpoid', className: 'replacecolor' },
+        { title: '供应商', width: '10%', dataIndex: 'cvenAbbName', className: 'replacecolor' },
+        { title: ' 类型', width: '10%', dataIndex: 'cinvName', className: 'replacecolor',align:"left" },
         {
           title: '发票数量',
-          width: 120,
+          width: '10%',
           dataIndex: 'iquantityInvoice',
           className: 'replacecolor',
           customCell: this.ingredientsInvoiceQuantityCustomCell,
           scopedSlots: { customRender: 'ingredientsInvoiceQuantity' }
         },
-        { title: '开票金额(人民币)', width: 120, dataIndex: 'isum', className: 'replacecolor' },
-        { title: '开票金额(美元)', width: 120, dataIndex: 'ioriSum', className: 'replacecolor',customRender: (text, record, index) => {
+        { 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: 120, dataIndex: 'ccomUnitName', className: 'replacecolor' },
-        { title: '订单数', width: 120, dataIndex: 'iquantity', className: 'replacecolor' },
-        { title: '采购入库数', width: 120, dataIndex: 'iquantityIn', 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' },
@@ -754,32 +759,13 @@ export default {
 
   methods: {
     daYin(){
-      //  printJS({
-	    //      printable:this.fabricLoss.fabricOMOrderList1,
-	    //      properties:[
-      //        {field:'cvcname',displayName:'制造工艺',columnSize:1},
-      //        {field:'cvenAbbName',displayName:'工厂',columnSize:1},
-      //        {field:'iquantityOut',displayName:'材料出库数量',columnSize:1},
-      //        {field:'iquantity', displayName:'计划数量',columnSize:1},
-      //        {field:'iquantityIn', displayName:'采购入库数量',columnSize:1},
-      //        {field:'cinvCode', displayName:'物料编码',columnSize:1},
-      //        {field:'cinvName', displayName:'货物名称',columnSize:1},
-      //        {field:'ccolor', displayName:'颜色',columnSize:1},
-      //        {field:'cquantityLoss', displayName:'损耗',columnSize:1},
-      //        {field:'iquantityMoreLess', displayName:'多发少发',columnSize:1},
-      //        ],
-	    //      type:'json',
-	    //      header:'C001',
-	         //样式设置
-	        //  gridStyle:'border:2px solid #3971A5;text-align: center',
-	        //  gridHeaderStyle:'color:red; border:2px solid #3971A5;'
-	    //  })
          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:10% !important}'
          +'.ant-table-body{overflow-x: hidden !important }' //去除滚动条
          +'.kk{display:flex;flex-wrap: wrap}' //主要信息并排
          +'.ant-col-sm-8{width:40%;margin-bottom: 6px;}'
@@ -798,7 +784,7 @@ export default {
          win.document.write(style+html);
          win.focus();
          win.print();
-        //  win.close();
+         win.close();
 		     this.showSelect = 0
         })