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