|
@@ -3,8 +3,21 @@
|
|
|
<div class="sale">
|
|
|
<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 label="类别">
|
|
|
+ <el-select
|
|
|
+ v-model="dataForm.purchaseType"
|
|
|
+ remote
|
|
|
+ placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in optionsType"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.code">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="名称或说明" prop="supplierName">
|
|
|
+ <el-input v-model="dataForm.supplierName" placeholder="产品名称" clearable/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="申请日期">
|
|
|
<el-date-picker
|
|
@@ -16,10 +29,21 @@
|
|
|
end-placeholder="结束日期">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="状态">
|
|
|
+ <el-select
|
|
|
+ v-model="dataForm.purchaseState"
|
|
|
+ remote
|
|
|
+ placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in optionsOutsourceState"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.value"
|
|
|
+ :value="item.code">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </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 type="primary" @click="setNoticeChangeHandle()">合同更改通知人设置</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-table
|
|
@@ -34,73 +58,139 @@
|
|
|
align="center">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="contractCode"
|
|
|
+ prop="purchaseCode"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="120"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="合同编码">
|
|
|
+ label="采购编码">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="supplierName"
|
|
|
+ prop="goodsName"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="140"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="供应商名称">
|
|
|
+ label="产品名称">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="contractNumber"
|
|
|
+ prop="goodsId"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="120"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="合同号">
|
|
|
+ label="产品编号">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="deliveryTime"
|
|
|
+ prop="purchaseType"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="140"
|
|
|
:show-overflow-tooltip="true"
|
|
|
- label="合同交期">
|
|
|
+ label="委外类别">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="specification"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="100"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="型号及规格">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="cnt"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="数量">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="qualifiedCnt"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="合格数量">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="totalAmount"
|
|
|
+ prop="unitName"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
min-width="100"
|
|
|
- label="合同总金额">
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="单位">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="isChange"
|
|
|
+ prop="deadline"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- label="是否进行合同更改">
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="采购期限">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="arrivedTime"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="到料时间">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="changeContentDesc"
|
|
|
+ prop="batchNumber"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- min-width="160"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="批次号/用途">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="supplierName"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
:show-tooltip-when-overflow="true"
|
|
|
- label="更改内容简述">
|
|
|
+ label="供应商">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
+ prop="technology"
|
|
|
header-align="center"
|
|
|
align="center"
|
|
|
- label="合同附件">
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ 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
|
|
|
+ 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
|
|
|
+ prop="applyTime"
|
|
|
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>
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="申请时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="applierId"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="申请人">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="orgId"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ min-width="140"
|
|
|
+ :show-tooltip-when-overflow="true"
|
|
|
+ label="申请部门">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="notes"
|
|
@@ -110,6 +200,20 @@
|
|
|
:show-overflow-tooltip="true"
|
|
|
label="备注">
|
|
|
</el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="approvalState"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ :formatter="formatState"
|
|
|
+ label="审批状态">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="purchaseState"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ :formatter="formatOutsourceState"
|
|
|
+ label="委外状态">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
fixed="right"
|
|
|
header-align="center"
|
|
@@ -146,7 +250,7 @@
|
|
|
<script>
|
|
|
import AddOrUpdate from '../cus/contract-record-add-or-update'
|
|
|
import Detail from '../cus/contract-record-detail'
|
|
|
-import { getContractList } from '@/api/sale'
|
|
|
+import { getOutsourceList } 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'
|
|
@@ -173,10 +277,35 @@ export default {
|
|
|
pageSize: 10,
|
|
|
totalPage: 0,
|
|
|
dataListLoading: false,
|
|
|
- dataListSelections: []
|
|
|
+ dataListSelections: [],
|
|
|
+ optionsType: [], // 类别
|
|
|
+ optionsOutsourceState: [
|
|
|
+ {
|
|
|
+ code: '0',
|
|
|
+ value: '待委外'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: '1',
|
|
|
+ value: '委外中'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: '2',
|
|
|
+ value: '已入库'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: '3',
|
|
|
+ value: '入库中'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ code: '4',
|
|
|
+ value: '入库异常'
|
|
|
+ }
|
|
|
+ ], // 委外状态
|
|
|
+ optionsState: [] // 状态
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
+ this.optionsState = this.$store.state.common.approveStates
|
|
|
this.getDataList()
|
|
|
},
|
|
|
methods: {
|
|
@@ -199,9 +328,13 @@ export default {
|
|
|
let params = {
|
|
|
'current': this.pageIndex,
|
|
|
'size': this.pageSize,
|
|
|
- 'supplierName': this.dataForm.supplierName ? this.dataForm.supplierName : null
|
|
|
+ 'supplierName': this.dataForm.supplierName ? this.dataForm.supplierName : null,
|
|
|
+ 'applyTimeBegin': this.dataForm.date ? this.dataForm.date[0] : null,
|
|
|
+ 'applyTimeEnd': this.dataForm.date ? this.dataForm.date[1] : null,
|
|
|
+ 'purchaseState': this.dataForm.purchaseState ? this.dataForm.purchaseState : null,
|
|
|
+ 'purchaseType': this.dataForm.purchaseType ? this.dataForm.purchaseType : null
|
|
|
}
|
|
|
- getContractList(params).then(({data}) => {
|
|
|
+ getOutsourceList(params).then(({data}) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataList = data.data.records
|
|
|
this.totalPage = Number(data.data.total)
|
|
@@ -291,6 +424,18 @@ export default {
|
|
|
this.$refs.changeDetail.init(row.noticeAttachList)
|
|
|
})
|
|
|
},
|
|
|
+ // 转换属性“委外状态”
|
|
|
+ formatOutsourceState (row) {
|
|
|
+ if (!row.purchaseState) return ''
|
|
|
+ const item1 = this.optionsOutsourceState.find((item) => item.code === row.purchaseState.toString())
|
|
|
+ return item1 ? item1.value : ''
|
|
|
+ },
|
|
|
+ // 转换属性“审批状态”
|
|
|
+ formatState (row) {
|
|
|
+ if (!row.approvalState) return ''
|
|
|
+ const item1 = this.optionsState.find((item) => item.code === row.approvalState.toString())
|
|
|
+ return item1 ? item1.value : ''
|
|
|
+ },
|
|
|
// 附件
|
|
|
attachDetails (row) {
|
|
|
this.attachVisible = true
|