whj 1 年之前
父节点
当前提交
55406c314b

+ 5 - 2
src/views/purchase/purchase-marge-page/PurchaseMargePage.vue

@@ -85,7 +85,8 @@
         </template>
       </s-table>
     </div>
-    <MargeModal ref="margeModal" @ok="handleOk"/>
+    <MergeModal ref="mergeModal" @ok="handleOk"/>
+    <Detail ref="detail" @ok="handleOk"/>
   </a-card>
 </template>
 
@@ -93,12 +94,14 @@
 import { STable, Ellipsis } from '@/components'
 import { getMergePage, syncMerge, pushPurchaseMerge, getMergeInfo, deleteMerge } from '@/api/purchase/purchase-order'
 import MergeModal from '@/views/purchase/purchase-order-page/modules/MergeModal.vue'
+import Detail from './modules/Detail.vue'
 
 export default {
   name: 'PurchaseOrderPage',
   components: {
     STable,
     Ellipsis,
+    Detail,
     MergeModal
   },
   data () {
@@ -258,7 +261,7 @@ export default {
     },
     handleEdit (record) {
       getMergeInfo(record).then(res => {
-        this.$refs.baseForm.base(res.data)
+        this.$refs.mergeModal.base(res.data)
       })
     },
     handleView (record) {

+ 186 - 0
src/views/purchase/purchase-marge-page/modules/Detail.vue

@@ -0,0 +1,186 @@
+<template>
+  <a-modal
+    :title="modalTitle"
+    :width="1400"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    class="ant-modal2"
+    @cancel="handleCancel"
+  >
+    <detail-list title="" :col="2">
+      <detail-list-item term="合并采购单名称">{{ model.title }}</detail-list-item>
+      <detail-list-item term="工单状态">{{ BaseTool.Object.getField(statusMap,model.status) }}</detail-list-item>
+    </detail-list>
+
+    <title-divider title="合并采购单" width="120px"></title-divider>
+    <a-table
+      bordered
+      :data-source="model.detailVOS"
+      :columns="columns"
+      tableLayout="auto"
+      :scroll="{ x: 1500 }"
+      rowKey="id"
+    >
+    </a-table>
+    <template slot="footer">
+      <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script>
+import DetailList from '@/components/tools/DetailList'
+const DetailListItem = DetailList.Item
+export default {
+  name: 'PurchasePaymentDetail',
+  components: {
+    DetailList,
+    DetailListItem
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      visible: false,
+      // 下拉框map
+      typeMap: {},
+      flagMap: {},
+      invoiceUrls: [],
+      moneyTypeMap: {},
+      statusMap: {},
+      cptcodeMap: {},
+      deptMap: {},
+      deptNewMap: {},
+      soMap: {},
+      model: {
+      },
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          checked: true,
+          width: 70,
+          customRender: (text, record, index) => {
+            return index + 1
+          }
+        },
+        {
+          title: '计划类型',
+          dataIndex: 'type',
+          checked: true,
+          width: 100,
+          customRender: (text, record, index) => {
+            return this.BaseTool.Table.getMapText(this.typeMap, text)
+          }
+        },
+        {
+          title: '采购类型',
+          dataIndex: 'cptcode',
+          checked: true,
+          width: 130,
+          customRender: (text, record, index) => {
+            return this.BaseTool.Table.getMapText(this.cptcodeMap, text)
+          }
+        },
+        {
+          title: '业务类型',
+          dataIndex: 'cbustype',
+          checked: true,
+          width: 150,
+          customRender: (text, record, index) => {
+            return this.BaseTool.Table.getMapText(this.cbustypeMap, text)
+          }
+        },
+        {
+          title: '关联设备',
+          dataIndex: 'positionNo',
+          checked: true,
+          width: 150
+        },
+        {
+          title: '采购数量',
+          dataIndex: 'totalNum',
+          checked: true,
+          width: 150
+        },
+        {
+          title: '请购人员',
+          dataIndex: 'createdUserName',
+          checked: true,
+          width: 150
+        },
+        {
+          title: '用友单号',
+          checked: true,
+          width: 100,
+          dataIndex: 'yongYouId'
+        },
+        {
+          title: '需求日期',
+          dataIndex: 'needDate',
+          checked: true,
+          width: 150
+        },
+        {
+          title: '计划到货日期',
+          dataIndex: 'planGetDate',
+          checked: true,
+          width: 150
+        },
+        {
+          title: '申请时间',
+          dataIndex: 'updateTime',
+          checked: true,
+          width: 150
+        },
+        {
+          title: '请购原因',
+          checked: true,
+          width: 100,
+          dataIndex: 'cmemo'
+        },
+        {
+          title: '错误消息',
+          checked: true,
+          width: 100,
+          dataIndex: 'errorMessage'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          width: '200px',
+          fixed: 'right',
+          checked: true,
+          align: 'center',
+          scopedSlots: { customRender: 'action' }
+        }
+      ]
+    }
+  },
+  created () {
+    // 下拉框map
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.LONG_YAN_PURCHASE_DETAIL_STATUS)
+    console.log(this.statusMap)
+    this.flagMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PROJECT_NEW_AND_OLD)
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.LONG_YAN_PURCHASE_TYPE)
+    this.cptcodeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.LONG_YAN_PURCHASE_ORDER_PLAN_TYPE)
+    this.deptMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YONG_YOU_DEPT)
+    this.deptNewMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YONG_YOU_DEPT_NEW)
+    this.cbustypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.LONG_YAN_PURCHASE_BUSINESS_TYPE)
+    this.soMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SO_TYPE)
+  },
+  methods: {
+    base (record) {
+      this.visible = true
+      this.modalTitle = '详情'
+      this.model = record
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+    }
+
+  }
+}
+</script>

+ 2 - 1
src/views/purchase/purchase-order-page/modules/MergeModal.vue

@@ -187,7 +187,8 @@ export default {
       const { form: { setFieldsValue } } = this
       this.$nextTick(() => {
         setFieldsValue(Object.assign(pick(record, [
-          'id'
+          'id',
+          'title'
         ])))
       })
     },