Ver código fonte

成本金额弹窗

jbb 2 anos atrás
pai
commit
52167a29fd

+ 23 - 2
src/views/reportForms/fabric-loss-table.vue

@@ -225,6 +225,11 @@
           :pagination="false"
         >
         
+        <!-- 成本金额 -->
+           <span slot="imoney" slot-scope="text,record">
+              <a v-if="(record.cbusType == '转出成本')|| (record.cbusType == '转入成本')" @click="imoneyCell(record)">{{text}}</a>
+              <span v-else >{{text}}</span>
+          </span>
         <!-- 工厂 -->
         <span slot="cvenAbbName" slot-scope="text,record">
               <a-input placeholder="请输入工厂" v-model="record.cvenAbbName" v-if="record.cbusType == '转出成本'"/>
@@ -403,6 +408,7 @@
 
         <!-- 附件 -->
         <attachment-display ref="attachmentDisplay"></attachment-display>
+        <imoney-cell ref="imoneyCell"></imoney-cell>
       </div>
     </a-card>
   </div>
@@ -418,6 +424,7 @@ import invoiceQuantityModal from '@views/reportForms/fabric-loss-table/invoiceQu
 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'
@@ -443,7 +450,8 @@ export default {
     purchaseLeftModal,
     JEllipsis,
     moment,
-    AttachmentDisplay
+    AttachmentDisplay,
+    imoneyCell
   },
   data() {
     return {
@@ -577,7 +585,7 @@ export default {
         { title: '类型', width: 120, dataIndex: 'cvcname', className: 'replacecolor' },
         { title: '采购类型', width: 120, dataIndex: 'cbusType', className: 'replacecolor' },
         { title: '工厂', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor', scopedSlots: { customRender: 'cvenAbbName' } },
-        { title: '成本金额', dataIndex: 'imoney', width: 120, className: 'replacecolor' }
+        { title: '成本金额', dataIndex: 'imoney', width: 120, className: 'replacecolor',scopedSlots: { customRender: 'imoney' } }
       ],
       costInvoiceData: [
         { costInvoiceType: '纱款', factory: '17TW-C-17B', costAmount: '5081.72' },
@@ -720,6 +728,14 @@ export default {
           className: 'replacecolor',
           // customCell: this.accidentListCustomCell,
           scopedSlots: { customRender: 'cpbvcode' }
+        },
+         {
+          title: '事故单号',
+          width: 120,
+          dataIndex: 'cpbvmemo',
+          className: 'replacecolor',
+          // customCell: this.accidentListCustomCell,
+          // scopedSlots: { customRender: 'cpbvcode' }
         },
         { title: '事故承担方', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
         { title: '金额', dataIndex: 'ioriSum', width: 120, className: 'replacecolor' }
@@ -995,6 +1011,11 @@ export default {
         }
       }
     },
+    //成本金额弹窗
+    imoneyCell(record){
+            this.$refs.imoneyCell.imoneyModVis = true
+            this.$refs.imoneyCell.imoneyData = record.costInvoiceDetailList
+    },
 
     // 【材料出库数量】 弹框
     materialsOutQuantityCustomCell(record) {

+ 131 - 0
src/views/reportForms/fabric-loss-table/imoneyCell.vue

@@ -0,0 +1,131 @@
+<template>
+  <a-modal
+    title="成本金额"
+    v-model="imoneyModVis"
+    width="86%"
+    :footer="null"
+     @cancel="close"
+  >
+    <!-- tabel 加载 -->
+    <!-- <a-spin> -->
+      <!-- table -->
+      <div>
+        <a-table
+          ref="tableRef"
+          bordered
+          :columns="surplusYarnColumns"
+          :data-source="imoneyData"
+          :pagination="false"
+          :scroll="{ y: 500,x:1500 }"
+        >
+        </a-table>
+        <!-- 导出 打印 返回  -->
+        <a-row style="marginTop:20px;">
+          <a-col :md="24" :sm="12">
+            <span style="float: right;" class="table-operator">
+              <a-button type="primary" @click="close" icon="rollback">关闭</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </div>
+    <!-- </a-spin> -->
+  </a-modal>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import JsonExcel from 'vue-json-excel'
+export default {
+  name: 'IquantityMoreLessModal', // 余纱 弹框
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, JsonExcel },
+  data() {
+    return {
+      exportTitle:"余纱",
+      // 表头
+      surplusYarnColumns: [
+        {
+          title: '来源订单号',
+          width: 100,
+          dataIndex: 'ccode',
+          className: 'replacecolor'
+        },
+         {
+          title: '物料编号',
+          width: 100,
+          dataIndex: 'cinvCode',
+          className: 'replacecolor'
+        },
+         {
+          title: '物料名称',
+          width: 100,
+          dataIndex: 'cinvName',
+          className: 'replacecolor'
+        },
+         {
+          title: '批号',
+          width: 80,
+          dataIndex: 'cbatch',
+          className: 'replacecolor'
+        },
+         {
+          title: '单价',
+          width: 80,
+          dataIndex: 'iprice',
+          className: 'replacecolor'
+        },
+         {
+          title: '数量',
+          width: 80,
+          dataIndex: 'iquantity',
+          className: 'replacecolor'
+        },
+         {
+          title: '金额',
+          width: 80,
+          dataIndex: 'imoney',
+          className: 'replacecolor'
+        },
+      ],
+      imoneyData:[],
+      imoneyModVis:false
+    }
+  },
+  // 接收父组件 方法
+  props: {
+    
+  },
+  computed: {
+    
+  },
+  created() {},
+  watch:{
+    
+  },
+  methods: {
+    close(){
+        this.imoneyModVis = false
+    }
+  }
+}
+</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/ .ant-table-footer .ant-table-body {
+    overflow: hidden !important;
+  }
+// /deep/ th.replacecolor {
+//   background-color: #ccc;
+// }
+</style>