Просмотр исходного кода

成本分配表-页面字段调整

jbb 2 лет назад
Родитель
Сommit
ae8022befe

+ 16 - 6
src/views/reportForms/cost-allocation-table.vue

@@ -316,8 +316,10 @@ export default {
         { title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
         { title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
         { title: '费用项目', dataIndex: 'expenseItem', width: 120, className: 'replacecolor' },
-        { title: ' 支出本币金额', dataIndex: 'disbursedLocalmoney', width: 120, className: 'replacecolor' },
-        { title: '支出原币金额', dataIndex: 'disbursedOriginalmoney', width: 120, className: 'replacecolor' },
+        { title: '人民币(不含税)', dataIndex: 'disbursedLocalmoney', width: 120, className: 'replacecolor' },
+        { title: '美元', dataIndex: 'disbursedOriginalmoney', width: 120, className: 'replacecolor' },
+        { title: '人民币(税额)', dataIndex: 'shuiemoney', width: 120, className: 'replacecolor' },
+        { title: '人民币(加税合计)', dataIndex: 'totalTaxIncrease', width: 120, className: 'replacecolor' },
         { title: '发票号', dataIndex: 'invoicenum', width: 120, className: 'replacecolor' },
         { title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
       ],
@@ -467,7 +469,8 @@ export default {
           processCost:processCostAll.toFixed(3)
         }
         //发运明细-合计行
-        if(this.$refs.unitTabs.shipData.length!==0){this.$refs.unitTabs.shipData.push(allObj)}
+        if(this.$refs.unitTabs.shipData[this.$refs.unitTabs.shipData.length-1].goodsName=='合计'){this.$refs.unitTabs.shipData.pop()}
+        if(this.$refs.unitTabs.shipData.length!==0 ){this.$refs.unitTabs.shipData.push(allObj)}
         this.$refs.unitTabs.shipData.map(item=>{
           item.shipQuantity = Number(item.shipQuantity).toFixed(0)
           item.exportUnitPrice = Number(item.exportUnitPrice).toFixed(4)
@@ -515,21 +518,27 @@ export default {
           priceExcludingtax:priceExcludingtaxAll.toFixed(3),
           dosage:dosageAll.toFixed(3)
         }
-        if(this.$refs.unitTabs.ingData.length!==0){  this.$refs.unitTabs.ingData.push(allObj)}
+     if(this.$refs.unitTabs.ingData[this.$refs.unitTabs.ingData.length-1].goodsName=='合计'){this.$refs.unitTabs.ingData.pop()}
+        if(this.$refs.unitTabs.ingData.length!==0 ){  this.$refs.unitTabs.ingData.push(allObj)}
     },
     //费用支出合计行
     addAmountCostPay(val){
       var disbursedLocalmoneyALL=0,
-      disbursedOriginalmoneyALL=0
+      disbursedOriginalmoneyALL=0,
+      shuiemoneyAll = 0
      val.map(item=>{
       disbursedLocalmoneyALL+=Number(item.disbursedLocalmoney) 
       disbursedOriginalmoneyALL+=Number(item.disbursedOriginalmoney) 
+      shuiemoneyAll+=Number(item.shuiemoney) 
      })
      var obj={
       setNo:'合计',
       disbursedLocalmoney:disbursedLocalmoneyALL.toFixed(3),
-      disbursedOriginalmoney:disbursedOriginalmoneyALL.toFixed(3)
+      disbursedOriginalmoney:disbursedOriginalmoneyALL.toFixed(3),
+      shuiemoney:shuiemoneyAll.toFixed(3),
+      totalTaxIncrease:(disbursedLocalmoneyALL+shuiemoneyAll).toFixed(3)
      }
+     if(this.costPayData[this.costPayData.lengthh-1].setNo=='合计'){this.costPayData.pop()}
      if(this.costPayData.length!==0){ this.costPayData.push(obj)}
     },
     daYin(){
@@ -622,6 +631,7 @@ export default {
         // console.log(halfInfo.planNum, halfInfo.remarks, halfInfo.billstatus)
         // var planNum = this.detailsPlanNum.planNum,
          var json = this.detailsPlanNum
+         json.outdata=moment(json.outdata).format('YYYY-MM-DD hh:mm:ss')
         addHalfInfo(json).then(res => {
           if (res.success) {
             console.log('保存的部分信息', halfInfo)

+ 50 - 20
src/views/reportForms/cost-allocation-table/tabs.vue

@@ -32,6 +32,11 @@
             <span slot="fabRemaQuaSlot" slot-scope="text">
               <a>{{ text }}</a>
             </span>
+            <!-- 备注 -->
+            <span slot="remarks" slot-scope="text,record">
+              <a-input placeholder="请输入" v-model="record.remarks" v-show='showSelect==0'/>
+              <span v-show='showSelect==1'>{{ text }}</span>
+            </span>
           </a-table>
         </div>
 
@@ -39,7 +44,7 @@
         <div style="margin:30px 0" :class="[(ingData.length==0?'noprint': '')]">
           <h6 class="table-title">辅料</h6>
           <a-table
-            rowKey="(item)=>item.id"
+            rowKey="(item)=>item.goodsName"
             :loading="loading"
             :columns="ingColumns"
             :data-source="ingData"
@@ -59,6 +64,11 @@
             <span slot="ingRemQuaSlot" slot-scope="text">
               <a>{{ text }}</a>
             </span>
+            <!-- 备注 -->
+            <span slot="remarks" slot-scope="text,record">
+              <a-input placeholder="请输入" v-model="record.remarks" v-show='showSelect==0'/>
+              <span v-show='showSelect==1'>{{ text }}</span>
+            </span>
           </a-table>
         </div>
 
@@ -206,7 +216,7 @@ export default {
         {
           title: '转入数量',
           dataIndex: 'fabrictransferQuantity',
-          width: '10%',
+          width: '8%',
           className: 'replacecolor',
           customCell: this.fabQuaCustomCell,
           scopedSlots: { customRender: 'fabInQuaSlot' },
@@ -214,18 +224,18 @@ export default {
         {
           title: '转入成本',
           dataIndex: 'transferCost',
-          width: '10%',
+          width: '8%',
           className: 'replacecolor',
           // slots:{title:'transferCostTitle'} ,
         },
 
-        { title: '单耗/件', dataIndex: 'unitConsumption', width: '10%', className: 'replacecolor' },
-        { title: '使用数量', dataIndex: 'usageQuantity', width: '10%', className: 'replacecolor' },
-        { title: '计划数量', dataIndex: 'planQuantity', width: '10%', className: 'replacecolor' },
+        { title: '单耗/件', dataIndex: 'unitConsumption', width: '9%', className: 'replacecolor' },
+        { title: '使用数量', dataIndex: 'usageQuantity', width: '9%', className: 'replacecolor' },
+        { title: '计划数量', dataIndex: 'planQuantity', width: '9%', className: 'replacecolor' },
         {
           title: '购入数量',
           dataIndex: 'purchaseQuantity',
-          width: '10%',
+          width: '9%',
           className: 'replacecolor'
         },
         {
@@ -239,16 +249,23 @@ export default {
         {
           title: '损耗',
           dataIndex: 'loss',
-          width: '10%',
+          width: '9%',
           className: 'replacecolor'
         },
         {
           title: '余下数量的成本',
           dataIndex: 'remainingQuantitycost',
-          width: '10%',
+          width: '9%',
           className: 'replacecolor',
           // slots:{title:'remainingQuantitycostTitle'} ,
 
+        },
+        {
+          title: '备注',
+          dataIndex: 'remarks',
+          scopedSlots: { customRender: 'remarks' },
+          width: '8%',
+          className: 'replacecolor'
         }
       ],
       fabData: [],
@@ -260,7 +277,7 @@ export default {
           width: '6%',
           dataIndex: 'index',
           key: 'index',
-          fixed: 'left',
+          // fixed: 'left',
           customRender: (text, record, index) =>{
             if(record.goodsName!=='合计'){
               return index + 1
@@ -270,11 +287,11 @@ export default {
           },
           className: 'replacecolor'
         },
-        { title: '货物名称', width: '12%', dataIndex: 'goodsName', fixed: 'left', className: 'replacecolor' },
+        { title: '货物名称', width: '12%', dataIndex: 'goodsName', className: 'replacecolor' },
         {
           title: '转入数量',
           dataIndex: 'ingredientsTransferQuantity',
-          width: '10%',
+          width: '6%',
           className: 'replacecolor',
           customCell: this.ingInQuaCustomCell,
           scopedSlots: { customRender: 'ingInQuaSlot' }
@@ -282,7 +299,7 @@ export default {
         {
           title: '转入成本',
           dataIndex: 'transferCost',
-          width: '10%',
+          width: '6%',
           className: 'replacecolor',
           // slots:{title:'transferCostTitle'} ,
         },
@@ -291,13 +308,13 @@ export default {
         {
           title: '购入数量',
           dataIndex: 'purchaseQuantity',
-          width: '10%',
+          width: '8%',
           className: 'replacecolor'
         },
         {
           title: '余下数量',
           dataIndex: 'ingredientsRemainingQuantity',
-          width: '9%',
+          width: '6%',
           className: 'replacecolor',
           customCell: this.ingRemQuaCustomCell,
           scopedSlots: { customRender: 'ingRemQuaSlot' }
@@ -305,19 +322,19 @@ export default {
         {
           title: '损耗',
           dataIndex: 'loss',
-          width: '8%',
+          width: '6%',
           className: 'replacecolor'
         },
         {
           title: '人民币金额',
           dataIndex: 'rmbAmount',
-          width: '8%',
+          width: '6%',
           className: 'replacecolor'
         },
         {
           title: '美元金额',
           dataIndex: 'usdAmount',
-          width: '8%',
+          width: '6%',
           className: 'replacecolor',
           customRender: (text, record, index) => {
             if (record.rmbAmount == record.usdAmount)
@@ -329,7 +346,7 @@ export default {
         {
           title: '不含税金额',
           dataIndex: 'priceExcludingtax',
-          width: '8%',
+          width: '6%',
           className: 'replacecolor'
         },
         // {
@@ -347,6 +364,19 @@ export default {
         {
           title: '用量',
           dataIndex: 'dosage',
+          width: '6%',
+          className: 'replacecolor'
+        },
+        {
+          title: '供应商',
+          dataIndex: 'supper',
+          width: '8%',
+          className: 'replacecolor'
+        },
+        {
+          title: '备注',
+          dataIndex: 'remarks',
+          scopedSlots: { customRender: 'remarks' },
           width: '8%',
           className: 'replacecolor'
         }
@@ -506,7 +536,7 @@ export default {
     },
 
     // 辅料-转入数量 弹框
-    ingInQuaCustomCell(record) {
+    ingInQuaCustomCell(record) {console.log('辅料 - 转入数量')
       return {
         on: {
           click: event => {