Browse Source

2024.11.25 审批优化

java8
yuejiayang 1 year ago
parent
commit
302f6bd10c
  1. 42
      src/views/modules/auth/authInquiry.vue
  2. 81
      src/views/modules/auth/authQuote.vue
  3. 32
      src/views/modules/auth/authRule.vue

42
src/views/modules/auth/authInquiry.vue

@ -87,7 +87,7 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="' '"> <el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button @click="getDataListAll()">查询</el-button>
<!-- <download-excel--> <!-- <download-excel-->
<!-- :fields="fields()"--> <!-- :fields="fields()"-->
<!-- :data="exportData"--> <!-- :data="exportData"-->
@ -316,6 +316,27 @@ export default {
limit: 10, limit: 10,
menuId: this.$route.meta.menuId, menuId: this.$route.meta.menuId,
}, },
searchData1: {
userId: this.$store.state.user.id,
site: this.$store.state.user.site,
id: '',
customerNo: '',
customerDesc: '',
rfqNo: '',
bu: '',
requestStartDate: '',
requestEndDate: '',
requiredCompletionStartDate: '',
requiredCompletionEndDate: '',
status: '',
quoterName: '',
requesterName: '',
priorityLevel: '',
orderRef1: 'XJ',
page: 1,
limit: 10,
menuId: this.$route.meta.menuId,
},
// //
dataListLoading: false, dataListLoading: false,
// //
@ -740,6 +761,12 @@ export default {
}, },
created() { created() {
this.getSiteAndBuByUserName() this.getSiteAndBuByUserName()
// URL
const {rfqNo} = this.$route.query;
// searchData
if (rfqNo){
this.searchData1.rfqNo = this.$route.query.rfqNo;
}
this.getDataList() this.getDataList()
}, },
methods: { methods: {
@ -816,10 +843,21 @@ export default {
/** /**
* 获取数据列表 * 获取数据列表
*/ */
getDataListAll(){
this.searchData1 = null
this.getDataList()
},
getDataList() { getDataList() {
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
searchUserAuthInquiryApplicationInfo(this.searchData).then(({data}) => {
let inData = this.searchData
if (this.searchData1 !== null){
this.searchData1.limit = this.pageSize
this.searchData1.page = this.pageIndex
inData = this.searchData1
}
searchUserAuthInquiryApplicationInfo(inData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage

81
src/views/modules/auth/authQuote.vue

@ -71,7 +71,7 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label=" "> <el-form-item label=" ">
<el-button @click="getDataList"> </el-button>
<el-button @click="getDataListAll"> </el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -79,10 +79,11 @@
<!-- 询价列表 --> <!-- 询价列表 -->
<el-table <el-table
height="75vh"
height="30vh"
:data="dataList" :data="dataList"
border border
ref="mainTable" ref="mainTable"
highlight-current-row
@row-click="quoteClickRow" @row-click="quoteClickRow"
@current-change="changeCurrentRow" @current-change="changeCurrentRow"
v-loading="dataListLoading" v-loading="dataListLoading"
@ -124,6 +125,34 @@
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper">
</el-pagination> </el-pagination>
<el-tabs style="margin-top: 0px; width: 100%; height: 100%;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">
<el-tab-pane label="报价信息" name="quotationInformation">
<el-form :inline="true" label-width="120px" label-position="top">
<el-form-item label="Application">
<el-input v-model="quoteCurrentRow.application" style="width: 210px" readonly></el-input>
</el-form-item>
<el-form-item label="Customer">
<el-input v-model="quoteCurrentRow.customerDesc" readonly></el-input>
</el-form-item>
<el-form-item label="年需求量">
<el-input-number v-model="quoteCurrentRow.annualDemand" readonly :controls="false"></el-input-number>
</el-form-item>
<el-form-item label="Cost Model">
<el-input v-model="quoteCurrentRow.costModel" style="width: 210px" readonly></el-input>
</el-form-item>
<el-form-item label="Markup">
<el-input-number v-model="quoteCurrentRow.markup" readonly :controls="false"></el-input-number>
</el-form-item>
</el-form>
<el-form :inline="true" label-width="120px" label-position="top">
<el-form-item label="报价备注">
<el-input type="textarea" :rows="2" v-model="quoteCurrentRow.remark" style="width: 1019px" readonly></el-input>
</el-form-item>
</el-form>
<tp-cost :quote-detail="quoteCurrentRow" height="36vh" style="margin-top: 10px"></tp-cost>
</el-tab-pane>
</el-tabs>
<el-dialog title="申请单审核" :visible.sync="reviewFlag" width="520px" :close-on-click-modal="false" <el-dialog title="申请单审核" :visible.sync="reviewFlag" width="520px" :close-on-click-modal="false"
v-drag> v-drag>
<el-row> <el-row>
@ -183,6 +212,7 @@ import {
} from "../../../api/quote/quote"; } from "../../../api/quote/quote";
import quotationUpload from "../quote/quotation_upload.vue"; import quotationUpload from "../quote/quotation_upload.vue";
import {updateAuthHist} from "../../../api/auth/auth"; import {updateAuthHist} from "../../../api/auth/auth";
import TpCost from "../quote/detail/tpCost.vue";
export default { export default {
computed: { computed: {
@ -200,6 +230,7 @@ export default {
// }, // },
}, },
components: { components: {
TpCost,
quotationUpload, quotationUpload,
DictDataSelect, DictDataSelect,
Chooselist Chooselist
@ -216,6 +247,7 @@ export default {
copyPriceCheckDetail:{}, copyPriceCheckDetail:{},
loading:false, loading:false,
attributeDialog:true, attributeDialog:true,
activeName: 'quotationInformation',
priceCheckRule: { priceCheckRule: {
associatedPartNo:[{required: true, message: ' ', trigger: 'change'},], associatedPartNo:[{required: true, message: ' ', trigger: 'change'},],
materialRequired:[{required: true, message: ' ', trigger: 'change'},], materialRequired:[{required: true, message: ' ', trigger: 'change'},],
@ -267,6 +299,27 @@ export default {
limit: 10, limit: 10,
menuId: this.$route.meta.menuId, menuId: this.$route.meta.menuId,
}, },
searchData1: {
userId: this.$store.state.user.id,
site: this.$store.state.user.site,
id: '',
customerNo: '',
customerDesc: '',
quoteVersionNo: '',
bu: '',
requestStartDate: '',
requestEndDate: '',
requiredCompletionStartDate: '',
requiredCompletionEndDate: '',
status: '',
quoterName: '',
requesterName: '',
priorityLevel: '',
orderRef1: 'BJ',
page: 1,
limit: 10,
menuId: this.$route.meta.menuId,
},
// //
dataListLoading: false, dataListLoading: false,
// //
@ -571,7 +624,7 @@ export default {
columnProp: 'authHistRemark', columnProp: 'authHistRemark',
headerAlign: 'center', headerAlign: 'center',
align: 'left', align: 'left',
columnLabel: '备注',
columnLabel: '审批备注',
columnHidden: false, columnHidden: false,
columnImage: false, columnImage: false,
columnSortable: false, columnSortable: false,
@ -671,6 +724,12 @@ export default {
}, },
created() { created() {
this.getSiteAndBuByUserName() this.getSiteAndBuByUserName()
// URL
const {quoteVersionNo} = this.$route.query;
// searchData
if (quoteVersionNo){
this.searchData1.quoteVersionNo = this.$route.query.quoteVersionNo;
}
this.getDataList() this.getDataList()
}, },
methods: { methods: {
@ -723,6 +782,7 @@ export default {
*/ */
quoteClickRow(row) { quoteClickRow(row) {
this.quoteCurrentRow = JSON.parse(JSON.stringify(row)) this.quoteCurrentRow = JSON.parse(JSON.stringify(row))
this.quoteCurrentRow.id = row.quoteDetailId
}, },
/** /**
* 当前值发生变化的时候修改 * 当前值发生变化的时候修改
@ -733,6 +793,7 @@ export default {
// //
if (row) { if (row) {
this.quoteCurrentRow = JSON.parse(JSON.stringify(row)) this.quoteCurrentRow = JSON.parse(JSON.stringify(row))
this.quoteCurrentRow.id = row.quoteDetailId
// //
this.refreshCurrentTabTable() this.refreshCurrentTabTable()
} }
@ -747,10 +808,22 @@ export default {
/** /**
* 获取数据列表 * 获取数据列表
*/ */
getDataListAll(){
this.searchData1 = null
this.getDataList()
},
getDataList() { getDataList() {
console.log(this.searchData1)
this.searchData.limit = this.pageSize this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex this.searchData.page = this.pageIndex
searchUserAuthQuoteApplicationInfo(this.searchData).then(({data}) => {
let inData = this.searchData
if (this.searchData1 !== null){
this.searchData1.limit = this.pageSize
this.searchData1.page = this.pageIndex
inData = this.searchData1
}
searchUserAuthQuoteApplicationInfo(inData).then(({data}) => {
if (data.code === 0) { if (data.code === 0) {
this.dataList = data.page.list this.dataList = data.page.list
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage

32
src/views/modules/auth/authRule.vue

@ -1219,13 +1219,18 @@ export default {
lastStepFlag: 'N', lastStepFlag: 'N',
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
} }
// +10
let stepNoList = []
for (let i = 0; i < this.ruleStepDataList.length; i++) {
stepNoList.push(this.ruleStepDataList[i].stepNo)
}
if (stepNoList.length > 0) {
this.ruleStepModalData.stepNo = Math.max.apply(null, stepNoList) + 10
if (this.ruleStepDataList.length === 0) {
this.ruleStepModalData.firstStepFlag = 'Y'
}else {
this.ruleStepModalData.firstStepFlag = 'N'
// +10
let stepNoList = []
for (let i = 0; i < this.ruleStepDataList.length; i++) {
stepNoList.push(this.ruleStepDataList[i].stepNo)
}
if (stepNoList.length > 0) {
this.ruleStepModalData.stepNo = Math.max.apply(null, stepNoList) + 10
}
} }
this.ruleStepModalDisableFlag = false this.ruleStepModalDisableFlag = false
this.ruleStepModalFlag = true this.ruleStepModalFlag = true
@ -1438,6 +1443,13 @@ export default {
} }
} }
} }
} else {
if (this.ruleStepModalData.firstStepFlag === 'N') {
this.$alert('该审批步骤下缺少首步骤!', '提示', {
confirmButtonText: '确定'
})
return
}
} }
if (this.ruleStepModalData.firstStepFlag === 'Y') { if (this.ruleStepModalData.firstStepFlag === 'Y') {
this.ruleStepModalData.lastStepFlag = 'N' this.ruleStepModalData.lastStepFlag = 'N'
@ -1472,6 +1484,12 @@ export default {
} else { } else {
this.ruleStepModalData.authTypeDb = 'G' this.ruleStepModalData.authTypeDb = 'G'
} }
if (this.ruleStepDataList.length === 1 && this.ruleStepModalData.firstStepFlag === 'N') {
this.$alert('该审批步骤下缺少首步骤!', '提示', {
confirmButtonText: '确定'
})
return
}
authRuleStepEdit(this.ruleStepModalData).then(({data}) => { authRuleStepEdit(this.ruleStepModalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.getRuleStepDataList() this.getRuleStepDataList()

Loading…
Cancel
Save