新购确认-验收-管理模块细节完善
This commit is contained in:
parent
fc01f872d9
commit
b8c9339e80
|
|
@ -127,6 +127,7 @@
|
||||||
width="45"
|
width="45"
|
||||||
align="center"
|
align="center"
|
||||||
v-if="showSel"
|
v-if="showSel"
|
||||||
|
:selectable="selectable"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="55"
|
width="55"
|
||||||
|
|
@ -235,6 +236,12 @@ export default {
|
||||||
showRightTools: {
|
showRightTools: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
selectable: {
|
||||||
|
type: Function,
|
||||||
|
default: () => {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -444,7 +451,7 @@ export default {
|
||||||
handleSelectionChange(e) {
|
handleSelectionChange(e) {
|
||||||
this.msgList = e
|
this.msgList = e
|
||||||
this.$emit('transIdList', this.msgList)
|
this.$emit('transIdList', this.msgList)
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -673,9 +673,8 @@ export default {
|
||||||
{ label: '否', value: '0' },
|
{ label: '否', value: '0' },
|
||||||
],
|
],
|
||||||
manageTypeRange: [
|
manageTypeRange: [
|
||||||
{ label: '编码追溯', value: '0' },
|
{ label: '编码', value: '0' },
|
||||||
{ label: '数量 + 编码', value: '1' },
|
{ label: '数量', value: '1' },
|
||||||
{ label: '数量', value: '2' },
|
|
||||||
],
|
],
|
||||||
meterRange: [],
|
meterRange: [],
|
||||||
editLevel: undefined,
|
editLevel: undefined,
|
||||||
|
|
|
||||||
|
|
@ -131,17 +131,21 @@ export default {
|
||||||
startReceive() {
|
startReceive() {
|
||||||
let phoneList = []
|
let phoneList = []
|
||||||
let tableData = this.$refs.tableRef.tableList
|
let tableData = this.$refs.tableRef.tableList
|
||||||
tableData.forEach(item => {
|
if(tableData.length === 0) {
|
||||||
phoneList.push(item.phone)
|
this.$modal.msgError('没有可通知的相关人员,请前往添加')
|
||||||
})
|
} else {
|
||||||
// 开始验收
|
tableData.forEach(item => {
|
||||||
startReceiveApi({
|
phoneList.push(item.phone)
|
||||||
taskId: this.editParams.id,
|
})
|
||||||
phoneArray: phoneList
|
// 开始验收
|
||||||
}).then(res => {
|
startReceiveApi({
|
||||||
this.$modal.msgSuccess('发送成功')
|
taskId: this.editParams.id,
|
||||||
this.closeDialogOuterNoticeAdd()
|
phoneArray: phoneList
|
||||||
}).catch(err => {})
|
}).then(res => {
|
||||||
|
this.$modal.msgSuccess('发送成功')
|
||||||
|
this.closeDialogOuterNoticeAdd()
|
||||||
|
}).catch(err => {})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,23 @@
|
||||||
|
import {
|
||||||
|
queryStatusSelApi
|
||||||
|
} from '@/api/purchase/receive'
|
||||||
|
|
||||||
|
export const queryStatusSelData = () => {
|
||||||
|
queryStatusSelApi().then(res => {
|
||||||
|
formLabel[3].f_selList = res.data.data.map(item => {
|
||||||
|
return {
|
||||||
|
label: item.dictLabel,
|
||||||
|
value: item.dictCode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export const formLabel = [
|
export const formLabel = [
|
||||||
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
|
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
|
||||||
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
|
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
|
||||||
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
||||||
{ f_label: '状态', f_model: 'keyWord', f_type: 'ipt' },
|
{ f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: [] },
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'arrivalTime', t_label: '到货时间', },
|
{ t_props: 'arrivalTime', t_label: '到货时间', },
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PageHeader from '@/components/pageHeader'
|
import PageHeader from '@/components/pageHeader'
|
||||||
import { columnsList, dialogConfig, formLabel } from './config'
|
import { columnsList, dialogConfig, formLabel, queryStatusSelData } from './config'
|
||||||
import { dialogConfigNotice } from './config-notice'
|
import { dialogConfigNotice } from './config-notice'
|
||||||
import { commonMixin } from '../mixins/common'
|
import { commonMixin } from '../mixins/common'
|
||||||
import FormArrival from './components/form-arrival.vue'
|
import FormArrival from './components/form-arrival.vue'
|
||||||
|
|
@ -154,6 +154,7 @@ export default {
|
||||||
mixins: [commonMixin], // 混入公共方法和数据
|
mixins: [commonMixin], // 混入公共方法和数据
|
||||||
components: { FormArrival, PageHeader, AddArrival, SeeDetail, TableNotice },
|
components: { FormArrival, PageHeader, AddArrival, SeeDetail, TableNotice },
|
||||||
created() {
|
created() {
|
||||||
|
queryStatusSelData()
|
||||||
// 查询厂家
|
// 查询厂家
|
||||||
querySupplierListApi().then(res => {
|
querySupplierListApi().then(res => {
|
||||||
this.factoryRange = res.rows.map(item => {
|
this.factoryRange = res.rows.map(item => {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,23 @@
|
||||||
|
import {
|
||||||
|
queryStatusSelApi
|
||||||
|
} from '@/api/purchase/receive'
|
||||||
|
|
||||||
|
export const queryStatusSelData = () => {
|
||||||
|
queryStatusSelApi().then(res => {
|
||||||
|
formLabel[3].f_selList = res.data.data.map(item => {
|
||||||
|
return {
|
||||||
|
label: item.dictLabel,
|
||||||
|
value: item.dictCode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export const formLabel = [
|
export const formLabel = [
|
||||||
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
|
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
|
||||||
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
|
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
|
||||||
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
||||||
{ f_label: '状态', f_model: 'keyWord', f_type: 'ipt' },
|
{ f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: [] },
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'arrivalTime', t_label: '到货时间', },
|
{ t_props: 'arrivalTime', t_label: '到货时间', },
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,14 @@
|
||||||
:request-api="queryPurchaseConfirmListApi"
|
:request-api="queryPurchaseConfirmListApi"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
v-if="isShowComponent === 'Index'"
|
v-if="isShowComponent === 'Index'"
|
||||||
|
@transIdList="getIdList"
|
||||||
|
:selectable="(row) => {
|
||||||
|
return row.status === 48
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<template slot="btn" slot-scope="{ queryParams }">
|
<template slot="btn" slot-scope="{ queryParams }">
|
||||||
<el-button type="primary" @click="handleAddData()"
|
<el-button type="success" @click="multiConfirm"
|
||||||
>到货确认</el-button
|
>批量到货确认</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="handleExportData(queryParams, 'base/customer/export', '往来单位清单')"
|
<el-button @click="handleExportData(queryParams, 'base/customer/export', '往来单位清单')"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
|
|
@ -104,7 +108,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { columnsList, dialogConfig, formLabel } from './config'
|
import { columnsList, dialogConfig, formLabel, queryStatusSelData } from './config'
|
||||||
import { commonMixin } from '../mixins/common'
|
import { commonMixin } from '../mixins/common'
|
||||||
import TableConfirm from './components/table-confirm.vue'
|
import TableConfirm from './components/table-confirm.vue'
|
||||||
import {
|
import {
|
||||||
|
|
@ -125,6 +129,7 @@ export default {
|
||||||
mixins: [commonMixin], // 混入公共方法和数据
|
mixins: [commonMixin], // 混入公共方法和数据
|
||||||
components: { AddArrival, PageHeader, TableConfirm },
|
components: { AddArrival, PageHeader, TableConfirm },
|
||||||
created() {
|
created() {
|
||||||
|
queryStatusSelData()
|
||||||
// 查询厂家
|
// 查询厂家
|
||||||
querySupplierListApi().then(res => {
|
querySupplierListApi().then(res => {
|
||||||
this.factoryRange = res.rows.map(item => {
|
this.factoryRange = res.rows.map(item => {
|
||||||
|
|
@ -163,16 +168,35 @@ export default {
|
||||||
goBack() {
|
goBack() {
|
||||||
this.isShowComponent = 'Index'
|
this.isShowComponent = 'Index'
|
||||||
},
|
},
|
||||||
|
getIdList(list) {
|
||||||
|
this.multiConfirmList = list
|
||||||
|
},
|
||||||
// 到货确认
|
// 到货确认
|
||||||
confirmArrival(id) {
|
confirmArrival(id) {
|
||||||
let idList = []
|
let idList = []
|
||||||
idList.push(id)
|
idList.push(id)
|
||||||
|
// 请求
|
||||||
confirmArrivalApi(idList).then(res => {
|
confirmArrivalApi(idList).then(res => {
|
||||||
console.log(res)
|
|
||||||
this.$modal.msgSuccess('提交成功')
|
this.$modal.msgSuccess('提交成功')
|
||||||
this.$refs.tableRef.getTableList()
|
this.$refs.tableRef.getTableList()
|
||||||
}).catch(err => {})
|
}).catch(err => {})
|
||||||
},
|
},
|
||||||
|
// 批量确认
|
||||||
|
multiConfirm() {
|
||||||
|
if(this.multiConfirmList.length === 0) {
|
||||||
|
this.$modal.msgError('请选择需要批量确认的物资')
|
||||||
|
} else {
|
||||||
|
let idList = []
|
||||||
|
this.multiConfirmList.forEach(item => {
|
||||||
|
idList.push(item.id)
|
||||||
|
})
|
||||||
|
// 请求
|
||||||
|
confirmArrivalApi(idList).then(res => {
|
||||||
|
this.$modal.msgSuccess('提交成功')
|
||||||
|
this.$refs.tableRef.getTableList()
|
||||||
|
}).catch(err => {})
|
||||||
|
}
|
||||||
|
},
|
||||||
toggleDetail(data) {
|
toggleDetail(data) {
|
||||||
this.transParams = data
|
this.transParams = data
|
||||||
this.isShowComponent = 'table-confirm'
|
this.isShowComponent = 'table-confirm'
|
||||||
|
|
@ -191,7 +215,8 @@ export default {
|
||||||
priceDex: 100,
|
priceDex: 100,
|
||||||
transParams: undefined,
|
transParams: undefined,
|
||||||
factoryRange: [],
|
factoryRange: [],
|
||||||
cascaderRange: []
|
cascaderRange: [],
|
||||||
|
multiConfirmList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,14 @@
|
||||||
:request-api="queryPurchaseReceiveListApi"
|
:request-api="queryPurchaseReceiveListApi"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
v-if="isShowComponent === 'Index'"
|
v-if="isShowComponent === 'Index'"
|
||||||
|
@transIdList="getIdList"
|
||||||
|
:selectable="(row) => {
|
||||||
|
return row.status === 50
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<template slot="btn" slot-scope="{ queryParams }">
|
<template slot="btn" slot-scope="{ queryParams }">
|
||||||
<el-button type="success" @click="handleAddData()"
|
<el-button type="success" @click="multiQualify"
|
||||||
>验收合格</el-button
|
>批量验收合格</el-button
|
||||||
>
|
>
|
||||||
<el-button @click="handleExportData(queryParams, 'base/customer/export', '往来单位清单')"
|
<el-button @click="handleExportData(queryParams, 'base/customer/export', '往来单位清单')"
|
||||||
>导出</el-button
|
>导出</el-button
|
||||||
|
|
@ -100,6 +104,7 @@ import { formLabel, columnsList, dialogConfig, queryStatusSelData } from './conf
|
||||||
import { commonMixin } from '../mixins/common'
|
import { commonMixin } from '../mixins/common'
|
||||||
import ReceiveDetail from './components/receive-detail.vue'
|
import ReceiveDetail from './components/receive-detail.vue'
|
||||||
import {
|
import {
|
||||||
|
qualifyReceiveInnerApi,
|
||||||
queryPurchaseReceiveListApi,
|
queryPurchaseReceiveListApi,
|
||||||
queryStatusSelApi
|
queryStatusSelApi
|
||||||
} from '@/api/purchase/receive'
|
} from '@/api/purchase/receive'
|
||||||
|
|
@ -124,6 +129,29 @@ export default {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
this.transParams = data
|
this.transParams = data
|
||||||
this.isShowComponent = 'receive-detail'
|
this.isShowComponent = 'receive-detail'
|
||||||
|
},
|
||||||
|
getIdList(list) {
|
||||||
|
this.multiQualifyList = list
|
||||||
|
},
|
||||||
|
multiQualify() {
|
||||||
|
if(this.multiQualifyList.length === 0) {
|
||||||
|
this.$modal.msgError('请选择需要批量验收通过的数据')
|
||||||
|
} else {
|
||||||
|
let subList = []
|
||||||
|
this.multiQualifyList.forEach(item => {
|
||||||
|
subList.push(item.id)
|
||||||
|
})
|
||||||
|
// 请求
|
||||||
|
subList = subList.join()
|
||||||
|
console.log(subList)
|
||||||
|
qualifyReceiveInnerApi({
|
||||||
|
id: subList
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.$modal.msgSuccess('提交成功')
|
||||||
|
this.$refs.tableRef.getTableList()
|
||||||
|
}).catch(err => {})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -172,7 +200,8 @@ export default {
|
||||||
priceDex: 100,
|
priceDex: 100,
|
||||||
transParams: undefined,
|
transParams: undefined,
|
||||||
factoryRange: [],
|
factoryRange: [],
|
||||||
cascaderRange: []
|
cascaderRange: [],
|
||||||
|
multiQualifyList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue