This commit is contained in:
parent
abb8203986
commit
a23b895156
|
|
@ -386,4 +386,22 @@ export function combineProjectApi(data) {
|
|||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 协议合并-列表
|
||||
export function getAgreementListApi(params) {
|
||||
return request({
|
||||
url: '/material/bm_agreement_combine/list',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 协议合并-保存
|
||||
export function combineAgreementApi(data) {
|
||||
return request({
|
||||
url: '/material/bm_agreement_combine/combineAgreement',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
@ -951,3 +951,12 @@ export function getUseDemandAndSupplyApi(data) {
|
|||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 直转单-签名
|
||||
export function getApproveListApi(data) {
|
||||
return request({
|
||||
url: '/material/directRotation/getApproveList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@
|
|||
:row-key="getRowKey"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="checkSelectable" />
|
||||
<el-table-column align="center" label="序号" width="55">
|
||||
<template slot-scope="scope">
|
||||
{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}
|
||||
|
|
@ -870,6 +870,13 @@ export default {
|
|||
loading.close()
|
||||
}
|
||||
},
|
||||
checkSelectable(row) {
|
||||
if (!row.nextCheckTime) return true // 如果没有时间,不禁用
|
||||
const now = new Date()
|
||||
const nextCheckTime = new Date(row.nextCheckTime)
|
||||
return nextCheckTime >= now // 如果时间未到,允许选中;否则禁用
|
||||
},
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(currentPageSelectedRows) {
|
||||
// 如果正在恢复选中状态,忽略此事件
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ export default {
|
|||
},
|
||||
handleAdd() {
|
||||
console.log('领料申请')
|
||||
this.$router.push({ path: '/business/businessHandling/directApply' })
|
||||
this.$router.push({ path: '/materialsStation/straight/directApply' })
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row, type) {
|
||||
|
|
@ -215,7 +215,7 @@ export default {
|
|||
})
|
||||
} else {
|
||||
params = { type: 'edit', id: row.id }
|
||||
this.$router.push({ path: '/business/businessHandling/directApply', query: params })
|
||||
this.$router.push({ path: '/materialsStation/straight/directApply', query: params })
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
|
|
|
|||
|
|
@ -0,0 +1,576 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 合并id -->
|
||||
<div style="margin-bottom: 20px">
|
||||
<el-button v-loading="isSubmit" type="primary" @click="submit">保存</el-button>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="11" :offset="0">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" inline @submit.native.prevent>
|
||||
<el-form-item label="" prop="proName">
|
||||
<el-input
|
||||
v-model="queryParams.proName"
|
||||
placeholder="请输入工程名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(1)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="agreementCode">
|
||||
<el-input
|
||||
v-model="queryParams.agreementCode"
|
||||
placeholder="请输入协议编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(1)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="unitName">
|
||||
<el-input
|
||||
v-model="queryParams.unitName"
|
||||
placeholder="请输入单位名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(1)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 表单按钮 -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery(1)">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="handleReset(1)">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
ref="table1"
|
||||
v-loading="isLoading"
|
||||
:data="tableList1"
|
||||
:highlight-current-row="false"
|
||||
:max-height="300"
|
||||
@selection-change="handleSelectChange1"
|
||||
style="width: 100%"
|
||||
>
|
||||
<!-- 多选 -->
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="selectableTable" />
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="55"
|
||||
label="序号"
|
||||
align="center"
|
||||
:index="index => (queryParams.pageNum - 1) * queryParams.pageSize + index + 1"
|
||||
/>
|
||||
<el-table-column
|
||||
v-for="(column, index) in tableColumns"
|
||||
:show-overflow-tooltip="false"
|
||||
:key="index"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getProList"
|
||||
/>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="2" :offset="0" class="row-box">
|
||||
<div class="item-center">
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAdd1"
|
||||
:disabled="selectedList1.length == 0"
|
||||
style="width: 70px; margin-bottom: 20px"
|
||||
>
|
||||
<i class="el-icon-arrow-right"></i>
|
||||
</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="handleDelete1" :disabled="selectedList2.length == 0" style="width: 70px">
|
||||
<i class="el-icon-arrow-left"></i>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="11" :offset="0">
|
||||
<el-form :model="queryParams2" ref="queryForm2" size="small" inline @submit.native.prevent>
|
||||
<el-form-item label="" prop="proName">
|
||||
<el-input
|
||||
v-model="queryParams2.proName"
|
||||
placeholder="请输入工程名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(2)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="agreementCode">
|
||||
<el-input
|
||||
v-model="queryParams2.agreementCode"
|
||||
placeholder="请输入协议编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(2)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="unitName">
|
||||
<el-input
|
||||
v-model="queryParams2.unitName"
|
||||
placeholder="请输入单位名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(2)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 表单按钮 -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery(2)">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="handleReset(2)">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="searchResult2 !== null ? searchResult2 : tableList2"
|
||||
:highlight-current-row="false"
|
||||
:max-height="300"
|
||||
@selection-change="handleSelectChange2"
|
||||
style="width: 100%"
|
||||
>
|
||||
<!-- 多选 -->
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" width="55" label="序号" align="center" />
|
||||
<el-table-column
|
||||
v-for="(column, index) in tableColumns"
|
||||
:show-overflow-tooltip="false"
|
||||
:key="index"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 保存id -->
|
||||
<el-row :gutter="20" style="margin-top: 30px">
|
||||
<el-col :span="11" :offset="0">
|
||||
<el-form :model="queryParams3" ref="queryForm3" size="small" inline @submit.native.prevent>
|
||||
<el-form-item label="" prop="proName">
|
||||
<el-input
|
||||
v-model="queryParams3.proName"
|
||||
placeholder="请输入工程名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(3)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="agreementCode">
|
||||
<el-input
|
||||
v-model="queryParams3.agreementCode"
|
||||
placeholder="请输入协议编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(3)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="unitName">
|
||||
<el-input
|
||||
v-model="queryParams3.unitName"
|
||||
placeholder="请输入单位名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(3)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 表单按钮 -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery(3)">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="handleReset(3)">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="isLoading"
|
||||
:data="searchResult3 !== null ? searchResult3 : tableList3"
|
||||
:highlight-current-row="false"
|
||||
:max-height="300"
|
||||
@selection-change="handleSelectChange3"
|
||||
style="width: 100%"
|
||||
>
|
||||
<!-- 多选 -->
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" width="55" label="序号" align="center" />
|
||||
<el-table-column
|
||||
v-for="(column, index) in tableColumns"
|
||||
:show-overflow-tooltip="false"
|
||||
:key="index"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-show="total3 > 0"
|
||||
:total="total3"
|
||||
:page.sync="queryParams3.pageNum"
|
||||
:limit.sync="queryParams3.pageSize"
|
||||
@pagination="getProList2"
|
||||
/>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="2" :offset="0" class="row-box">
|
||||
<div class="item-center">
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAdd2"
|
||||
:disabled="selectedList3.length == 0"
|
||||
style="width: 70px; margin-bottom: 20px"
|
||||
>
|
||||
<i class="el-icon-arrow-right"></i>
|
||||
</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="handleDelete2" :disabled="selectedList4.length == 0" style="width: 70px">
|
||||
<i class="el-icon-arrow-left"></i>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="11" :offset="0">
|
||||
<el-form :model="queryParams4" ref="queryForm4" size="small" inline @submit.native.prevent>
|
||||
<el-form-item label="" prop="proName">
|
||||
<el-input
|
||||
v-model="queryParams4.proName"
|
||||
placeholder="请输入工程名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(4)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="agreementCode">
|
||||
<el-input
|
||||
v-model="queryParams4.agreementCode"
|
||||
placeholder="请输入协议编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(4)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="unitName">
|
||||
<el-input
|
||||
v-model="queryParams4.unitName"
|
||||
placeholder="请输入单位名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery(4)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 表单按钮 -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery(4)">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="handleReset(4)">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="searchResult4 !== null ? searchResult4 : tableList4"
|
||||
:highlight-current-row="false"
|
||||
:max-height="300"
|
||||
@selection-change="handleSelectChange4"
|
||||
style="width: 100%"
|
||||
>
|
||||
<!-- 多选 -->
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="index" width="55" label="序号" align="center" />
|
||||
<el-table-column
|
||||
v-for="(column, index) in tableColumns"
|
||||
:show-overflow-tooltip="false"
|
||||
:key="index"
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAgreementListApi, combineAgreementApi } from '@/api/basic/basic'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
proName: '',
|
||||
agreementCode: '',
|
||||
unitName: ''
|
||||
},
|
||||
queryParams2: {
|
||||
proName: '',
|
||||
agreementCode: '',
|
||||
unitName: ''
|
||||
},
|
||||
queryParams3: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
proName: '',
|
||||
agreementCode: '',
|
||||
unitName: ''
|
||||
},
|
||||
queryParams4: {
|
||||
proName: '',
|
||||
agreementCode: '',
|
||||
unitName: ''
|
||||
},
|
||||
tableColumns: [
|
||||
{ label: '协议id', prop: 'agreementId' },
|
||||
{ label: '协议编码', prop: 'agreementCode' },
|
||||
{ label: '工程名称', prop: 'proName' },
|
||||
{ label: '单位名称', prop: 'unitName' }
|
||||
],
|
||||
tableList1: [],
|
||||
tableList2: [],
|
||||
tableList3: [],
|
||||
tableList4: [],
|
||||
total: 0,
|
||||
total3: 0,
|
||||
selectedList1: [],
|
||||
selectedList2: [],
|
||||
selectedList3: [],
|
||||
selectedList4: [],
|
||||
|
||||
// 查询结果(只在点击查询时更新)
|
||||
searchResult1: null,
|
||||
searchResult2: null,
|
||||
searchResult3: null,
|
||||
searchResult4: null,
|
||||
isSubmit: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getProList()
|
||||
this.getProList2()
|
||||
},
|
||||
methods: {
|
||||
selectableTable(row) {
|
||||
// 如果 tableList2 非空,所有行禁用
|
||||
if (this.tableList2.length > 0) return false
|
||||
|
||||
// 如果没有选中任何行,所有行可选
|
||||
if (this.selectedList1.length === 0) return true
|
||||
|
||||
// 已经选中一行,只能继续选择这一行
|
||||
return this.selectedList1.includes(row)
|
||||
},
|
||||
|
||||
// 通用过滤方法
|
||||
filterList(list, queryParams) {
|
||||
return list.filter(item => {
|
||||
const nameOk = !queryParams.proName || (item.proName || '').includes(queryParams.proName)
|
||||
const codeOk = !queryParams.agreementCode || (item.agreementCode || '').includes(queryParams.agreementCode)
|
||||
const unitNameOk = !queryParams.unitName || String(item.unitName || '').includes(queryParams.unitName)
|
||||
return nameOk && codeOk && unitNameOk
|
||||
})
|
||||
},
|
||||
handleQuery(type) {
|
||||
if (type === 1) {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getProList()
|
||||
} else if (type === 2) {
|
||||
this.searchResult2 = this.filterList(this.tableList2, this.queryParams2)
|
||||
} else if (type === 3) {
|
||||
this.queryParams3.pageNum = 1
|
||||
this.getProList2()
|
||||
} else if (type === 4) {
|
||||
this.searchResult4 = this.filterList(this.tableList4, this.queryParams4)
|
||||
}
|
||||
},
|
||||
|
||||
handleReset(type) {
|
||||
if (type === 1) {
|
||||
this.$refs.queryForm.resetFields()
|
||||
this.searchResult1 = null
|
||||
this.getProList()
|
||||
} else if (type === 2) {
|
||||
this.$refs.queryForm3.resetFields()
|
||||
this.searchResult2 = null
|
||||
} else if (type === 3) {
|
||||
this.$refs.queryForm3.resetFields()
|
||||
this.searchResult3 = null
|
||||
this.getProList2()
|
||||
} else if (type === 4) {
|
||||
this.$refs.queryForm4.resetFields()
|
||||
this.searchResult4 = null
|
||||
}
|
||||
},
|
||||
|
||||
async getProList() {
|
||||
try {
|
||||
this.isLoading = true
|
||||
const res = await getAgreementListApi(this.queryParams)
|
||||
console.log('🚀 ~ getProList ~ res:', res)
|
||||
this.tableList1 = res.rows || []
|
||||
this.total = res.total || 0
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getProList ~ error:', error)
|
||||
} finally {
|
||||
this.isLoading = false
|
||||
}
|
||||
},
|
||||
async getProList2() {
|
||||
try {
|
||||
this.isLoading = true
|
||||
const res = await getAgreementListApi(this.queryParams3)
|
||||
console.log('🚀 ~ getProList ~ res:', res)
|
||||
this.tableList3 = res.rows || []
|
||||
this.total3 = res.total || 0
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getProList ~ error:', error)
|
||||
} finally {
|
||||
this.isLoading = false
|
||||
}
|
||||
},
|
||||
handleSelectChange1(e) {
|
||||
console.log('🚀 ~ handleSelectChange1 ~ e:', e)
|
||||
if (e.length > 1) {
|
||||
const first = e[0]
|
||||
this.$refs.table1.clearSelection()
|
||||
this.$refs.table1.toggleRowSelection(first, true)
|
||||
this.selectedList1 = [first]
|
||||
this.$message.warning('只能选择一个工程')
|
||||
} else {
|
||||
this.selectedList1 = e
|
||||
}
|
||||
},
|
||||
handleSelectChange2(e) {
|
||||
console.log('🚀 ~ handleSelectChange1 ~ e:', e)
|
||||
this.selectedList2 = e
|
||||
},
|
||||
handleSelectChange3(e) {
|
||||
console.log('🚀 ~ handleSelectChange1 ~ e:', e)
|
||||
this.selectedList3 = e
|
||||
},
|
||||
handleSelectChange4(e) {
|
||||
console.log('🚀 ~ handleSelectChange1 ~ e:', e)
|
||||
this.selectedList4 = e
|
||||
},
|
||||
handleAdd1() {
|
||||
this.tableList2.unshift(...this.selectedList1)
|
||||
this.tableList1 = this.tableList1.filter(item => !this.selectedList1.includes(item))
|
||||
if (this.searchResult1 !== null) {
|
||||
this.searchResult1 = this.searchResult1.filter(item => !this.selectedList1.includes(item))
|
||||
}
|
||||
},
|
||||
handleDelete1() {
|
||||
this.tableList1.unshift(...this.selectedList2)
|
||||
this.tableList2 = this.tableList2.filter(item => !this.selectedList2.includes(item))
|
||||
if (this.searchResult1 !== null) {
|
||||
this.searchResult1.unshift(...this.selectedList2)
|
||||
}
|
||||
if (this.searchResult2 !== null) {
|
||||
this.searchResult2 = this.searchResult2.filter(item => !this.selectedList2.includes(item))
|
||||
}
|
||||
},
|
||||
handleAdd2() {
|
||||
this.tableList4.unshift(...this.selectedList3)
|
||||
this.tableList3 = this.tableList3.filter(item => !this.selectedList3.includes(item))
|
||||
if (this.searchResult3 !== null) {
|
||||
this.searchResult3 = this.searchResult3.filter(item => !this.selectedList3.includes(item))
|
||||
}
|
||||
},
|
||||
handleDelete2() {
|
||||
this.tableList3.unshift(...this.selectedList4)
|
||||
this.tableList4 = this.tableList4.filter(item => !this.selectedList4.includes(item))
|
||||
if (this.searchResult3 !== null) {
|
||||
this.searchResult3.unshift(...this.selectedList4)
|
||||
}
|
||||
if (this.searchResult4 !== null) {
|
||||
this.searchResult4 = this.searchResult4.filter(item => !this.selectedList4.includes(item))
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
if (this.tableList2.length == 0 || this.tableList4.length == 0) {
|
||||
this.$message.error('请选择要合并的工程!')
|
||||
return
|
||||
}
|
||||
// 弹框确认
|
||||
this.$confirm('是否确认提交?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const loading = this.$loading()
|
||||
try {
|
||||
if (this.isSubmit) return
|
||||
this.isSubmit = true
|
||||
const oldAgreementIds = this.tableList4.map(item => item.agreementId)
|
||||
console.log('🚀 ~ submit ~ oldAgreementIds:', oldAgreementIds)
|
||||
const newAgreement = this.tableList2[0]
|
||||
console.log('🚀 ~ submit ~ newAgreement:', newAgreement)
|
||||
await combineAgreementApi({
|
||||
oldAgreementIds,
|
||||
agreementId: newAgreement.agreementId,
|
||||
unitId: newAgreement.unitId,
|
||||
proId: newAgreement.proId
|
||||
})
|
||||
this.tableList1 = []
|
||||
this.tableList2 = []
|
||||
this.tableList3 = []
|
||||
this.tableList4 = []
|
||||
this.selectedList1 = []
|
||||
this.selectedList2 = []
|
||||
this.selectedList3 = []
|
||||
this.selectedList4 = []
|
||||
// 确定
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '操作成功!'
|
||||
})
|
||||
this.getProList()
|
||||
this.getProList2()
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ submit ~ error:', error)
|
||||
} finally {
|
||||
this.isSubmit = false
|
||||
loading.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.row-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
.item-center {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<span>退料时间:</span>
|
||||
<span>{{ rowObj.createTime }}</span>
|
||||
<span>{{ backApplyInfo.createTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" style="width: 50%; flex-shrink: 0; margin-bottom: 5px; font-size: 14px; text-align: right">
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
<div style="width: 30%">审核人:</div>
|
||||
<div
|
||||
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
|
||||
v-if="backApplyInfo.approveSignList.length > 0"
|
||||
v-if="backApplyInfo.approveSignList && backApplyInfo.approveSignList.length > 0"
|
||||
>
|
||||
<div
|
||||
style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)"
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<span>退料时间:</span>
|
||||
<span>{{ rowObj.createTime }}</span>
|
||||
<span>{{ backApplyInfo.createTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
|
@ -206,7 +206,7 @@
|
|||
<div style="width: 30%">审核人:</div>
|
||||
<div
|
||||
style="width: 70%; display: flex; align-items: center; flex-wrap: wrap"
|
||||
v-if="backApplyInfo.approveSignList.length > 0"
|
||||
v-if="backApplyInfo.approveSignList && backApplyInfo.approveSignList.length > 0"
|
||||
>
|
||||
<div
|
||||
style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)"
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@
|
|||
icon="el-icon-document"
|
||||
@click="handleDialog(row.directId)"
|
||||
>
|
||||
退料单
|
||||
直转单
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,43 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<div v-if="auditingList.length > 0" style="margin-top: 20px">
|
||||
<!-- 签名 -->
|
||||
<div class="fillIn" style="margin-top: 50px; display: flex; justify-content: space-between">
|
||||
<div class="item" style="width: 50%; display: flex; align-items: flex-start">
|
||||
<div style="width: 25%">发起:</div>
|
||||
<div style="width: 75%; margin-left: 20px; transform: translateY(-30px)" v-if="leaseApplyData && leaseApplyData.outSignUrl">
|
||||
<img
|
||||
:src="leaseApplyData.outSignUrl"
|
||||
style="width: 40px; height: 90px; max-width: 100%"
|
||||
:style="{ transform: leaseApplyData.outSignType == 0 ? 'rotate(-90deg)' : '' }"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" style="width: 50%; display: flex; align-items: flex-start; flex-wrap: wrap">
|
||||
<div style="width: 25%">审核:</div>
|
||||
<div
|
||||
style="width: 75%; display: flex; align-items: center; flex-wrap: wrap"
|
||||
v-if="approveSignList.length > 0"
|
||||
>
|
||||
<div
|
||||
style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)"
|
||||
v-for="(item, index) in approveSignList"
|
||||
:key="index"
|
||||
>
|
||||
<img
|
||||
:src="item.outSignUrl"
|
||||
style="width: 40px; height: 90px; max-width: 100%"
|
||||
:style="{ transform: item.outSignType == 0 ? 'rotate(-90deg)' : '' }"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 流程 -->
|
||||
<!-- <div v-if="auditingList.length > 0" style="margin-top: 20px">
|
||||
<div>流程记录</div>
|
||||
<div class="process-record">
|
||||
<el-steps>
|
||||
|
|
@ -95,7 +131,7 @@
|
|||
</el-step>
|
||||
</el-steps>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</vue-easy-print>
|
||||
</div>
|
||||
|
||||
|
|
@ -109,7 +145,7 @@
|
|||
|
||||
<script>
|
||||
import { receiveDetail } from '@/api/business/index.js'
|
||||
import { getInfoApi } from '@/api/materialsStation/index'
|
||||
import { getInfoApi, getApproveListApi } from '@/api/materialsStation/index'
|
||||
import { getAuditingDetailsApi } from '@/api/receive-apply/index.js'
|
||||
import vueEasyPrint from 'vue-easy-print'
|
||||
import printJS from 'print-js'
|
||||
|
|
@ -132,7 +168,9 @@ export default {
|
|||
{ label: '领料日期', prop: 'startTime' }
|
||||
],
|
||||
tableList: [],
|
||||
auditingList: [] // 流程记录
|
||||
auditingList: [], // 流程记录
|
||||
leaseApplyData: {},
|
||||
approveSignList: [] // 审核签名
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -142,7 +180,8 @@ export default {
|
|||
this.dialogVisible = true
|
||||
setTimeout(() => {
|
||||
this.getTaskInfo()
|
||||
this.getLeaseTaskDetailFun()
|
||||
// this.getLeaseTaskDetailFun()
|
||||
this.getSignList()
|
||||
}, 100)
|
||||
},
|
||||
print() {
|
||||
|
|
@ -175,6 +214,20 @@ export default {
|
|||
const result = await getAuditingDetailsApi({ taskId: this.rowId, taskType })
|
||||
console.log('result', result)
|
||||
this.auditingList = result.rows
|
||||
},
|
||||
// 获取签名
|
||||
async getSignList() {
|
||||
try {
|
||||
const res = await getApproveListApi({ id: this.rowId })
|
||||
console.log('🚀 ~ getSignList ~ res:', res)
|
||||
if (res.data.approveSignList && res.data.approveSignList.length > 1) {
|
||||
this.leaseApplyData = res.data.approveSignList[0]
|
||||
this.approveSignList = res.data.approveSignList.slice(1).filter(item => item != null && item !== '')
|
||||
}
|
||||
console.log('🚀 ~ getSignList ~ this.approveSignList:', this.approveSignList)
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getSignList ~ error:', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,12 +106,12 @@
|
|||
<div class="order_footer">
|
||||
<!-- <div>审核人:</div> -->
|
||||
<div class="item" style="width: 50%; display: flex; align-items: center; flex-wrap: wrap">
|
||||
<div style="width: 35%">审核人:</div>
|
||||
<div style="width: 35%">收料人:</div>
|
||||
<div
|
||||
style="width: 65%; display: flex; align-items: center; flex-wrap: wrap"
|
||||
v-if="approveSignList.length > 0"
|
||||
>
|
||||
<div style="width: 80%; margin-left: 10px" v-for="(item, index) in approveSignList" :key="index">
|
||||
<div style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)" v-for="(item, index) in approveSignList" :key="index">
|
||||
<img
|
||||
:src="item.outSignUrl"
|
||||
style="width: 40px; height: 100px; max-width: 100%"
|
||||
|
|
@ -124,11 +124,11 @@
|
|||
<div class="item" style="width: 50%; display: flex; align-items: center; flex-wrap: wrap">
|
||||
<div style="width: 35%">退料人:</div>
|
||||
<div style="width: 65%; display: flex; align-items: center; flex-wrap: wrap" v-if="backSignUrl">
|
||||
<div style="width: 80%; margin-left: 10px">
|
||||
<div style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)">
|
||||
<img
|
||||
:src="backSignUrl"
|
||||
style="width: 40px; height: 100px; max-width: 100%"
|
||||
:style="{transform: item.outSignType == 0 ? 'rotate(-90deg)' : ''}"
|
||||
:style="{transform: backSignType == 0 ? 'rotate(-90deg)' : ''}"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -203,12 +203,12 @@
|
|||
|
||||
<div class="order_footer">
|
||||
<div class="item" style="width: 28%; display: flex; align-items: center; flex-wrap: wrap">
|
||||
<div style="width: 35%">审核人:</div>
|
||||
<div style="width: 35%">收料人:</div>
|
||||
<div
|
||||
style="width: 65%; display: flex; align-items: center; flex-wrap: wrap"
|
||||
v-if="approveSignList.length > 0"
|
||||
>
|
||||
<div style="width: 80%; margin-left: 10px" v-for="(item, index) in approveSignList" :key="index">
|
||||
<div style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)" v-for="(item, index) in approveSignList" :key="index">
|
||||
<img
|
||||
:src="item.outSignUrl"
|
||||
style="width: 40px; height: 100px; max-width: 100%"
|
||||
|
|
@ -221,11 +221,11 @@
|
|||
<div class="item" style="width: 24%; display: flex; align-items: center; flex-wrap: wrap">
|
||||
<div style="width: 35%">退料人:</div>
|
||||
<div style="width: 65%; display: flex; align-items: center; flex-wrap: wrap" v-if="backSignUrl">
|
||||
<div style="width: 80%; margin-left: 10px">
|
||||
<div style="width: 80%; margin-left: 20px; height: 40px; transform: translateY(-30px)">
|
||||
<img
|
||||
:src="backSignUrl"
|
||||
style="width: 40px; height: 100px; max-width: 100%"
|
||||
:style="{transform: item.outSignType == 0 ? 'rotate(-90deg)' : ''}"
|
||||
:style="{transform: backSignType == 0 ? 'rotate(-90deg)' : ''}"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -299,7 +299,8 @@ export default {
|
|||
open: false,
|
||||
title: '',
|
||||
approveSignList: [],
|
||||
backSignUrl: ''
|
||||
backSignUrl: '',
|
||||
backSignType: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -314,6 +315,7 @@ export default {
|
|||
this.approveSignList = res.data.backApplyInfo.approveSignList
|
||||
console.log('🚀 ~ 审核 ~ this.approveSignList:', this.approveSignList)
|
||||
this.backSignUrl = res.data.backApplyInfo.backSignUrl
|
||||
this.backSignType = res.data.backApplyInfo.backSignType
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
|
|
|
|||
|
|
@ -217,9 +217,12 @@
|
|||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button size="mini" type="warning" v-if="scope.row.taskStatus != 1" @click="handleLld(scope.row)">
|
||||
<el-button size="mini" type="warning" v-if="scope.row.taskStatus != 1 && scope.row.isZz == 0" @click="handleLld(scope.row)">
|
||||
领料单
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" v-if="scope.row.isZz != 0" @click="handleDialog(scope.row.directId)">
|
||||
直转单
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
@ -383,6 +386,9 @@
|
|||
<el-button @click="showView = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 直转单 -->
|
||||
<StraightforwardBills ref="straightforwardBills" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -393,11 +399,12 @@ import { getListLeaseApply, getPickListApi, applyRemove,
|
|||
import {getDeviceType} from "@/api/ma/device";
|
||||
import vueEasyPrint from 'vue-easy-print'
|
||||
import printJS from 'print-js'
|
||||
import StraightforwardBills from '@/views/materialsStation/straight/straightTransferReview/components/StraightforwardBills.vue'
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
dicts: ['clz_lease_apply_task_status', 'ma_type_manage_type'],
|
||||
components: { vueEasyPrint },
|
||||
components: { vueEasyPrint, StraightforwardBills },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -733,7 +740,9 @@ export default {
|
|||
this.leaseApplyData = res.data.leaseApplyInfo
|
||||
this.leaseApplyOutData = res.data.leaseOutSign
|
||||
},
|
||||
|
||||
handleDialog(id) {
|
||||
this.$refs.straightforwardBills.openDialog(id)
|
||||
},
|
||||
//出库检验单打印
|
||||
printCheck() {
|
||||
// printJS({
|
||||
|
|
|
|||
Loading…
Reference in New Issue