新购到货-通知人员
This commit is contained in:
parent
ad4572febd
commit
1a16d8d016
|
|
@ -1,6 +1,6 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
//机具类型管理列表信息
|
||||
//新购到货-列表
|
||||
export function getListNewBuy(query) {
|
||||
return request({
|
||||
url: '/material/purchase_check_info/list',
|
||||
|
|
@ -9,7 +9,7 @@ export function getListNewBuy(query) {
|
|||
})
|
||||
}
|
||||
|
||||
//任务 详情
|
||||
//新购到货-二级列表详情
|
||||
export function getPurchaseCheckInfo(query) {
|
||||
return request({
|
||||
url: '/material//purchase_check_info/getInfo',
|
||||
|
|
@ -18,7 +18,7 @@ export function getPurchaseCheckInfo(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 保存--新增
|
||||
// 新购到货-新增
|
||||
export function addPurchaseCheckInfo(data) {
|
||||
return request({
|
||||
url: '/material/purchase_check_info',
|
||||
|
|
@ -27,7 +27,7 @@ export function addPurchaseCheckInfo(data) {
|
|||
})
|
||||
}
|
||||
|
||||
//人员 详情
|
||||
//通知人员列表
|
||||
export function getNoticePeople(query) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/list',
|
||||
|
|
@ -36,7 +36,7 @@ export function getNoticePeople(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// 人员--删除
|
||||
// 通知人员--删除
|
||||
export function delPeople(ids) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/' + ids,
|
||||
|
|
@ -65,10 +65,10 @@ export function bmNoticeInfo(data) {
|
|||
}
|
||||
|
||||
|
||||
//机具类型管理列表信息
|
||||
export function getUserAll() {
|
||||
//通知-添加人员-未选择人员
|
||||
export function getListUnSelected() {
|
||||
return request({
|
||||
url: '/system/user/list',
|
||||
url: '/material/purchase_notice_person/listUnSelected',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@
|
|||
</el-row>
|
||||
|
||||
|
||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="teamId" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="teamId" @selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template slot-scope="scope">
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="taxRateChange"
|
||||
|
||||
/>
|
||||
<span>%</span>
|
||||
</el-form-item>
|
||||
|
|
@ -73,16 +74,9 @@
|
|||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleSave"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleSave" >保存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
|
@ -267,7 +261,6 @@ import {
|
|||
getPurchaseCheckInfo,
|
||||
equipmentTypeTree,
|
||||
addPurchaseCheckInfo,
|
||||
// getPurchaseCheckInfo,
|
||||
updatePurchaseCheckInfo,
|
||||
} from '@/api/purchase/goodsArrived'
|
||||
// import { getUserByRoleList } from '@/api/system/user'
|
||||
|
|
@ -462,6 +455,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
taxRateChange(val){
|
||||
this.maForm.taxRate = val.replace(/[^\d.]/g,'')
|
||||
this.equipmentList.forEach(item=>{
|
||||
item.purchasePrice = item.purchaseNoPrice*(1 + val/100)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['newPurchase:tools:add']"
|
||||
>新增</el-button
|
||||
>设备到货新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
|
@ -100,21 +100,21 @@
|
|||
row-key="id"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column width="60"
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
align="center" width="160"
|
||||
label="到货时间"
|
||||
prop="arrivalTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单号"
|
||||
align="center"
|
||||
label="采购单号" width="150"
|
||||
align="center"
|
||||
prop="code"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
|
@ -168,50 +168,45 @@
|
|||
|
||||
<el-table-column
|
||||
label="操作时间"
|
||||
align="center"
|
||||
align="center" width="160"
|
||||
prop="createTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-zoom-in"
|
||||
size="mini" style="margin-bottom: 10px;"
|
||||
type="normal"
|
||||
@click="handleView(scope.row)"
|
||||
v-if="scope.row.taskStatus != 24"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
size="mini" style="margin-bottom: 10px;"
|
||||
type="primary"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['newPurchase:tools:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
size="mini" style="margin-bottom: 10px;"
|
||||
type="success"
|
||||
@click="handleNotice(scope.row)"
|
||||
v-hasPermi="['newPurchase:tools:edit']"
|
||||
>通知</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
type="warning"
|
||||
@click="handlePrint(scope.row)"
|
||||
>验收单</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['newPurchase:tools:del']"
|
||||
>删除</el-button
|
||||
|
|
@ -409,20 +404,18 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loadingTwo" :data="getListPeople" width="600px" height = "500px" >
|
||||
<el-table :data="getListPeople" width="600px" height="450" >
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
||||
<el-table-column label="人员名称" align="center" prop="userName" sortable/>
|
||||
<el-table-column label="所属机构" align="center" prop="newdeptId" sortable/>
|
||||
<el-table-column label="角色" align="center" prop="userRoleName" sortable/>
|
||||
<el-table-column label="联系电话" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="人员名称" align="center" prop="userName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="所属机构" align="center" prop="deptName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="角色" align="center" prop="roleName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="联系电话" align="center" prop="telphone" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="handleDeletePeople(scope.row)"
|
||||
v-hasPermi="['basic:device:del']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -439,7 +432,7 @@
|
|||
|
||||
<!-- 人员添加 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
title="人员添加"
|
||||
:visible.sync="peopleOpen"
|
||||
v-if="peopleOpen"
|
||||
width="1000px"
|
||||
|
|
@ -457,21 +450,21 @@
|
|||
label="人员账号"
|
||||
align="center"
|
||||
key="userName"
|
||||
prop="userName"
|
||||
prop="userName" width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="人员名称"
|
||||
align="center"
|
||||
key="nickName"
|
||||
prop="nickName"
|
||||
prop="nickName" width="120"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="所属机构"
|
||||
align="center"
|
||||
key="deptName"
|
||||
prop="deptName"
|
||||
prop="deptName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
@ -484,9 +477,9 @@
|
|||
<el-table-column
|
||||
label="联系电话"
|
||||
align="center"
|
||||
key="phonenumber"
|
||||
prop="phonenumber"
|
||||
width="120"
|
||||
key="telphone"
|
||||
prop="telphone"
|
||||
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="操作"
|
||||
|
|
@ -520,9 +513,10 @@ import {
|
|||
getAcceptanceForm,
|
||||
purchaseCheckInfoRemove,
|
||||
getNoticePeople,
|
||||
getUserAll,
|
||||
getListUnSelected,
|
||||
addNoticeUser,
|
||||
bmNoticeInfo,
|
||||
delPeople
|
||||
} from '@/api/purchase/goodsArrived'
|
||||
// import {
|
||||
// getRepairedList,
|
||||
|
|
@ -595,33 +589,6 @@ export default {
|
|||
// this.getTypeList()
|
||||
},
|
||||
methods: {
|
||||
// 多选框选中-添加人员
|
||||
handleSelectionUser(selection) {
|
||||
// console.log(selection)
|
||||
this.chosenUserList = selection
|
||||
},
|
||||
|
||||
//添加人员
|
||||
addUser() {
|
||||
if (this.chosenUserList.length < 1) {
|
||||
this.$message.error('请选择人员!')
|
||||
return
|
||||
}
|
||||
// console.log(this.chosenUserList,"chosenUserList")
|
||||
addNoticeUser(this.chosenUserList).then((response) => {
|
||||
if (response.code == 200) {
|
||||
// this.getNoticeUserList()
|
||||
this.peopleOpen = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/** 查询所有用户列表--可添加人员 */
|
||||
getAllUserList() {
|
||||
getUserAll().then((response) => {
|
||||
this.userList = response.rows
|
||||
})
|
||||
},
|
||||
|
||||
// getTypeList() {
|
||||
// getTypeList({ level: '3' }).then((response) => {
|
||||
|
|
@ -686,15 +653,13 @@ export default {
|
|||
|
||||
handleNotice(row){
|
||||
this.reset()
|
||||
this.$set(
|
||||
this.form,
|
||||
'remark',
|
||||
'各位同事您好,请于' +
|
||||
this.getNowTime() +
|
||||
'在宏源工业园,进行机具验收。'
|
||||
)
|
||||
this.form.taskId = row.taskId;
|
||||
this.$set(this.form,'remark','各位同事您好,请于' + this.getNowTime() + '在宏源工业园,进行机具验收。')
|
||||
this.getNoticeList()
|
||||
this.showPeople = true;
|
||||
const taskId = row.taskId;
|
||||
},
|
||||
getNoticeList(){
|
||||
const taskId = this.form.taskId;
|
||||
getNoticePeople({taskId: taskId}).then((response) => {
|
||||
this.getListPeople = response.rows;
|
||||
this.showPeople = true
|
||||
|
|
@ -702,12 +667,50 @@ export default {
|
|||
this.title = '通知'
|
||||
})
|
||||
},
|
||||
|
||||
addUserOpen() {
|
||||
this.getAllUserList()
|
||||
this.peopleOpen = true
|
||||
},
|
||||
/** 查询所有用户列表--可添加人员 */
|
||||
getAllUserList() {
|
||||
getListUnSelected().then((response) => {
|
||||
this.userList = response.rows
|
||||
})
|
||||
},
|
||||
|
||||
// 多选框选中-添加人员
|
||||
handleSelectionUser(selection) {
|
||||
// console.log(selection)
|
||||
this.chosenUserList = selection
|
||||
},
|
||||
|
||||
//添加人员
|
||||
addUser() {
|
||||
if (this.chosenUserList.length < 1) {
|
||||
this.$message.error('请选择人员!')
|
||||
return
|
||||
}
|
||||
// console.log(this.chosenUserList,"chosenUserList")
|
||||
addNoticeUser(this.chosenUserList).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.getNoticeList()
|
||||
this.peopleOpen = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDeletePeople(row){
|
||||
const ids = row.id
|
||||
this.$modal
|
||||
.confirm('是否删除所选择的通知人员?')
|
||||
.then(function () {
|
||||
return delPeople(ids)
|
||||
})
|
||||
.then(() => {
|
||||
this.getNoticeList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
//确认消息通知
|
||||
configNotice() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
|
|
@ -742,24 +745,25 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 人员取消按钮
|
||||
cancel() {
|
||||
this.showPeople = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.form = {
|
||||
taskId:"",
|
||||
remark:"",
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.taskId)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// // 多选框选中数据
|
||||
// handleSelectionChange(selection) {
|
||||
// this.ids = selection.map((item) => item.taskId)
|
||||
// this.single = selection.length != 1
|
||||
// this.multiple = !selection.length
|
||||
// },
|
||||
|
||||
/** 验收按钮 */
|
||||
handleAccept(row) {
|
||||
|
|
@ -840,20 +844,8 @@ export default {
|
|||
|
||||
},
|
||||
|
||||
handleDeletePeople(row){
|
||||
const ids = row.id
|
||||
this.$modal
|
||||
.confirm('是否确认删除所选择的数据项?')
|
||||
.then(function () {
|
||||
return deletePeople(ids)
|
||||
})
|
||||
.then(() => {
|
||||
this.handleNotice(row)
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
watch: {
|
||||
$route: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue