Selaa lähdekoodia

采购合同管理

chris 3 vuotta sitten
vanhempi
commit
6128cafbf5

+ 17 - 0
src/api/sale.js

@@ -52,6 +52,14 @@ export function getDispatchList (params) {
   })
 }
 
+// 发货详情
+export function getDeliverDetail (id) {
+  return request({
+    url: request.adornUrl(`/biz-service/deliver/info/${id}`),
+    method: 'get'
+  })
+}
+
 // 订单发货
 export function deliverOrder (data) {
   return request({
@@ -69,3 +77,12 @@ export function arrivedOrder (data) {
     data
   })
 }
+
+// 获取采购合同列表
+export function getContractList (params) {
+  return request({
+    url: request.adornUrl(`/biz-service/purPurchaseContract/list`),
+    method: 'get',
+    params: params
+  })
+}

+ 42 - 5
src/views/modules/order/dispatch-detail.vue

@@ -1,13 +1,50 @@
 <template>
-
+  <div>
+    <div class="my-title">查看</div>
+    <div style="margin-left: 20px;margin-right: 20px">
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="onChose">返回</el-button>
+    </span>
+  </div>
 </template>
 
 <script>
-export default {
-  name: 'dispatch-detail'
-}
+  import { getDeliverDetail } from '@/api/sale'
+  export default {
+    name: 'dispatch-detail',
+    data () {
+      return {
+        dataForm: {},
+        id: 0
+      }
+    },
+    methods: {
+      onChose () {
+        this.$emit('onChose')
+      },
+      async init (id) {
+        this.id = id || 0
+        this.dataForm = {}
+        this.getDetails()
+      },
+      getDetails () {
+        getDeliverDetail(this.id).then(({data}) => {
+          if (data && data.code === '200') {
+            this.dataForm = data.data
+          }
+        })
+      }
+    }
+  }
 </script>
 
 <style scoped>
-
+  .my-line{
+    border-bottom: 1px solid #c0c4cc;
+    margin-bottom: 10px;
+  }
+  .title{
+    padding: 10px 0 ;
+  }
 </style>

+ 16 - 4
src/views/modules/order/dispatch.vue

@@ -1,7 +1,7 @@
 <!-- 发货管理 -->
 <template>
   <div class="order">
-    <template v-if="!noticeChangeVisible && !attachVisible && !arrivedVisible">
+    <template v-if="!noticeChangeVisible && !attachVisible && !arrivedVisible && !detailVisible">
       <el-form :inline="true" :model="dataForm" @keyup.enter.native="queryData()">
         <el-form-item label="名称" prop="productName">
           <el-input v-model="dataForm.productName" placeholder="名称" clearable></el-input>
@@ -119,7 +119,7 @@
           label="操作">
           <template slot-scope="scope">
             <el-button v-if="isAuth('order:deliver:info')" type="text" size="small" @click="detailHandle(scope.row.deliverId)">查看</el-button>
-            <el-button v-if="isAuth('order:deliver:send') && Number(scope.row.state) < 3" type="text" size="small" @click="sendHandle(scope.row.deliverId)">发货</el-button>
+            <el-button v-if="isAuth('order:deliver:send') && Number(scope.row.state) === 2" type="text" size="small" @click="sendHandle(scope.row.deliverId)">发货</el-button>
             <el-button v-if="isAuth('order:deliver:arrive') && Number(scope.row.state) === 3" type="text" size="small" @click="arriveHandle(scope.row.deliverId)">送达</el-button>
           </template>
         </el-table-column>
@@ -142,7 +142,8 @@
     <notice-change-setting v-if="noticeChangeVisible" ref="noticeChangeSetting" @onChose="onChose"/>
     <!--送达弹窗 -->
     <dispatch-arrived v-if="arrivedVisible" ref="arrivedPage" @onChose="onChose" @refreshDataList="getDataList"/>
-
+    <!-- 发货详情 -->
+    <dispatch-detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
   </div>
 </template>
 
@@ -152,6 +153,7 @@ import PreviewComponent from '../common/preview-component'
 import AttachDetail from '../common/attach-detail'
 import NoticeChangeSetting from './dispatch-notice-change-setting'
 import DispatchArrived from './dispatch-arrived'
+import DispatchDetail from './dispatch-detail'
 export default {
     // 发货管理
   name: 'dispatch',
@@ -159,7 +161,8 @@ export default {
     AttachDetail,
     PreviewComponent,
     NoticeChangeSetting,
-    DispatchArrived
+    DispatchArrived,
+    DispatchDetail
   },
   created () {
     this.queryData()
@@ -176,6 +179,7 @@ export default {
       attachVisible: false,
       noticeChangeVisible: false,
       arrivedVisible: false,
+      detailVisible: false,
       optionsState: [
         {
           code: null, value: '全部'
@@ -203,6 +207,7 @@ export default {
       this.attachVisible = false
       this.noticeChangeVisible = false
       this.arrivedVisible = false
+      this.detailVisible = false
     },
       // 查询
     queryData () {
@@ -245,6 +250,13 @@ export default {
     selectionChangeHandle (val) {
       this.dataListSelections = val
     },
+    // 详情
+    detailHandle (id) {
+      this.detailVisible = true
+      this.$nextTick(() => {
+        this.$refs.detail.init(id)
+      })
+    },
     // 发货通知人设置
     setNoticeChangeHandel () {
       this.noticeChangeVisible = true

+ 24 - 33
src/views/modules/sale/contract.vue

@@ -19,7 +19,8 @@
         <el-form-item>
           <el-button @click="search()">查询</el-button>
           <el-button v-if="isAuth('pur:purchaseContract:save')" type="primary" @click="addOrUpdateHandle(0)">录入</el-button>
-          <el-button v-if="isAuth('cus:contractBook:noteChangeConfig')" type="primary" @click="setNoticeChangeHandel()">变更通知人设置</el-button>
+          <el-button type="primary" @click="exportHandle()">导出</el-button>
+          <el-button type="primary" @click="setNoticeChangeHandle()">合同更改通知人设置</el-button>
         </el-form-item>
       </el-form>
       <el-table
@@ -42,12 +43,12 @@
           label="合同编码">
         </el-table-column>
         <el-table-column
-          prop="customerName"
+          prop="supplierName"
           header-align="center"
           align="center"
           min-width="140"
           :show-tooltip-when-overflow="true"
-          label="客户名称">
+          label="供应商名称">
         </el-table-column>
         <el-table-column
           prop="contractNumber"
@@ -57,14 +58,6 @@
           :show-tooltip-when-overflow="true"
           label="合同号">
         </el-table-column>
-        <el-table-column
-          prop="reCode"
-          header-align="center"
-          align="center"
-          min-width="120"
-          :show-tooltip-when-overflow="true"
-          label="合同评审表编码">
-        </el-table-column>
         <el-table-column
           prop="deliveryTime"
           header-align="center"
@@ -73,14 +66,6 @@
           :show-overflow-tooltip="true"
           label="合同交期">
         </el-table-column>
-        <el-table-column
-          prop="actualDeliveryTime"
-          header-align="center"
-          align="center"
-          min-width="140"
-          :show-overflow-tooltip="true"
-          label="实际交期">
-        </el-table-column>
         <el-table-column
           prop="totalAmount"
           header-align="center"
@@ -102,6 +87,22 @@
           :show-tooltip-when-overflow="true"
           label="更改内容简述">
         </el-table-column>
+<!--        <el-table-column-->
+<!--          prop="reCode"-->
+<!--          header-align="center"-->
+<!--          align="center"-->
+<!--          min-width="120"-->
+<!--          :show-tooltip-when-overflow="true"-->
+<!--          label="合同评审表编码">-->
+<!--        </el-table-column>-->
+<!--        <el-table-column-->
+<!--          prop="actualDeliveryTime"-->
+<!--          header-align="center"-->
+<!--          align="center"-->
+<!--          min-width="140"-->
+<!--          :show-overflow-tooltip="true"-->
+<!--          label="实际交期">-->
+<!--        </el-table-column>-->
         <el-table-column
           header-align="center"
           align="center"
@@ -162,7 +163,7 @@
 <script>
 import AddOrUpdate from '../cus/contract-record-add-or-update'
 import Detail from '../cus/contract-record-detail'
-import { getCusContractBookList } from '@/api/cus'
+import { getContractList } from '@/api/sale'
 import AttachDetail from '../common/attach-detail'
 import NoticeChangeSetting from '../cus/contract-record-notice-change-setting'
 import ChangeForm from '../cus/contract-record-change'
@@ -215,9 +216,9 @@ export default {
       let params = {
         'current': this.pageIndex,
         'size': this.pageSize,
-        'customerName': this.dataForm.customerName ? this.dataForm.customerName : null
+        'supplierName': this.dataForm.supplierName ? this.dataForm.supplierName : null
       }
-      getCusContractBookList(params).then(({data}) => {
+      getContractList(params).then(({data}) => {
         if (data && data.code === '200') {
           this.dataList = data.data.records
           this.totalPage = Number(data.data.total)
@@ -286,16 +287,6 @@ export default {
         this.$refs.changeForm.init(id)
       })
     },
-    // 转换属性“产品类别”
-    typeFormat (row) {
-      if (this.optionsType) {
-        for (let i = 0; i < this.optionsType.length; i++) {
-          if (this.optionsType[i].code === row.productType) {
-            return this.optionsType[i].value
-          }
-        }
-      }
-    },
     // 详情
     detailHandle (id) {
       this.detailVisible = true
@@ -304,7 +295,7 @@ export default {
       })
     },
     // 变更通知人设置
-    setNoticeChangeHandel () {
+    setNoticeChangeHandle () {
       this.noticeChangeAttachVisible = true
       this.$nextTick(() => {
         this.$refs.noticeChangeSetting.init()

+ 4 - 1
src/views/modules/sale/purchase.vue

@@ -86,6 +86,7 @@
           header-align="center"
           align="center"
           min-width="160"
+          :show-tooltip-when-overflow="true"
           label="申请时间">
         </el-table-column>
         <el-table-column
@@ -93,13 +94,15 @@
           header-align="center"
           align="center"
           min-width="100"
+          :show-tooltip-when-overflow="true"
           label="申请人">
         </el-table-column>
         <el-table-column
           prop="deptName"
           header-align="center"
           align="center"
-          min-width="100"
+          min-width="120"
+          :show-tooltip-when-overflow="true"
           label="申请部门">
         </el-table-column>
         <el-table-column