liqianyi 3 年之前
父節點
當前提交
d65e439cdc

+ 1 - 0
src/icons/svg/icon-gongyingshang.svg

@@ -0,0 +1 @@
+<svg t="1649832495299" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2585" width="200" height="200"><path d="M346.453333 167.253333c-85.333333 0-153.6 68.266667-153.6 153.6s68.266667 153.6 153.6 153.6 153.6-68.266667 153.6-153.6-69.973333-153.6-153.6-153.6zM346.453333 517.12C174.08 517.12 34.133333 657.066667 34.133333 829.44c0 13.653333 11.946667 25.6 25.6 25.6H631.466667c13.653333 0 25.6-11.946667 25.6-25.6 1.706667-172.373333-138.24-312.32-310.613334-312.32z m0 247.466667l-46.08-56.32 46.08-146.773334 46.08 146.773334-46.08 56.32z" p-id="2586"></path><path d="M728.746667 349.866667m-129.706667 0a129.706667 129.706667 0 1 0 259.413333 0 129.706667 129.706667 0 1 0-259.413333 0Z" p-id="2587"></path><path d="M728.746667 506.88c-61.44 0-119.466667 22.186667-163.84 58.026667 71.68 54.613333 122.88 134.826667 138.24 228.693333h259.413333c13.653333 0 25.6-11.946667 25.6-25.6 1.706667-145.066667-114.346667-261.12-259.413333-261.12z" p-id="2588"></path></svg>

+ 1 - 0
src/icons/svg/icon-hetongguanli.svg

@@ -0,0 +1 @@
+<svg t="1649832730120" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3494" width="200" height="200"><path d="M102.348826 102.348826h818.790604v409.395302h102.348826V0H0v921.13943h409.395302v-102.348825H102.348826z m716.441779 102.348825H204.697651v102.348826h614.092954zM204.697651 511.744128h358.22089V409.395302H204.697651z m818.790605 132.541729l-230.284858-6.140929L716.441779 409.395302l-76.761619 228.749626-230.284858 6.140929 182.692654 147.382309L527.096452 1023.488256l189.345327-136.635682L906.810595 1023.488256l-65.503249-232.331834z" p-id="3495"></path></svg>

File diff suppressed because it is too large
+ 0 - 0
src/icons/svg/icon-weiwailiebiao.svg


+ 333 - 0
src/views/modules/sale/contract.vue

@@ -0,0 +1,333 @@
+<!-- 采购合同管理 -->
+<template>
+  <div class="contract">
+    <template v-if="!detailVisible && !addOrUpdateVisible && !changeFormVisible &&!changeAttachVisible && !attachVisible && !noticeChangeAttachVisible">
+      <el-form :inline="true" :model="dataForm" @keyup.enter.native="search()">
+        <el-form-item label="名称" prop="supplierName">
+          <el-input v-model="dataForm.supplierName" placeholder="客户名称" clearable/>
+        </el-form-item>
+        <el-form-item label="申请日期">
+          <el-date-picker
+            v-model="dataForm.date"
+            value-format="yyyy-MM-dd"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期">
+          </el-date-picker>
+        </el-form-item>
+        <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-form-item>
+      </el-form>
+      <el-table
+        :data="dataList"
+        border
+        v-loading="dataListLoading"
+        style="width: 100%;">
+        <el-table-column
+          label="序号"
+          type="index"
+          width="50"
+          align="center">
+        </el-table-column>
+        <el-table-column
+          prop="contractCode"
+          header-align="center"
+          align="center"
+          min-width="120"
+          :show-tooltip-when-overflow="true"
+          label="合同编码">
+        </el-table-column>
+        <el-table-column
+          prop="customerName"
+          header-align="center"
+          align="center"
+          min-width="140"
+          :show-tooltip-when-overflow="true"
+          label="客户名称">
+        </el-table-column>
+        <el-table-column
+          prop="contractNumber"
+          header-align="center"
+          align="center"
+          min-width="120"
+          :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"
+          align="center"
+          min-width="140"
+          :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"
+          align="center"
+          min-width="100"
+          label="合同总金额">
+        </el-table-column>
+        <el-table-column
+          prop="isChange"
+          header-align="center"
+          align="center"
+          label="是否进行合同更改">
+        </el-table-column>
+        <el-table-column
+          prop="changeContentDesc"
+          header-align="center"
+          align="center"
+          min-width="160"
+          :show-tooltip-when-overflow="true"
+          label="更改内容简述">
+        </el-table-column>
+        <el-table-column
+          header-align="center"
+          align="center"
+          label="合同附件">
+          <template slot-scope="scope">
+            <el-button :disabled="!scope.row.attachList || scope.row.attachList.length === 0" type="text" size="small" @click="attachDetails(scope.row)">查看</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column
+          header-align="center"
+          align="center"
+          label="合同更改通知单附件">
+          <template slot-scope="scope">
+            <el-button :disabled="!scope.row.noticeAttachList || scope.row.noticeAttachList.length === 0" type="text" size="small" @click="changeDetails(scope.row)">查看</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="notes"
+          header-align="center"
+          align="center"
+          min-width="180"
+          :show-overflow-tooltip="true"
+          label="备注">
+        </el-table-column>
+        <el-table-column
+          fixed="right"
+          header-align="center"
+          align="center"
+          width="150"
+          label="操作">
+          <template slot-scope="scope">
+            <el-button v-if="isAuth('cus:contractBook:info')" type="text" size="small" @click="detailHandle(scope.row.contractId)">查看</el-button>
+            <el-button v-if="isAuth('cus:contractBook:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.contractId, false)">编辑</el-button>
+            <el-button v-if="isAuth('cus:contractBook:changeContract')" type="text" size="small" @click="changeHandle(scope.row.contractId)">变更</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        @size-change="sizeChangeHandle"
+        @current-change="currentChangeHandle"
+        :current-page="pageIndex"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="pageSize"
+        :total="totalPage"
+        layout="total, sizes, prev, pager, next, jumper">
+      </el-pagination>
+    </template>
+    <!-- 弹窗, 新增 / 修改 -->
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @onChose="onChose"></add-or-update>
+    <detail v-if="detailVisible" ref="detail" @onChose="onChose"/>
+    <attach-detail v-if="changeAttachVisible" ref="changeDetail" @onChose="onChose"/>
+    <attach-detail v-if="attachVisible" ref="attachDetail" @onChose="onChose"/>
+    <notice-change-setting v-if="noticeChangeAttachVisible" ref="noticeChangeSetting" @onChose="onChose"/>
+    <change-form v-if="changeFormVisible" ref="changeForm" @refreshDataList="getDataList" @onChose="onChose"/>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from '../cus/contract-record-add-or-update'
+import Detail from '../cus/contract-record-detail'
+import { getCusContractBookList } from '@/api/cus'
+import AttachDetail from '../common/attach-detail'
+import NoticeChangeSetting from '../cus/contract-record-notice-change-setting'
+import ChangeForm from '../cus/contract-record-change'
+export default {
+  name: 'contract',
+  components: {
+    AttachDetail,
+    AddOrUpdate,
+    Detail,
+    NoticeChangeSetting,
+    ChangeForm
+  },
+  data () {
+    return {
+      addOrUpdateVisible: false,
+      detailVisible: false,
+      attachVisible: false,
+      changeAttachVisible: false,
+      noticeChangeAttachVisible: false,
+      changeFormVisible: false,
+      dataForm: {},
+      dataList: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPage: 0,
+      dataListLoading: false,
+      dataListSelections: []
+    }
+  },
+  created () {
+    this.getDataList()
+  },
+  methods: {
+    onChose () {
+      this.addOrUpdateVisible = false
+      this.attachVisible = false
+      this.detailVisible = false
+      this.noticeChangeAttachVisible = false
+      this.changeFormVisible = false
+      this.changeAttachVisible = false
+    },
+    // 查询
+    search () {
+      this.pageIndex = 1
+      this.getDataList()
+    },
+    // 获取数据列表
+    getDataList () {
+      this.dataListLoading = true
+      let params = {
+        'current': this.pageIndex,
+        'size': this.pageSize,
+        'customerName': this.dataForm.customerName ? this.dataForm.customerName : null
+      }
+      getCusContractBookList(params).then(({data}) => {
+        if (data && data.code === '200') {
+          this.dataList = data.data.records
+          this.totalPage = Number(data.data.total)
+        } else {
+          this.dataList = []
+          this.totalPage = 0
+        }
+        this.dataListLoading = false
+      })
+    },
+    deleteHandle (id) {
+      if (!id) return
+      let ids = []
+      ids.push(id)
+      this.$confirm(`确定删除?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl(`/biz-service/cusContractBook/delete`),
+          method: 'DELETE',
+          data: ids
+        }).then(({data}) => {
+          if (data && data.code === '200') {
+            this.$message({
+              message: '操作成功',
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.getDataList()
+              }
+            })
+          } else {
+            this.$message.error(data.msg)
+          }
+        })
+      }).catch(() => {})
+    },
+    // 每页数
+    sizeChangeHandle (val) {
+      this.pageSize = val
+      this.pageIndex = 1
+      this.getDataList()
+    },
+    // 当前页
+    currentChangeHandle (val) {
+      this.pageIndex = val
+      this.getDataList()
+    },
+    // 多选
+    selectionChangeHandle (val) {
+      this.dataListSelections = val
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+    // 变更
+    changeHandle (id) {
+      this.changeFormVisible = true
+      this.$nextTick(() => {
+        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
+      this.$nextTick(() => {
+        this.$refs.detail.init(id)
+      })
+    },
+    // 变更通知人设置
+    setNoticeChangeHandel () {
+      this.noticeChangeAttachVisible = true
+      this.$nextTick(() => {
+        this.$refs.noticeChangeSetting.init()
+      })
+    },
+    // 产品更改通知单
+    changeDetails (row) {
+      this.changeAttachVisible = true
+      this.$nextTick(() => {
+        this.$refs.changeDetail.init(row.noticeAttachList)
+      })
+    },
+    // 附件
+    attachDetails (row) {
+      this.attachVisible = true
+      this.$nextTick(() => {
+        this.$refs.attachDetail.init(row.attachList)
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

Some files were not shown because too many files changed in this diff