Merge branch 'dev' of http://192.168.0.56:3000/bonus/ahdevicemgt-ui into dev
This commit is contained in:
commit
05b0f8d110
|
|
@ -53,5 +53,23 @@ export const addArrivalApi = (data) => {
|
||||||
return request.post('/task/purchase/arrival/add', 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) => {
|
export const queryStatusSelApi = (data) => {
|
||||||
return request.get('/base/tree/getStatus', {
|
return request.get('/base/tree/getStatus', {
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
:options="item.f_selList"
|
:options="item.f_selList"
|
||||||
:props="item.optionProps"
|
:props="item.optionProps"
|
||||||
:show-all-levels="false"
|
:show-all-levels="false"
|
||||||
@change="handleCas($event, item.f_model, cascaderFunc, extraTableProp)"
|
@change="handleCasAdd($event, item.f_model, cascaderFunc, extraTableProp)"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
/>
|
/>
|
||||||
<el-cascader
|
<el-cascader
|
||||||
|
|
@ -54,6 +54,7 @@
|
||||||
:options="item.f_selList"
|
:options="item.f_selList"
|
||||||
:props="item.optionProps"
|
:props="item.optionProps"
|
||||||
:show-all-levels="false"
|
:show-all-levels="false"
|
||||||
|
@change="handleCas($event, item.f_model)"
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
/>
|
/>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
|
@ -97,7 +98,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<!-- 按钮集群 -->
|
<!-- 按钮集群 -->
|
||||||
<el-row class="btn-container">
|
<el-row class="btn-container" v-if="showRightTools">
|
||||||
<div class="btn-handler">
|
<div class="btn-handler">
|
||||||
<slot name="btn" :queryParams="queryParams"></slot>
|
<slot name="btn" :queryParams="queryParams"></slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -126,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"
|
||||||
|
|
@ -230,6 +232,16 @@ export default {
|
||||||
showOperation: {
|
showOperation: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
showRightTools: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
selectable: {
|
||||||
|
type: Function,
|
||||||
|
default: () => {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -370,8 +382,12 @@ export default {
|
||||||
this.queryParams.pageSize = 10
|
this.queryParams.pageSize = 10
|
||||||
this.getTableList()
|
this.getTableList()
|
||||||
},
|
},
|
||||||
|
/** 级联选择 */
|
||||||
|
handleCas(e, val) {
|
||||||
|
this.queryParams[val] = e[e.length - 1]
|
||||||
|
},
|
||||||
/** 级联选择只选最后一级 */
|
/** 级联选择只选最后一级 */
|
||||||
handleCas(
|
handleCasAdd(
|
||||||
e,
|
e,
|
||||||
val,
|
val,
|
||||||
func,
|
func,
|
||||||
|
|
@ -435,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)
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,10 @@ export default {
|
||||||
queryProjectListApi,
|
queryProjectListApi,
|
||||||
deleteProjectApi,
|
deleteProjectApi,
|
||||||
getIdList(idList) {
|
getIdList(idList) {
|
||||||
this.exportList = idList
|
this.exportList = []
|
||||||
|
idList.forEach(item => {
|
||||||
|
this.exportList.push(item.id)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [commonMixin], // 混入公共方法和数据
|
mixins: [commonMixin], // 混入公共方法和数据
|
||||||
|
|
@ -78,7 +81,7 @@ export default {
|
||||||
// 搜索区表单配置项
|
// 搜索区表单配置项
|
||||||
formLabel,
|
formLabel,
|
||||||
// 表格导出id列表
|
// 表格导出id列表
|
||||||
exportList: undefined,
|
exportList: [],
|
||||||
// 列表区配置项
|
// 列表区配置项
|
||||||
columnsList,
|
columnsList,
|
||||||
// 弹框区配置项
|
// 弹框区配置项
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
:send-params="transObj"
|
:send-params="transObj"
|
||||||
:request-api="queryPurchaseArrivalListInnerApi"
|
:request-api="queryPurchaseArrivalListInnerApi"
|
||||||
:show-sel="false"
|
:show-sel="false"
|
||||||
|
:show-operation="false"
|
||||||
>
|
>
|
||||||
<!-- <template slot="handle" slot-scope="{ data }">
|
<!-- <template slot="handle" slot-scope="{ data }">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -22,19 +23,27 @@
|
||||||
>
|
>
|
||||||
</template>-->
|
</template>-->
|
||||||
<template slot="purchaseNum" slot-scope="{ data }">
|
<template slot="purchaseNum" slot-scope="{ data }">
|
||||||
{{ data.purchaseNum / storageDex }}
|
{{ data.purchaseNum / 1000 }}
|
||||||
</template>
|
</template>
|
||||||
<template slot="purchasePrice" slot-scope="{ data }">
|
<template slot="purchasePrice" slot-scope="{ data }">
|
||||||
{{ data.purchasePrice / priceDex }}
|
{{ data.purchasePrice / 100 }}
|
||||||
</template>
|
</template>
|
||||||
<template slot="notaxPrice" slot-scope="{ data }">
|
<template slot="notaxPrice" slot-scope="{ data }">
|
||||||
{{ data.notaxPrice / priceDex }}
|
{{ data.notaxPrice / 100 }}
|
||||||
|
</template>
|
||||||
|
<template slot="supplierId" slot-scope="{ data }">
|
||||||
|
{{ data.supplierName }}
|
||||||
</template>
|
</template>
|
||||||
<template slot="status" slot-scope="{ data }">
|
<template slot="status" slot-scope="{ data }">
|
||||||
<span style="color: #D9001B">
|
<span style="color: #D9001B">
|
||||||
{{ data.statusName }}
|
{{ data.statusName }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template slot="files" slot-scope="{ data }">
|
||||||
|
<span
|
||||||
|
style="color: #02A7F0; cursor: pointer;"
|
||||||
|
>报告管理</span>
|
||||||
|
</template>
|
||||||
</TableModel>
|
</TableModel>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -57,7 +66,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.transObj = { ['id']: this.editParams['id'] }
|
this.transObj = { ['taskId']: this.editParams['id'] }
|
||||||
console.log(this.transObj)
|
console.log(this.transObj)
|
||||||
},
|
},
|
||||||
mounted() {
|
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,161 @@
|
||||||
|
<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
|
||||||
|
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 => {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</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 = [
|
export const columnsListDetail = [
|
||||||
{ t_props: 'name', t_label: '物资名称', },
|
{ t_props: 'materialName', t_label: '物资名称', },
|
||||||
{ t_props: 'typeId', t_label: '规格型号', t_slot: 'typeId' },
|
{ t_props: 'materialModel', t_label: '规格型号', },
|
||||||
{ t_props: 'unitName', t_label: '单位' },
|
{ t_props: 'unitName', t_label: '单位' },
|
||||||
{ t_props: 'purchaseNum', t_label: '采购数量', t_slot: 'purchaseNum' },
|
{ t_props: 'purchaseNum', t_label: '采购数量', t_slot: 'purchaseNum' },
|
||||||
{ t_props: 'purchasePrice', t_label: '单价(含税)', t_slot: 'purchasePrice' },
|
{ t_props: 'purchasePrice', t_label: '单价(含税)', t_slot: 'purchasePrice' },
|
||||||
{ t_props: 'notaxPrice', t_label: '单价(不含税)', t_slot: 'notaxPrice' },
|
{ 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: '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' },
|
{ 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,
|
||||||
|
}
|
||||||
|
|
@ -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: '到货时间', },
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
v-if="data.status === 47"
|
v-if="data.status === 47"
|
||||||
>提交</el-button
|
>提交</el-button
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
|
|
@ -49,6 +50,13 @@
|
||||||
@click="handleDeleteData(data.id, delArrivalApi)"
|
@click="handleDeleteData(data.id, delArrivalApi)"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
size="mini"
|
||||||
|
@click="handleNotice(data)"
|
||||||
|
v-if="data.status === 49"
|
||||||
|
>通知</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template slot="picUrl" slot-scope="{ data }">
|
<!-- <template slot="picUrl" slot-scope="{ data }">
|
||||||
<h4
|
<h4
|
||||||
|
|
@ -107,16 +115,31 @@
|
||||||
|
|
||||||
</see-detail>
|
</see-detail>
|
||||||
|
|
||||||
|
<DialogModel
|
||||||
|
:dialogConfig="dialogConfigNotice"
|
||||||
|
@closeDialogOuter="closeDialogOuterNotice"
|
||||||
|
>
|
||||||
|
<template slot="outerContent">
|
||||||
|
<!-- 新增以及修改数据的表单组件 -->
|
||||||
|
<TableNotice
|
||||||
|
@closeDialog="closeDialog"
|
||||||
|
:editParams="editParams"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</DialogModel>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<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 { commonMixin } from '../mixins/common'
|
import { commonMixin } from '../mixins/common'
|
||||||
import FormArrival from './components/form-arrival.vue'
|
import FormArrival from './components/form-arrival.vue'
|
||||||
import AddArrival from './components/add-arrival.vue'
|
import AddArrival from './components/add-arrival.vue'
|
||||||
import SeeDetail from './components/see-detail.vue'
|
import SeeDetail from './components/see-detail.vue'
|
||||||
|
import TableNotice from './components/table-notice.vue'
|
||||||
import {
|
import {
|
||||||
queryPurchaseArrivalListApi,
|
queryPurchaseArrivalListApi,
|
||||||
queryTypeListApi,
|
queryTypeListApi,
|
||||||
|
|
@ -129,8 +152,9 @@ import {
|
||||||
export default {
|
export default {
|
||||||
name: 'purchaseArrivalManage',
|
name: 'purchaseArrivalManage',
|
||||||
mixins: [commonMixin], // 混入公共方法和数据
|
mixins: [commonMixin], // 混入公共方法和数据
|
||||||
components: { FormArrival, PageHeader, AddArrival, SeeDetail },
|
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 => {
|
||||||
|
|
@ -192,13 +216,16 @@ export default {
|
||||||
formLabel,
|
formLabel,
|
||||||
columnsList,
|
columnsList,
|
||||||
dialogConfig,
|
dialogConfig,
|
||||||
|
dialogConfigNotice,
|
||||||
addDialogTitle: '新建到货管理', // 新建时弹框标题
|
addDialogTitle: '新建到货管理', // 新建时弹框标题
|
||||||
editDialogTitle: '修改到货管理', // 修改时弹框标题
|
editDialogTitle: '修改到货管理', // 修改时弹框标题
|
||||||
factoryRange: [],
|
factoryRange: [],
|
||||||
cascaderRange: [],
|
cascaderRange: [],
|
||||||
storageDex: 1000,
|
storageDex: 1000,
|
||||||
priceDex: 100,
|
priceDex: 100,
|
||||||
detailParams: undefined
|
detailParams: undefined,
|
||||||
|
// 通知弹框
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,23 @@
|
||||||
<el-button type="danger"
|
<el-button type="danger"
|
||||||
>驳回</el-button>
|
>驳回</el-button>
|
||||||
</template>
|
</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>
|
</TableModel>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -51,7 +68,7 @@ export default {
|
||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
created() {
|
created() {
|
||||||
console.log(this.sendParams)
|
console.log(this.sendParams)
|
||||||
this.transObj = { ['id']: this.sendParams['id'] }
|
this.transObj = { ['taskId']: this.sendParams['id'] }
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.editParams) {
|
if (this.editParams) {
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,16 @@ export const formLabel = [
|
||||||
|
|
||||||
]
|
]
|
||||||
export const columnsList = [
|
export const columnsList = [
|
||||||
{ t_props: 'arrivalTime', t_label: '物资名称', },
|
{ t_props: 'materialName', t_label: '物资名称', },
|
||||||
{ t_props: 'purchaseCode', t_label: '规格型号' },
|
{ t_props: 'specificationCode', t_label: '规格型号' },
|
||||||
{ t_props: 'purchaseMaterial', t_label: '单位', },
|
{ t_props: 'unitName', t_label: '单位', },
|
||||||
{ t_props: 'purchasePrice', t_label: '购置单价(含税)', t_slot: 'purchasePrice' },
|
{ t_props: 'purchasePrice', t_label: '购置单价(含税)', t_slot: 'purchasePrice' },
|
||||||
{ t_props: 'notaxPrice', t_label: '购置单价(不含税)', t_slot: 'notaxPrice' },
|
{ t_props: 'notaxPrice', t_label: '购置单价(不含税)', t_slot: 'notaxPrice' },
|
||||||
{ t_props: 'createBy', t_label: '到货数量' },
|
{ t_props: 'purchaseNum', t_label: '到货数量', t_slot: 'purchaseNum' },
|
||||||
{ t_props: 'createTime', t_label: '供应商' },
|
{ t_props: 'taxRate', t_label: '税率' },
|
||||||
{ t_props: 'status', t_label: '出场日期', t_slot: 'status' },
|
{ t_props: 'supplierName', t_label: '供应商' },
|
||||||
{ t_props: 'remark', t_label: '相关配套资料' },
|
{ t_props: 'productDate', t_label: '出厂日期' },
|
||||||
|
{ t_props: 'files', t_label: '相关配套资料', t_slot: 'files' },
|
||||||
]
|
]
|
||||||
export const dialogConfig = {
|
export const dialogConfig = {
|
||||||
outerWidth: '80%',
|
outerWidth: '80%',
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -31,7 +35,7 @@
|
||||||
>查看</el-button
|
>查看</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="success"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="confirmArrival(data.id)"
|
@click="confirmArrival(data.id)"
|
||||||
v-if="data.status === 48"
|
v-if="data.status === 48"
|
||||||
|
|
@ -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,19 +168,37 @@ 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
|
||||||
console.log(this.transParams, '11111')
|
|
||||||
this.isShowComponent = 'table-confirm'
|
this.isShowComponent = 'table-confirm'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -192,7 +215,8 @@ export default {
|
||||||
priceDex: 100,
|
priceDex: 100,
|
||||||
transParams: undefined,
|
transParams: undefined,
|
||||||
factoryRange: [],
|
factoryRange: [],
|
||||||
cascaderRange: []
|
cascaderRange: [],
|
||||||
|
multiConfirmList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,11 @@ export const commonMixin = {
|
||||||
this.dialogConfigArrival.outerTitle = this.editDialogTitle
|
this.dialogConfigArrival.outerTitle = this.editDialogTitle
|
||||||
this.dialogConfigArrival.outerVisible = true
|
this.dialogConfigArrival.outerVisible = true
|
||||||
},
|
},
|
||||||
|
handleNotice(data) {
|
||||||
|
this.editParams = data
|
||||||
|
this.dialogConfigNotice.outerTitle = '通知'
|
||||||
|
this.dialogConfigNotice.outerVisible = true
|
||||||
|
},
|
||||||
/** 导入数据 */
|
/** 导入数据 */
|
||||||
handleImportData() {
|
handleImportData() {
|
||||||
console.log('导入--')
|
console.log('导入--')
|
||||||
|
|
@ -83,6 +88,9 @@ export const commonMixin = {
|
||||||
closeDialogOuterArrival() {
|
closeDialogOuterArrival() {
|
||||||
this.dialogConfigArrival.outerVisible = false
|
this.dialogConfigArrival.outerVisible = false
|
||||||
},
|
},
|
||||||
|
closeDialogOuterNotice() {
|
||||||
|
this.dialogConfigNotice.outerVisible = false
|
||||||
|
},
|
||||||
/** 关闭内侧弹框 */
|
/** 关闭内侧弹框 */
|
||||||
closeDialogInner() {
|
closeDialogInner() {
|
||||||
this.dialogConfig.innerVisible = false
|
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 = [
|
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: 'status', 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: '到货时间', },
|
||||||
{ t_props: 'purchaseCode', t_label: '采购单号' },
|
{ t_props: 'purchaseCode', t_label: '采购单号' },
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 往来单位管理页面 -->
|
<!-- 往来单位管理页面 -->
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
<PageHeader
|
||||||
|
v-if="isShowComponent !== 'Index'"
|
||||||
|
:pageContent="pageContent"
|
||||||
|
@goBack="goBack"
|
||||||
|
/>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<TableModel
|
<TableModel
|
||||||
:formLabel="formLabel"
|
:formLabel="formLabel"
|
||||||
:columnsList="columnsList"
|
:columnsList="columnsList"
|
||||||
:request-api="queryPurchaseReceiveListApi"
|
:request-api="queryPurchaseReceiveListApi"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
|
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
|
||||||
|
|
@ -23,18 +33,23 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
>解绑</el-button
|
>解绑</el-button
|
||||||
>-->
|
>-->
|
||||||
|
<!-- <el-button
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
>查看</el-button
|
||||||
|
>-->
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleEditData(data)"
|
@click="toggleDetail(data)"
|
||||||
>编辑</el-button
|
>验收</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleDeleteData(data.id, delStorageConfigListApi)"
|
@click="handleDeleteData(data.id, delStorageConfigListApi)"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>-->
|
||||||
</template>
|
</template>
|
||||||
<!-- <template slot="isActive" slot-scope="{ data }">
|
<!-- <template slot="isActive" slot-scope="{ data }">
|
||||||
{{ data.isActive == '1' ? '启用' : '不启用' }}
|
{{ data.isActive == '1' ? '启用' : '不启用' }}
|
||||||
|
|
@ -59,61 +74,134 @@
|
||||||
</TableModel>
|
</TableModel>
|
||||||
|
|
||||||
<!-- 新增以及修改时的弹框 -->
|
<!-- 新增以及修改时的弹框 -->
|
||||||
<DialogModel
|
<!-- <DialogModel
|
||||||
:dialogConfig="dialogConfig"
|
:dialogConfig="dialogConfig"
|
||||||
@closeDialogOuter="closeDialogOuter"
|
@closeDialogOuter="closeDialogOuter"
|
||||||
>
|
>
|
||||||
<template slot="outerContent">
|
<template slot="outerContent">
|
||||||
<!-- 新增以及修改数据的表单组件 -->
|
<!– 新增以及修改数据的表单组件 –>
|
||||||
<FormReceive
|
<FormReceive
|
||||||
@closeDialog="closeDialog"
|
@closeDialog="closeDialog"
|
||||||
:editParams="editParams"
|
:editParams="editParams"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</DialogModel>
|
</DialogModel>-->
|
||||||
|
|
||||||
|
<receive-detail
|
||||||
|
v-if="isShowComponent === 'receive-detail'"
|
||||||
|
:send-params="transParams"
|
||||||
|
:send-range="factoryRange"
|
||||||
|
:send-cascader="cascaderRange"
|
||||||
|
>
|
||||||
|
|
||||||
|
</receive-detail>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { columnsList, dialogConfig } from './config'
|
import { formLabel, columnsList, dialogConfig, queryStatusSelData } from './config'
|
||||||
import { commonMixin } from '../mixins/common'
|
import { commonMixin } from '../mixins/common'
|
||||||
import FormReceive from './components/form-receive.vue'
|
import ReceiveDetail from './components/receive-detail.vue'
|
||||||
import {
|
import {
|
||||||
|
qualifyReceiveInnerApi,
|
||||||
queryPurchaseReceiveListApi,
|
queryPurchaseReceiveListApi,
|
||||||
queryStatusSelApi
|
queryStatusSelApi
|
||||||
} from '@/api/purchase/receive'
|
} 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 {
|
export default {
|
||||||
name: 'arrivalReceiveManage',
|
name: 'arrivalReceiveManage',
|
||||||
mixins: [commonMixin], // 混入公共方法和数据
|
mixins: [commonMixin], // 混入公共方法和数据
|
||||||
components: { FormReceive },
|
components: { TableConfirm, PageHeader, ReceiveDetail },
|
||||||
methods: {
|
methods: {
|
||||||
queryPurchaseReceiveListApi,
|
queryPurchaseReceiveListApi,
|
||||||
queryStatusSelApi
|
goBack() {
|
||||||
},
|
this.isShowComponent = 'Index'
|
||||||
beforeCreate() {
|
},
|
||||||
|
toggleDetail(data) {
|
||||||
|
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() {
|
created() {
|
||||||
|
queryStatusSelData()
|
||||||
},
|
// 查询厂家
|
||||||
mounted() {
|
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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formLabel: [
|
isShowComponent: 'Index',
|
||||||
{ f_label: '开始时间', f_model: 'startTime', f_type: 'date' },
|
pageContent: '验收详情',
|
||||||
{ f_label: '结束时间', f_model: 'endTime', f_type: 'date' },
|
formLabel,
|
||||||
{ f_label: '关键字', f_model: 'keyWord', f_type: 'ipt' },
|
|
||||||
{ f_label: '状态', f_model: 'status', f_type: 'sel', f_selList: this.statusRange },
|
|
||||||
],
|
|
||||||
columnsList,
|
columnsList,
|
||||||
dialogConfig,
|
dialogConfig,
|
||||||
addDialogTitle: '新建仓库', // 新建时弹框标题
|
addDialogTitle: '新建仓库', // 新建时弹框标题
|
||||||
editDialogTitle: '修改仓库', // 修改时弹框标题
|
editDialogTitle: '修改仓库', // 修改时弹框标题
|
||||||
storageDex: 1000,
|
storageDex: 1000,
|
||||||
priceDex: 100,
|
priceDex: 100,
|
||||||
statusRange: undefined
|
transParams: undefined,
|
||||||
|
factoryRange: [],
|
||||||
|
cascaderRange: [],
|
||||||
|
multiQualifyList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue