新购确认-验收-管理相关模块完善及修改
This commit is contained in:
parent
c4fb1f4b38
commit
fc01f872d9
|
|
@ -53,5 +53,23 @@ export const addArrivalApi = (data) => {
|
|||
return request.post('/task/purchase/arrival/add', data)
|
||||
}
|
||||
|
||||
/** 获取库管员列表 */
|
||||
export const queryNoticePersonList = (data) => {
|
||||
return request.get(`/task/purchase/notice/getUserList`, {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
/** 获取所有用户列表 */
|
||||
export const queryAllPersonList = (data) => {
|
||||
return request.get(`/task/purchase/notice/getAllUser`, {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
/** 发起验收 */
|
||||
export const startReceiveApi = (data) => {
|
||||
return request.post(`/task/purchase/notice/startAccept`, data)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,18 @@ export const queryPurchaseReceiveListApi = (data) => {
|
|||
})
|
||||
}
|
||||
|
||||
/** 新购验收二级页面查询 */
|
||||
export const queryPurchaseReceiveInnerListApi = (data) => {
|
||||
return request.get('/task/purchase/acceptance/details', {
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
/** 新购验收二级页面验收通过 */
|
||||
export const qualifyReceiveInnerApi = (data) => {
|
||||
return request.post('/task/purchase/acceptance/approve', data)
|
||||
}
|
||||
|
||||
/** 查询状态下拉 */
|
||||
export const queryStatusSelApi = (data) => {
|
||||
return request.get('/base/tree/getStatus', {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
:options="item.f_selList"
|
||||
:props="item.optionProps"
|
||||
:show-all-levels="false"
|
||||
@change="handleCas($event, item.f_model, cascaderFunc, extraTableProp)"
|
||||
@change="handleCasAdd($event, item.f_model, cascaderFunc, extraTableProp)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-cascader
|
||||
|
|
@ -54,6 +54,7 @@
|
|||
:options="item.f_selList"
|
||||
:props="item.optionProps"
|
||||
:show-all-levels="false"
|
||||
@change="handleCas($event, item.f_model)"
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-date-picker
|
||||
|
|
@ -97,7 +98,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 按钮集群 -->
|
||||
<el-row class="btn-container">
|
||||
<el-row class="btn-container" v-if="showRightTools">
|
||||
<div class="btn-handler">
|
||||
<slot name="btn" :queryParams="queryParams"></slot>
|
||||
</div>
|
||||
|
|
@ -230,6 +231,10 @@ export default {
|
|||
showOperation: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showRightTools: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -370,8 +375,12 @@ export default {
|
|||
this.queryParams.pageSize = 10
|
||||
this.getTableList()
|
||||
},
|
||||
/** 级联选择 */
|
||||
handleCas(e, val) {
|
||||
this.queryParams[val] = e[e.length - 1]
|
||||
},
|
||||
/** 级联选择只选最后一级 */
|
||||
handleCas(
|
||||
handleCasAdd(
|
||||
e,
|
||||
val,
|
||||
func,
|
||||
|
|
|
|||
|
|
@ -66,7 +66,10 @@ export default {
|
|||
queryProjectListApi,
|
||||
deleteProjectApi,
|
||||
getIdList(idList) {
|
||||
this.exportList = idList
|
||||
this.exportList = []
|
||||
idList.forEach(item => {
|
||||
this.exportList.push(item.id)
|
||||
})
|
||||
}
|
||||
},
|
||||
mixins: [commonMixin], // 混入公共方法和数据
|
||||
|
|
@ -78,7 +81,7 @@ export default {
|
|||
// 搜索区表单配置项
|
||||
formLabel,
|
||||
// 表格导出id列表
|
||||
exportList: undefined,
|
||||
exportList: [],
|
||||
// 列表区配置项
|
||||
columnsList,
|
||||
// 弹框区配置项
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
:send-params="transObj"
|
||||
:request-api="queryPurchaseArrivalListInnerApi"
|
||||
:show-sel="false"
|
||||
:show-operation="false"
|
||||
>
|
||||
<!-- <template slot="handle" slot-scope="{ data }">
|
||||
<el-button
|
||||
|
|
@ -22,19 +23,27 @@
|
|||
>
|
||||
</template>-->
|
||||
<template slot="purchaseNum" slot-scope="{ data }">
|
||||
{{ data.purchaseNum / storageDex }}
|
||||
{{ data.purchaseNum / 1000 }}
|
||||
</template>
|
||||
<template slot="purchasePrice" slot-scope="{ data }">
|
||||
{{ data.purchasePrice / priceDex }}
|
||||
{{ data.purchasePrice / 100 }}
|
||||
</template>
|
||||
<template slot="notaxPrice" slot-scope="{ data }">
|
||||
{{ data.notaxPrice / priceDex }}
|
||||
{{ data.notaxPrice / 100 }}
|
||||
</template>
|
||||
<template slot="supplierId" slot-scope="{ data }">
|
||||
{{ data.supplierName }}
|
||||
</template>
|
||||
<template slot="status" slot-scope="{ data }">
|
||||
<span style="color: #D9001B">
|
||||
{{ data.statusName }}
|
||||
</span>
|
||||
</template>
|
||||
<template slot="files" slot-scope="{ data }">
|
||||
<span
|
||||
style="color: #02A7F0; cursor: pointer;"
|
||||
>报告管理</span>
|
||||
</template>
|
||||
</TableModel>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -57,7 +66,7 @@ export default {
|
|||
},
|
||||
},
|
||||
created() {
|
||||
this.transObj = { ['id']: this.editParams['id'] }
|
||||
this.transObj = { ['taskId']: this.editParams['id'] }
|
||||
console.log(this.transObj)
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
<template>
|
||||
<!-- 协议管理 新增、编辑 表单组件 -->
|
||||
<div>
|
||||
<TableModel
|
||||
:columnsList="columnsListNoticeAdd"
|
||||
ref="tableRef"
|
||||
:show-btn-crews="false"
|
||||
:show-right-tools="false"
|
||||
:request-api="queryAllPersonList"
|
||||
@transIdList="getIdList"
|
||||
:show-operation="false"
|
||||
>
|
||||
</TableModel>
|
||||
<div style="margin-top: 50px; display: flex; justify-content: right">
|
||||
<el-button type="primary" size="mini">添加</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
queryAllPersonList
|
||||
} from '@/api/purchase/arrival'
|
||||
export default {
|
||||
name: 'TableNoticeAdd',
|
||||
props: {
|
||||
editParams: {
|
||||
type: Object,
|
||||
default: () => null,
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
columnsListNoticeAdd: [
|
||||
{ t_props: 'userName', t_label: '人员名称', },
|
||||
{ t_props: 'deptName', t_label: '所属机构' },
|
||||
{ t_props: 'userRole', t_label: '角色', },
|
||||
{ t_props: 'phone', t_label: '联系电话', t_width: '150px' },
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
queryAllPersonList,
|
||||
getIdList(idList) {
|
||||
console.log(idList)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-form-item__label{
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
<template>
|
||||
<!-- 协议管理 新增、编辑 表单组件 -->
|
||||
<div>
|
||||
<div style="display: flex; margin-bottom: 20px">
|
||||
<span style="width: 100px; font-size: 16px">通知内容:</span>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="noticeIpt"
|
||||
rows="6"
|
||||
></el-input>
|
||||
</div>
|
||||
<TableModel
|
||||
:columnsList="columnsListNotice"
|
||||
:send-params="transObj"
|
||||
:request-api="queryNoticePersonList"
|
||||
ref="tableRef"
|
||||
:show-sel="false"
|
||||
:show-btn-crews="false"
|
||||
:show-right-tools="false"
|
||||
>
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="delPerson(data)"
|
||||
>删除</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
>上传</el-button
|
||||
>-->
|
||||
</template>
|
||||
</TableModel>
|
||||
<div style="margin-top: 50px; display: flex; justify-content: right">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="addPerson"
|
||||
>人员添加</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="startReceive"
|
||||
>发起验收</el-button>
|
||||
</div>
|
||||
|
||||
<DialogModel
|
||||
:dialogConfig="dialogConfigNoticeAdd"
|
||||
@closeDialogOuter="closeDialogOuterNoticeAdd"
|
||||
>
|
||||
<template slot="outerContent">
|
||||
<!-- 新增以及修改数据的表单组件 -->
|
||||
<TableNoticeAdd
|
||||
/>
|
||||
</template>
|
||||
</DialogModel>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { columnsListNotice } from '../config-notice'
|
||||
import {
|
||||
queryNoticePersonList,
|
||||
startReceiveApi
|
||||
} from '@/api/purchase/arrival'
|
||||
import TableNoticeAdd from './table-notice-add.vue'
|
||||
export default {
|
||||
name: 'TableNotice',
|
||||
props: {
|
||||
editParams: {
|
||||
type: Object,
|
||||
default: () => null,
|
||||
},
|
||||
},
|
||||
components: { TableNoticeAdd },
|
||||
created() {
|
||||
console.log(this.editParams)
|
||||
this.transObj = { ['taskId']: this.editParams['id'] }
|
||||
this.noticeIpt = `各位同事您好,请于2023-11-22在2号库,进行机具验收。验收内容如下:机具类型:${this.editParams.purchaseMaterial}
|
||||
`
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
columnsListNotice,
|
||||
noticeIpt: undefined,
|
||||
transObj: {},
|
||||
/** 弹框配置 */
|
||||
dialogConfigNoticeAdd: {
|
||||
outerWidth: '50%',
|
||||
outerTitle: '',
|
||||
outerVisible: false,
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
queryNoticePersonList,
|
||||
closeDialogOuterNoticeAdd() {
|
||||
this.dialogConfigNoticeAdd.outerVisible = false
|
||||
},
|
||||
addPerson() {
|
||||
this.dialogConfigNoticeAdd.outerVisible = true
|
||||
this.dialogConfigNoticeAdd.outerTitle = '人员添加'
|
||||
},
|
||||
delPerson(data) {
|
||||
console.log(data)
|
||||
this.$modal
|
||||
.confirm('是否确认删除所选择的数据项?')
|
||||
.then(() => {
|
||||
this.$refs.tableRef.tableList.forEach((item, index) => {
|
||||
if(item.id === data.id) {
|
||||
this.$refs.tableRef.tableList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
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 => {})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-form-item__label{
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
export const columnsListDetail = [
|
||||
{ t_props: 'name', t_label: '物资名称', },
|
||||
{ t_props: 'typeId', t_label: '规格型号', t_slot: 'typeId' },
|
||||
{ t_props: 'materialName', t_label: '物资名称', },
|
||||
{ t_props: 'materialModel', t_label: '规格型号', },
|
||||
{ t_props: 'unitName', t_label: '单位' },
|
||||
{ t_props: 'purchaseNum', t_label: '采购数量', t_slot: 'purchaseNum' },
|
||||
{ t_props: 'purchasePrice', t_label: '单价(含税)', t_slot: 'purchasePrice' },
|
||||
{ t_props: 'notaxPrice', t_label: '单价(不含税)', t_slot: 'notaxPrice' },
|
||||
{ t_props: 'taxRate', t_label: '税率', t_slot: 'taxRate' },
|
||||
{ t_props: 'taxRate', t_label: '税率', },
|
||||
{ t_props: 'supplierId', t_label: '物资厂家', t_slot: 'supplierId' },
|
||||
{ t_props: 'productDate', t_label: '出厂日期', t_slot: 'productDate' },
|
||||
{ t_props: 'productDate', t_label: '出厂日期', },
|
||||
{ t_props: 'files', t_label: '相关配套资料', t_slot: 'files' },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
export const columnsListNotice = [
|
||||
{ t_props: 'userName', t_label: '人员名称', },
|
||||
{ t_props: 'deptName', t_label: '所属机构' },
|
||||
{ t_props: 'userRole', t_label: '角色', },
|
||||
{ t_props: 'phone', t_label: '联系电话', t_width: '150px' },
|
||||
]
|
||||
export const dialogConfigNotice = {
|
||||
outerWidth: '60%',
|
||||
outerTitle: '',
|
||||
outerVisible: false,
|
||||
}
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
v-if="data.status === 47"
|
||||
>提交</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
|
|
@ -49,6 +50,13 @@
|
|||
@click="handleDeleteData(data.id, delArrivalApi)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="mini"
|
||||
@click="handleNotice(data)"
|
||||
v-if="data.status === 49"
|
||||
>通知</el-button
|
||||
>
|
||||
</template>
|
||||
<!-- <template slot="picUrl" slot-scope="{ data }">
|
||||
<h4
|
||||
|
|
@ -107,16 +115,31 @@
|
|||
|
||||
</see-detail>
|
||||
|
||||
<DialogModel
|
||||
:dialogConfig="dialogConfigNotice"
|
||||
@closeDialogOuter="closeDialogOuterNotice"
|
||||
>
|
||||
<template slot="outerContent">
|
||||
<!-- 新增以及修改数据的表单组件 -->
|
||||
<TableNotice
|
||||
@closeDialog="closeDialog"
|
||||
:editParams="editParams"
|
||||
/>
|
||||
</template>
|
||||
</DialogModel>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeader from '@/components/pageHeader'
|
||||
import { columnsList, dialogConfig, formLabel } from './config'
|
||||
import { dialogConfigNotice } from './config-notice'
|
||||
import { commonMixin } from '../mixins/common'
|
||||
import FormArrival from './components/form-arrival.vue'
|
||||
import AddArrival from './components/add-arrival.vue'
|
||||
import SeeDetail from './components/see-detail.vue'
|
||||
import TableNotice from './components/table-notice.vue'
|
||||
import {
|
||||
queryPurchaseArrivalListApi,
|
||||
queryTypeListApi,
|
||||
|
|
@ -129,7 +152,7 @@ import {
|
|||
export default {
|
||||
name: 'purchaseArrivalManage',
|
||||
mixins: [commonMixin], // 混入公共方法和数据
|
||||
components: { FormArrival, PageHeader, AddArrival, SeeDetail },
|
||||
components: { FormArrival, PageHeader, AddArrival, SeeDetail, TableNotice },
|
||||
created() {
|
||||
// 查询厂家
|
||||
querySupplierListApi().then(res => {
|
||||
|
|
@ -192,13 +215,16 @@ export default {
|
|||
formLabel,
|
||||
columnsList,
|
||||
dialogConfig,
|
||||
dialogConfigNotice,
|
||||
addDialogTitle: '新建到货管理', // 新建时弹框标题
|
||||
editDialogTitle: '修改到货管理', // 修改时弹框标题
|
||||
factoryRange: [],
|
||||
cascaderRange: [],
|
||||
storageDex: 1000,
|
||||
priceDex: 100,
|
||||
detailParams: undefined
|
||||
detailParams: undefined,
|
||||
// 通知弹框
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,23 @@
|
|||
<el-button type="danger"
|
||||
>驳回</el-button>
|
||||
</template>
|
||||
<template slot="purchasePrice" slot-scope="{ data }">
|
||||
{{ data.purchasePrice / 100 }}
|
||||
</template>
|
||||
<template slot="notaxPrice" slot-scope="{ data }">
|
||||
{{ data.notaxPrice / 100 }}
|
||||
</template>
|
||||
<template slot="purchaseNum" slot-scope="{ data }">
|
||||
{{ data.purchaseNum / 1000 }}
|
||||
</template>
|
||||
<template slot="status" slot-scope="{ data }">
|
||||
{{ data.statusName }}
|
||||
</template>
|
||||
<template slot="files" slot-scope="{ data }">
|
||||
<span
|
||||
style="color: #02A7F0; cursor: pointer;"
|
||||
>报告管理</span>
|
||||
</template>
|
||||
</TableModel>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -51,7 +68,7 @@ export default {
|
|||
components: { Treeselect },
|
||||
created() {
|
||||
console.log(this.sendParams)
|
||||
this.transObj = { ['id']: this.sendParams['id'] }
|
||||
this.transObj = { ['taskId']: this.sendParams['id'] }
|
||||
},
|
||||
mounted() {
|
||||
if (this.editParams) {
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@ export const formLabel = [
|
|||
|
||||
]
|
||||
export const columnsList = [
|
||||
{ t_props: 'arrivalTime', t_label: '物资名称', },
|
||||
{ t_props: 'purchaseCode', t_label: '规格型号' },
|
||||
{ t_props: 'purchaseMaterial', t_label: '单位', },
|
||||
{ t_props: 'materialName', t_label: '物资名称', },
|
||||
{ t_props: 'specificationCode', t_label: '规格型号' },
|
||||
{ t_props: 'unitName', t_label: '单位', },
|
||||
{ t_props: 'purchasePrice', t_label: '购置单价(含税)', t_slot: 'purchasePrice' },
|
||||
{ t_props: 'notaxPrice', t_label: '购置单价(不含税)', t_slot: 'notaxPrice' },
|
||||
{ t_props: 'createBy', t_label: '到货数量' },
|
||||
{ t_props: 'createTime', t_label: '供应商' },
|
||||
{ t_props: 'status', t_label: '出场日期', t_slot: 'status' },
|
||||
{ t_props: 'remark', t_label: '相关配套资料' },
|
||||
|
||||
{ t_props: 'purchaseNum', t_label: '到货数量', t_slot: 'purchaseNum' },
|
||||
{ t_props: 'taxRate', t_label: '税率' },
|
||||
{ t_props: 'supplierName', t_label: '供应商' },
|
||||
{ t_props: 'productDate', t_label: '出厂日期' },
|
||||
{ t_props: 'files', t_label: '相关配套资料', t_slot: 'files' },
|
||||
]
|
||||
export const dialogConfig = {
|
||||
outerWidth: '80%',
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
type="success"
|
||||
size="mini"
|
||||
@click="confirmArrival(data.id)"
|
||||
v-if="data.status === 48"
|
||||
|
|
@ -175,7 +175,6 @@ export default {
|
|||
},
|
||||
toggleDetail(data) {
|
||||
this.transParams = data
|
||||
console.log(this.transParams, '11111')
|
||||
this.isShowComponent = 'table-confirm'
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -62,6 +62,11 @@ export const commonMixin = {
|
|||
this.dialogConfigArrival.outerTitle = this.editDialogTitle
|
||||
this.dialogConfigArrival.outerVisible = true
|
||||
},
|
||||
handleNotice(data) {
|
||||
this.editParams = data
|
||||
this.dialogConfigNotice.outerTitle = '通知'
|
||||
this.dialogConfigNotice.outerVisible = true
|
||||
},
|
||||
/** 导入数据 */
|
||||
handleImportData() {
|
||||
console.log('导入--')
|
||||
|
|
@ -83,6 +88,9 @@ export const commonMixin = {
|
|||
closeDialogOuterArrival() {
|
||||
this.dialogConfigArrival.outerVisible = false
|
||||
},
|
||||
closeDialogOuterNotice() {
|
||||
this.dialogConfigNotice.outerVisible = false
|
||||
},
|
||||
/** 关闭内侧弹框 */
|
||||
closeDialogInner() {
|
||||
this.dialogConfig.innerVisible = false
|
||||
|
|
|
|||
|
|
@ -1,162 +0,0 @@
|
|||
<template>
|
||||
<!-- 往来单位 新增、编辑 表单组件 -->
|
||||
<div>
|
||||
<el-form
|
||||
label-width="100px"
|
||||
size="medium"
|
||||
ref="contactUnitsParamsRef"
|
||||
:model="storageConfigParams"
|
||||
:rules="storageConfigParamsRules"
|
||||
>
|
||||
<el-form-item label="仓库名称" prop="houseId">
|
||||
<el-select v-model="storageConfigParams.houseId">
|
||||
<el-option
|
||||
v-for="item in storageConfigRange"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资名称" prop="typeId">
|
||||
<treeselect
|
||||
v-model="storageConfigParams.typeId"
|
||||
:options="typeRange"
|
||||
noChildrenText="没有数据了"
|
||||
noOptionsText="没有数据"
|
||||
noResultsText="没有搜索结果"
|
||||
placeholder="请选择所属上级"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" @click="onSubmit">确定</el-button>
|
||||
<el-button
|
||||
@click="
|
||||
() => {
|
||||
this.$emit('closeDialog')
|
||||
}
|
||||
"
|
||||
>取消</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addStorageConfigListApi,
|
||||
updateStorageConfigListApi
|
||||
} from '@/api/material/storageConfig'
|
||||
import {
|
||||
queryStorageListApi
|
||||
} from '@/api/material/storage'
|
||||
import {
|
||||
queryMaTypeTreeListApi
|
||||
} from '@/api/material/type'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
export default {
|
||||
name: 'FormStorage',
|
||||
props: {
|
||||
editParams: {
|
||||
type: Object,
|
||||
default: () => null,
|
||||
},
|
||||
},
|
||||
components: { Treeselect },
|
||||
created() {
|
||||
this.getHouseRange()
|
||||
this.getTypeRange()
|
||||
},
|
||||
mounted() {
|
||||
if (this.editParams) {
|
||||
Object.assign(this.storageConfigParams, this.editParams)
|
||||
this.subSort = 2
|
||||
} else {
|
||||
this.subSort = 1
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
subSort: '', // 提交类型:新增 1 / 修改 2
|
||||
storageConfigParams: {
|
||||
houseId: undefined, // 仓库名称
|
||||
typeId: undefined, // 物资名称
|
||||
},
|
||||
// 仓库下拉选项
|
||||
storageConfigRange: [],
|
||||
// 类型下拉选项
|
||||
typeRange: [],
|
||||
// 校验规则
|
||||
storageConfigParamsRules: {
|
||||
houseId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入仓库名称',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
typeId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择物资名称',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 初始化获取仓库下拉 */
|
||||
getHouseRange() {
|
||||
queryStorageListApi().then(res => {
|
||||
console.log(res)
|
||||
this.storageConfigRange = res.rows.map(item => {
|
||||
return {
|
||||
value: item.id,
|
||||
label: item.name,
|
||||
}
|
||||
})
|
||||
}).catch(err => {})
|
||||
},
|
||||
/** 初始化获取类型下拉 */
|
||||
getTypeRange() {
|
||||
queryMaTypeTreeListApi().then(res => {
|
||||
this.typeRange = res.data
|
||||
}).catch(err => {})
|
||||
},
|
||||
/** 确认按钮 */
|
||||
onSubmit() {
|
||||
this.$refs.contactUnitsParamsRef.validate((valid) => {
|
||||
if (valid) {
|
||||
console.log('校验通过', this.storageConfigParams, this.subSort)
|
||||
// 1. 表单校验通过后调后台 Api
|
||||
if(this.subSort === 1) {
|
||||
addStorageConfigListApi(this.storageConfigParams).then(res => {
|
||||
console.log(res)
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
}).catch(err => {})
|
||||
} else if(this.subSort === 2) {
|
||||
updateStorageConfigListApi(this.storageConfigParams).then(res => {
|
||||
console.log(res)
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
}).catch(err => {})
|
||||
}
|
||||
// 2. 成功之后通知父组件关闭弹框
|
||||
this.$emit('closeDialog', true)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-form-item__label{
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
<template>
|
||||
<!-- 往来单位 新增、编辑 表单组件 -->
|
||||
<div>
|
||||
<TableModel
|
||||
:formLabel="formLabel"
|
||||
:columnsList="columnsList"
|
||||
ref="tableRef"
|
||||
style="display: flex; flex-direction: column"
|
||||
:send-params="transObj"
|
||||
:request-api="queryPurchaseReceiveInnerListApi"
|
||||
@transIdList="getIdList"
|
||||
>
|
||||
<template slot="btn" slot-scope="{ queryParams }">
|
||||
<el-button type="success" @click="multiQualify"
|
||||
>合格</el-button>
|
||||
<el-button type="danger"
|
||||
>不合格</el-button>
|
||||
</template>
|
||||
<template slot="purchasePrice" slot-scope="{ data }">
|
||||
{{ data.purchasePrice / 100 }}
|
||||
</template>
|
||||
<template slot="notaxPrice" slot-scope="{ data }">
|
||||
{{ data.notaxPrice / 100 }}
|
||||
</template>
|
||||
<template slot="purchaseNum" slot-scope="{ data }">
|
||||
{{ data.purchaseNum / 1000 }}
|
||||
</template>
|
||||
<template slot="status" slot-scope="{ data }">
|
||||
{{ data.statusName }}
|
||||
</template>
|
||||
<template slot="files" slot-scope="{ data }">
|
||||
<span
|
||||
style="color: #02A7F0; cursor: pointer;"
|
||||
>报告管理</span>
|
||||
</template>
|
||||
<template slot="handle" slot-scope="{ data }">
|
||||
<!-- <el-button
|
||||
type="warning"
|
||||
size="mini"
|
||||
>解绑</el-button
|
||||
>-->
|
||||
<el-button
|
||||
type="success"
|
||||
size="mini"
|
||||
@click="toggleQualified(data.purchaseId)"
|
||||
>合格</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
>不合格</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="handleDeleteData(data.id, delStorageConfigListApi)"
|
||||
>删除</el-button
|
||||
>-->
|
||||
</template>
|
||||
</TableModel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { columnsList } from '../config-receive-detail'
|
||||
import {
|
||||
queryPurchaseReceiveInnerListApi,
|
||||
qualifyReceiveInnerApi
|
||||
} from '@/api/purchase/receive'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
export default {
|
||||
name: 'FormStorage',
|
||||
props: {
|
||||
editParams: {
|
||||
type: Object,
|
||||
default: () => null,
|
||||
},
|
||||
sendParams: {
|
||||
type: Object,
|
||||
default: () => null,
|
||||
},
|
||||
sendRange: {
|
||||
type: Array,
|
||||
default: () => null
|
||||
},
|
||||
sendCascader: {
|
||||
type: Array,
|
||||
default: () => null
|
||||
}
|
||||
},
|
||||
components: { Treeselect },
|
||||
created() {
|
||||
console.log(this.sendParams)
|
||||
this.transObj = { ['id']: this.sendParams['id'] }
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formLabel: [
|
||||
{ f_label: '类型规格', f_model: 'typeId', f_type: 'selCas', f_selList: this.sendCascader },
|
||||
{ f_label: '机具厂家', f_model: 'supplierId', f_type: 'sel', f_selList: this.sendRange },
|
||||
{ f_label: '出厂日期', f_model: 'productDate', f_type: 'date' },
|
||||
],
|
||||
columnsList,
|
||||
transObj: {},
|
||||
multiQualifyList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryPurchaseReceiveInnerListApi,
|
||||
getIdList(list) {
|
||||
console.log(list)
|
||||
this.multiQualifyList = list
|
||||
},
|
||||
// 单个通过
|
||||
toggleQualified(purchaseId) {
|
||||
console.log(purchaseId)
|
||||
qualifyReceiveInnerApi({
|
||||
purchaseId
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.$modal.msgSuccess('提交成功')
|
||||
this.$refs.tableRef.getTableList()
|
||||
}).catch(err => {})
|
||||
},
|
||||
// 批量通过
|
||||
multiQualify() {
|
||||
if(this.multiQualifyList.length === 0) {
|
||||
this.$modal.msgError('请选择需要批量通过的数据')
|
||||
} else {
|
||||
let subList = []
|
||||
this.multiQualifyList.forEach(item => {
|
||||
subList.push(item.purchaseId)
|
||||
})
|
||||
// 请求
|
||||
subList = subList.join()
|
||||
qualifyReceiveInnerApi({
|
||||
purchaseId: subList
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
this.$modal.msgSuccess('提交成功')
|
||||
this.$refs.tableRef.getTableList()
|
||||
}).catch(err => {})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .el-select {
|
||||
width: 100%;
|
||||
}
|
||||
::v-deep .el-form-item__label{
|
||||
font-weight: normal;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
export const formLabel = [
|
||||
{ f_label: '类型规格', f_model: 'keyWord', f_type: 'ipt' },
|
||||
{ f_label: '机具厂家', f_model: 'keyWord', f_type: 'ipt' },
|
||||
{ f_label: '出厂日期', f_model: 'keyWord', f_type: 'ipt' },
|
||||
|
||||
]
|
||||
export const columnsList = [
|
||||
{ t_props: 'materialName', t_label: '物资名称', },
|
||||
{ t_props: 'specificationCode', t_label: '规格型号' },
|
||||
{ t_props: 'unitName', t_label: '单位', },
|
||||
{ t_props: 'purchasePrice', t_label: '购置单价(含税)', t_slot: 'purchasePrice' },
|
||||
{ t_props: 'notaxPrice', t_label: '购置单价(不含税)', t_slot: 'notaxPrice' },
|
||||
{ t_props: 'purchaseNum', t_label: '到货数量', t_slot: 'purchaseNum' },
|
||||
{ t_props: 'taxRate', t_label: '税率' },
|
||||
{ t_props: 'supplierName', t_label: '供应商' },
|
||||
{ t_props: 'productDate', t_label: '出厂日期' },
|
||||
{ t_props: 'files', t_label: '相关配套资料', t_slot: 'files' },
|
||||
{ t_props: 'status', t_label: '验收结论', t_slot: 'status' },
|
||||
]
|
||||
export const dialogConfig = {
|
||||
outerWidth: '80%',
|
||||
outerTitle: '',
|
||||
outerVisible: false,
|
||||
}
|
||||
|
|
@ -1,10 +1,25 @@
|
|||
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: 'status', f_type: 'ipt' },
|
||||
{ f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: [] },
|
||||
]
|
||||
|
||||
export const columnsList = [
|
||||
{ t_props: 'arrivalTime', t_label: '到货时间', },
|
||||
{ t_props: 'purchaseCode', t_label: '采购单号' },
|
||||
|
|
|
|||
|
|
@ -1,12 +1,18 @@
|
|||
<template>
|
||||
<!-- 往来单位管理页面 -->
|
||||
<div class="app-container">
|
||||
<PageHeader
|
||||
v-if="isShowComponent !== 'Index'"
|
||||
:pageContent="pageContent"
|
||||
@goBack="goBack"
|
||||
/>
|
||||
<!-- 列表 -->
|
||||
<TableModel
|
||||
:formLabel="formLabel"
|
||||
:columnsList="columnsList"
|
||||
:request-api="queryPurchaseReceiveListApi"
|
||||
ref="tableRef"
|
||||
v-if="isShowComponent === 'Index'"
|
||||
>
|
||||
<template slot="btn" slot-scope="{ queryParams }">
|
||||
<el-button type="success" @click="handleAddData()"
|
||||
|
|
@ -23,18 +29,23 @@
|
|||
size="mini"
|
||||
>解绑</el-button
|
||||
>-->
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
>查看</el-button
|
||||
>-->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleEditData(data)"
|
||||
>编辑</el-button
|
||||
@click="toggleDetail(data)"
|
||||
>验收</el-button
|
||||
>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="handleDeleteData(data.id, delStorageConfigListApi)"
|
||||
>删除</el-button
|
||||
>
|
||||
>-->
|
||||
</template>
|
||||
<!-- <template slot="isActive" slot-scope="{ data }">
|
||||
{{ data.isActive == '1' ? '启用' : '不启用' }}
|
||||
|
|
@ -59,61 +70,109 @@
|
|||
</TableModel>
|
||||
|
||||
<!-- 新增以及修改时的弹框 -->
|
||||
<DialogModel
|
||||
<!-- <DialogModel
|
||||
:dialogConfig="dialogConfig"
|
||||
@closeDialogOuter="closeDialogOuter"
|
||||
>
|
||||
<template slot="outerContent">
|
||||
<!-- 新增以及修改数据的表单组件 -->
|
||||
<!– 新增以及修改数据的表单组件 –>
|
||||
<FormReceive
|
||||
@closeDialog="closeDialog"
|
||||
:editParams="editParams"
|
||||
/>
|
||||
</template>
|
||||
</DialogModel>
|
||||
</DialogModel>-->
|
||||
|
||||
<receive-detail
|
||||
v-if="isShowComponent === 'receive-detail'"
|
||||
:send-params="transParams"
|
||||
:send-range="factoryRange"
|
||||
:send-cascader="cascaderRange"
|
||||
>
|
||||
|
||||
</receive-detail>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { columnsList, dialogConfig } from './config'
|
||||
import { formLabel, columnsList, dialogConfig, queryStatusSelData } from './config'
|
||||
import { commonMixin } from '../mixins/common'
|
||||
import FormReceive from './components/form-receive.vue'
|
||||
import ReceiveDetail from './components/receive-detail.vue'
|
||||
import {
|
||||
queryPurchaseReceiveListApi,
|
||||
queryStatusSelApi
|
||||
} from '@/api/purchase/receive'
|
||||
import {
|
||||
querySupplierListApi
|
||||
} from '@/api/material/masupplier'
|
||||
import {
|
||||
queryTypeListApi
|
||||
} from '@/api/purchase/arrival'
|
||||
import PageHeader from '@/components/pageHeader/index.vue'
|
||||
import TableConfirm from '@/views/purchase/confirm/components/table-confirm.vue'
|
||||
export default {
|
||||
name: 'arrivalReceiveManage',
|
||||
mixins: [commonMixin], // 混入公共方法和数据
|
||||
components: { FormReceive },
|
||||
components: { TableConfirm, PageHeader, ReceiveDetail },
|
||||
methods: {
|
||||
queryPurchaseReceiveListApi,
|
||||
queryStatusSelApi
|
||||
},
|
||||
beforeCreate() {
|
||||
|
||||
goBack() {
|
||||
this.isShowComponent = 'Index'
|
||||
},
|
||||
toggleDetail(data) {
|
||||
console.log(data)
|
||||
this.transParams = data
|
||||
this.isShowComponent = 'receive-detail'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
queryStatusSelData()
|
||||
// 查询厂家
|
||||
querySupplierListApi().then(res => {
|
||||
this.factoryRange = res.rows.map(item => {
|
||||
return {
|
||||
label: item.name,
|
||||
value: item.id
|
||||
}
|
||||
})
|
||||
}).catch(err => {})
|
||||
// 查询物资规格
|
||||
queryTypeListApi().then(res => {
|
||||
res.data.forEach(lv1 => {
|
||||
if(!lv1.children) {
|
||||
lv1.disabled = true
|
||||
} else {
|
||||
lv1.children.forEach(lv2 => {
|
||||
if(!lv2.children) {
|
||||
lv2.disabled = true
|
||||
} else {
|
||||
lv2.children.forEach(lv3 => {
|
||||
if(!lv3.children) {
|
||||
lv3.disabled = true
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.cascaderRange = res.data
|
||||
}).catch(err => {})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
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: 'status', f_type: 'sel', f_selList: this.statusRange },
|
||||
],
|
||||
isShowComponent: 'Index',
|
||||
pageContent: '验收详情',
|
||||
formLabel,
|
||||
columnsList,
|
||||
dialogConfig,
|
||||
addDialogTitle: '新建仓库', // 新建时弹框标题
|
||||
editDialogTitle: '修改仓库', // 修改时弹框标题
|
||||
storageDex: 1000,
|
||||
priceDex: 100,
|
||||
statusRange: undefined
|
||||
transParams: undefined,
|
||||
factoryRange: [],
|
||||
cascaderRange: []
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue