feat:计划借调列表查询接口联调

This commit is contained in:
jackal 2024-04-12 13:16:05 +08:00
parent 12d22b9181
commit 21005bbfed
3 changed files with 534 additions and 364 deletions

View File

@ -339,7 +339,7 @@ export function getPlanList(query) {
params: query,
});
}
//
//借调操作
export function addOrUpdateMange(data) {
return request({
url: "/material/planManagement/addOrUpdateMange",
@ -347,3 +347,11 @@ export function addOrUpdateMange(data) {
data: data,
});
}
//计划借调列表
export function getManageList(query) {
return request({
url: "/material/planManagement/getManageList",
method: "get",
params: query,
});
}

View File

@ -1,11 +1,19 @@
<template>
<div class="app-container" id="newDevicesAccept">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="80px"
>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable maxlength="50"
clearable
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
@ -19,22 +27,10 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="success"
plain
size="mini"
icon="el-icon-back"
@click="jumpList"
>新购验收管理</el-button>
<el-button type="success" plain size="mini" icon="el-icon-back" @click="jumpList">新购验收管理</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
size="mini"
v-if="!isView"
@click="handleNotice"
>通知</el-button>
<el-button type="success" plain size="mini" v-if="!isView" @click="handleNotice">通知</el-button>
</el-col>
<el-col :span="1.5">
@ -56,29 +52,49 @@
size="mini"
@click="handleExport"
>导出</el-button>
</el-col> -->
</el-col>-->
</el-row>
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="机具类型名称" align="center" prop="machineTypeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" />
<el-table-column label="管理模式" align="center" prop="manageType" :show-overflow-tooltip="true" >
<el-table-column
label="机具类型名称"
align="center"
prop="machineTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格型号"
align="center"
prop="specificationType"
:show-overflow-tooltip="true"
/>
<el-table-column label="管理模式" align="center" prop="manageType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.manageType==0">编码管理</span>
<span v-if="scope.row.manageType==1">数量管理</span>
</template>
</el-table-column>
<el-table-column label="机具厂家" align="center" prop="supplier" :show-overflow-tooltip="true" />
<el-table-column label="采购数量" align="center" prop="purchaseNum" :show-overflow-tooltip="true" />
<el-table-column
label="采购数量"
align="center"
prop="purchaseNum"
:show-overflow-tooltip="true"
/>
<el-table-column label="验收数量" align="center" prop="checkNum" :show-overflow-tooltip="true" />
<el-table-column label="验收图片" align="center" prop="checkUrlName">
<template slot-scope="scope">
<div v-for="(item,index) in scope.row.imgUrlList" :key="index" @click="openImg(item)" style="color: #02A7F0;cursor: pointer;">{{scope.row.imgNameList[index]}}</div>
<div
v-for="(item,index) in scope.row.imgUrlList"
:key="index"
@click="openImg(item)"
style="color: #02A7F0;cursor: pointer;"
>{{scope.row.imgNameList[index]}}</div>
</template>
</el-table-column>
<el-table-column label="配套资料" align="center" prop="fileName" :show-overflow-tooltip="true" />
<!-- <el-table-column label="配套资料" align="center" prop="fileName" :show-overflow-tooltip="true" /> -->
<el-table-column label="状态" align="center" prop="status" width="180">
<template slot-scope="scope">
<span v-if="scope.row.status==0">未验收</span>
@ -88,7 +104,13 @@
<span v-if="scope.row.status==4">已入库</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" v-if="!isView">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="150"
v-if="!isView"
>
<template slot-scope="scope">
<el-button
size="mini"
@ -101,44 +123,55 @@
size="mini"
type="text"
icon="el-icon-edit"
>编码管理</el-button> -->
>编码管理</el-button>-->
</template>
</el-table-column>
</el-table>
<!-- 验收弹窗 -->
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body :close-on-click-modal="false">
<el-dialog
:title="title"
:visible.sync="open"
width="650px"
append-to-body
:close-on-click-modal="false"
>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="机具类型名称:" prop="machineTypeName">
<el-input v-model="form.machineTypeName" placeholder="" disabled/>
<el-input v-model="form.machineTypeName" placeholder disabled />
</el-form-item>
<el-form-item label="规格型号" prop="specificationType">
<el-input v-model="form.specificationType" placeholder="" disabled />
<el-input v-model="form.specificationType" placeholder disabled />
</el-form-item>
<el-form-item label="采购数量" prop="purchaseNum">
<el-input v-model="form.purchaseNum" placeholder="" disabled/>
<el-input v-model="form.purchaseNum" placeholder disabled />
</el-form-item>
<el-form-item label="验收结论" prop="checkResult">
<el-radio v-model="form.checkResult" label="通过">通过</el-radio>
<el-radio v-model="form.checkResult" label="不通过">不通过</el-radio>
</el-form-item>
<el-form-item label="验收通过数量" prop="checkNum">
<el-input-number v-model="form.checkNum" style="width:100%;" controls-position="right" :min="1" :max="form.purchaseNum" />
<el-input-number
v-model="form.checkNum"
style="width:100%;"
controls-position="right"
:min="1"
:max="form.purchaseNum"
/>
</el-form-item>
<el-form-item label="验收图片" prop="checkUrl">
<el-upload
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
action="#" :limit="5"
action="#"
:limit="5"
:file-list="fileList"
:show-file-list="true"
list-type="picture-card"
accept=".png,.jpg,.jpeg"
accept=".png, .jpg, .jpeg"
:class="{ disabled: uploadDisabled }"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
:on-remove="handleRemove"
>
<!-- <img v-if="imageUrl" :src="uploadUrl+imageUrl" style="width: 140px;height: 140px;" class="avatar"> -->
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
@ -153,7 +186,6 @@
<!-- 批量验收弹窗 -->
<el-dialog :title="title" :visible.sync="openAll" width="650px" append-to-body>
<el-form ref="aform" :model="aform" :rules="arules" label-width="120px">
<el-form-item label="验收结论" prop="checkResult">
<el-radio v-model="aform.checkResult" label="通过">通过</el-radio>
<el-radio v-model="aform.checkResult" label="不通过">不通过</el-radio>
@ -161,14 +193,16 @@
<el-form-item label="验收图片" prop="checkUrl">
<el-upload
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
action="#" :limit="5"
action="#"
:limit="5"
:file-list="fileList1"
:show-file-list="true"
list-type="picture-card"
accept=".png,.jpg,.jpeg"
accept=".png, .jpg, .jpeg"
:on-preview="handlePictureCardPreview"
:class="{ disabled: uploadDisabled }"
:on-remove="handleRemove">
:on-remove="handleRemove"
>
<!-- <img v-if="imageUrl" :src="uploadUrl+imageUrl" style="width: 140px;height: 140px;" class="avatar"> -->
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
@ -180,21 +214,57 @@
</div>
</el-dialog>
<!-- 通知弹窗 -->
<!-- 通知弹窗 -->
<el-dialog :title="title" :visible.sync="noticeOpen" width="1000px" append-to-body>
<el-form ref="nform" :model="nform" :rules="nrules" label-width="100px">
<el-form-item label="通知内容:" prop="notice">
<el-input v-model="nform.notice" type="textarea" :autosize="{ minRows: 4, maxRows: 6}" placeholder="请输入通知内容" style="width: 80%;" disabled/>
<el-input
v-model="nform.notice"
type="textarea"
:autosize="{ minRows: 4, maxRows: 6}"
placeholder="请输入通知内容"
style="width: 80%;"
disabled
/>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="noticeUserList" height="400" @selection-change="handleSelectionNotice">
<el-table
v-loading="loading"
:data="noticeUserList"
height="400"
@selection-change="handleSelectionNotice"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="人员账号" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="人员名称" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" />
<el-table-column label="所属机构" align="center" key="deptName" prop="deptName" :show-overflow-tooltip="true" />
<el-table-column label="角色" align="center" key="roleName" prop="roleName" :show-overflow-tooltip="true" />
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="人员账号"
align="center"
key="userName"
prop="userName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="人员名称"
align="center"
key="nickName"
prop="nickName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="所属机构"
align="center"
key="deptName"
prop="deptName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="角色"
align="center"
key="roleName"
prop="roleName"
:show-overflow-tooltip="true"
/>
<el-table-column label="联系电话" align="center" key="telphone" prop="telphone" width="120" />
<el-table-column
label="操作"
@ -203,13 +273,7 @@
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="delUser(scope.row)"
>删除</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="delUser(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -221,13 +285,42 @@
<!-- 人员添加 -->
<el-dialog :title="title" :visible.sync="peopleOpen" width="1000px" append-to-body>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionUser" height="450">
<el-table
v-loading="loading"
:data="userList"
@selection-change="handleSelectionUser"
height="450"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" key="userId" prop="userId" />
<el-table-column label="人员账号" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="人员名称" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" />
<el-table-column label="所属机构" align="center" key="deptName" prop="deptName" :show-overflow-tooltip="true" />
<el-table-column label="角色" align="center" key="roleName" prop="roleName" :show-overflow-tooltip="true" />
<el-table-column
label="人员账号"
align="center"
key="userName"
prop="userName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="人员名称"
align="center"
key="nickName"
prop="nickName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="所属机构"
align="center"
key="deptName"
prop="deptName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="角色"
align="center"
key="roleName"
prop="roleName"
:show-overflow-tooltip="true"
/>
<el-table-column label="联系电话" align="center" key="telphone" prop="telphone" width="120" />
<!-- <el-table-column
label="操作"
@ -244,7 +337,7 @@
>添加</el-button>
</template>
</el-table-column> -->
</el-table-column>-->
</el-table>
<div slot="footer" class="dialog-footer" style="text-align: center">
@ -253,23 +346,38 @@
</el-dialog>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" height="650px" :src="dialogImageUrl" alt="">
<img width="100%" height="650px" :src="dialogImageUrl" alt />
</el-dialog>
</div>
</template>
<script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { getPurchaseCheckInfo,bmNoticeInfo,updatePurchaseCheckDetails,getNoticeUserList,getAllNotificationList,addNoticeUser,delNoticeUser } from "@/api/store/newBuy";
import { imgUpLoad,fileUpLoad } from "@/api/system/upload";
import {
listType,
getType,
delType,
addType,
updateType,
refreshCache
} from "@/api/system/dict/type";
import {
getPurchaseCheckInfo,
bmNoticeInfo,
updatePurchaseCheckDetails,
getNoticeUserList,
getAllNotificationList,
addNoticeUser,
delNoticeUser
} from "@/api/store/newBuy";
import { imgUpLoad, fileUpLoad } from "@/api/system/upload";
export default {
name: "NewDevicesAccept",
dicts: ['sys_normal_disable'],
dicts: ["sys_normal_disable"],
data() {
return {
//ID
taskId:'',
taskId: "",
//
loading: true,
//
@ -283,15 +391,15 @@ export default {
//
total: 0,
//-
userList:[],
userList: [],
//
noticeUserList:[],
noticeUserList: [],
//
chosenUserList:[],
chosenUserList: [],
//-
configUserList:[],
configUserList: [],
//
taskInfo:{},
taskInfo: {},
//
equipmentList: [],
//
@ -306,22 +414,22 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: undefined,
keyWord: undefined
},
//---
imageUrl:'',
imageName:'',
fileList:[],
checkUrlList:[],
checkUrlNameList:[],
fileList1:[],
checkUrlList1:[],
checkUrlNameList1:[],
imageUrl: "",
imageName: "",
fileList: [],
checkUrlList: [],
checkUrlNameList: [],
fileList1: [],
checkUrlList1: [],
checkUrlNameList1: [],
//
// uploadUrl:'http://192.168.0.14:21624/system',//线+system
// uploadUrl:'http://112.29.103.165:21624/system',//线+system
uploadUrl: process.env.VUE_APP_BASE_API + "/system", //
dialogImageUrl: '',
dialogImageUrl: "",
dialogVisible: false,
//--------------
//
@ -336,7 +444,7 @@ export default {
],
checkUrl: [
{ required: true, message: "验收图片不能为空", trigger: "blur" }
],
]
},
//
aform: {},
@ -347,63 +455,64 @@ export default {
],
checkUrl: [
{ required: true, message: "验收图片不能为空", trigger: "blur" }
],
]
},
peopleOpen:false,
noticeOpen:false,
nform:{
notice:''
peopleOpen: false,
noticeOpen: false,
nform: {
notice: ""
},
nrules: {
notice: [
{ required: true, message: "通知内容不能为空", trigger: "blur" }
]
},
deptName: undefined,
deptName: undefined
};
},
computed: {
//1
uploadDisabled() {
return this.checkUrlList.length > 4
return this.checkUrlList.length > 4;
}
},
mounted() {
const taskId = this.$route.query && this.$route.query.taskId;
this.taskId = taskId;
console.log(this.taskId)
console.log(this.taskId);
const isView = this.$route.query && this.$route.query.isView;
if(isView && isView=='true'){
this.isView = true
}else{
this.isView = false
if (isView && isView == "true") {
this.isView = true;
} else {
this.isView = false;
}
this.getTaskInfo();
this.getAllUserList()
this.getNoticeUserList()
this.getAllUserList();
this.getNoticeUserList();
},
methods: {
//-
getTaskInfo(){
getTaskInfo() {
this.loading = true;
getPurchaseCheckInfo({taskId:this.taskId,keyWord:this.queryParams.keyWord}).then(response => {
this.taskInfo = response.data
getPurchaseCheckInfo({
taskId: this.taskId,
keyWord: this.queryParams.keyWord
}).then(response => {
this.taskInfo = response.data;
this.equipmentList = response.data.checkDetailsList;
this.equipmentList.forEach(item=>{
if(item.checkUrl){
item.imgUrlList = item.checkUrl.split(',')
item.imgNameList = item.checkUrlName.split(',')
this.equipmentList.forEach(item => {
if (item.checkUrl) {
item.imgUrlList = item.checkUrl.split(",");
item.imgNameList = item.checkUrlName.split(",");
}
})
});
this.loading = false;
})
});
},
//
jumpList(){
const obj = { path: "/store/newBuy/newDevicesList" }
jumpList() {
const obj = { path: "/store/newBuy/newDevicesList" };
this.$tab.closeOpenPage(obj);
},
//
@ -419,9 +528,9 @@ export default {
checkNum: undefined,
checkResult: "通过",
inputNum: undefined,
checkUrl: undefined,
checkUrl: undefined
};
this.imageUrl = ''
this.imageUrl = "";
this.resetForm("form");
},
@ -437,38 +546,42 @@ export default {
this.handleQuery();
},
//----
getNowTime(){
getNowTime() {
var today = new Date();
var year = today.getFullYear();//
var month = today.getMonth() + 1;//
var day = today.getDate();//
return year + "-" + month + "-" + day
var year = today.getFullYear(); //
var month = today.getMonth() + 1; //
var day = today.getDate(); //
return year + "-" + month + "-" + day;
// console.log(year + "-" + month + "-" + day);
},
//
handleNotice(){
handleNotice() {
this.noticeOpen = true;
this.resetForm("nform");
this.$set(this.nform,'notice','各位同事您好,请于'+this.getNowTime()+'进行机具验收。验收单号:'+this.taskInfo.code)
this.$set(
this.nform,
"notice",
"各位同事您好,请于" +
this.getNowTime() +
"进行机具验收。验收单号:" +
this.taskInfo.code
);
},
//
getNoticeUserList() {
getNoticeUserList().then(response => {
this.noticeUserList = response.data;
}
);
});
},
/** 查询所有用户列表--可添加人员 */
getAllUserList() {
getAllNotificationList().then(response => {
this.userList = response.data;
}
);
});
},
addUserOpen(){
this.getAllUserList()
addUserOpen() {
this.getAllUserList();
this.peopleOpen = true;
},
// -
@ -477,96 +590,91 @@ export default {
this.chosenUserList = selection;
},
//
addUser(){
addUser() {
// console.log(this.chosenUserList,"chosenUserList")
addNoticeUser(this.chosenUserList).then(response => {
if(response.code==200){
this.getNoticeUserList()
if (response.code == 200) {
this.getNoticeUserList();
this.peopleOpen = false;
}
});
},
delUser(row){
delUser(row) {
delNoticeUser(row.userId).then(response => {
if(response.code==200){
this.getNoticeUserList()
if (response.code == 200) {
this.getNoticeUserList();
}
});
},
// -
handleSelectionNotice(selection) {
this.configUserList = selection;
},
//
configNotice(){
configNotice() {
this.$refs["nform"].validate(valid => {
if (valid) {
this.configUserList.forEach((item,index)=>{
this.configUserList.forEach((item, index) => {
item.noticeUser = item.userId;
item.phone = item.telphone;
})
});
let param = {
// message:this.nform.notice,
message:`${this.getNowTime()},${this.taskInfo.code}`,
taskId:this.taskInfo.taskId,
bmNoticeInfoList:this.configUserList,
}
if(this.configUserList.length>0){
bmNoticeInfo(param).then(response=>{
console.log(response)
if(response.code==200){
message: `${this.getNowTime()},${this.taskInfo.code}`,
taskId: this.taskInfo.taskId,
bmNoticeInfoList: this.configUserList
};
if (this.configUserList.length > 0) {
bmNoticeInfo(param).then(response => {
console.log(response);
if (response.code == 200) {
this.$message({
message: '操作成功',
type: 'success'
})
this.noticeOpen = false
this.getTaskInfo()
message: "操作成功",
type: "success"
});
this.noticeOpen = false;
this.getTaskInfo();
}
})
}else{
});
} else {
this.$message({
message: '请选择通知人员!',
type: 'error'
})
message: "请选择通知人员!",
type: "error"
});
}
}
})
});
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item)
this.single = selection.length!=1
this.multiple = !selection.length
this.ids = selection.map(item => item);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 验收按钮操作 */
handleCheck(row) {
// console.log(row)
this.$set(this.form,'code',row.code)
this.$set(this.form,'companyId',row.companyId)
this.$set(this.form,'createBy',row.createBy)
this.$set(this.form,'createTime',row.createTime)
this.$set(this.form,'id',row.id)
this.$set(this.form,'machineTypeName',row.machineTypeName)
this.$set(this.form,'manageType',row.manageType)
this.$set(this.form,'specificationType',row.specificationType)
this.$set(this.form,'typeName',row.typeName)
this.$set(this.form,'machineTypeName',row.machineTypeName)
this.$set(this.form,'taskId',row.taskId)
this.$set(this.form,'typeId',row.typeId)
this.$set(this.form,'checkResult',row.checkResult|| "通过")
this.$set(this.form, "code", row.code);
this.$set(this.form, "companyId", row.companyId);
this.$set(this.form, "createBy", row.createBy);
this.$set(this.form, "createTime", row.createTime);
this.$set(this.form, "id", row.id);
this.$set(this.form, "machineTypeName", row.machineTypeName);
this.$set(this.form, "manageType", row.manageType);
this.$set(this.form, "specificationType", row.specificationType);
this.$set(this.form, "typeName", row.typeName);
this.$set(this.form, "machineTypeName", row.machineTypeName);
this.$set(this.form, "taskId", row.taskId);
this.$set(this.form, "typeId", row.typeId);
this.$set(this.form, "checkResult", row.checkResult || "通过");
// this.$set(this.form,'machineTypeName',row.machineTypeName)
this.$set(this.form,'purchaseNum',row.purchaseNum)
this.$set(this.form,'checkNum',row.purchaseNum)
this.$set(this.form,'checkUrl','')
this.$set(this.form,'checkUrlName','')
this.fileList = []
this.checkUrlList = []
this.checkUrlNameList = []
this.$set(this.form, "purchaseNum", row.purchaseNum);
this.$set(this.form, "checkNum", row.purchaseNum);
this.$set(this.form, "checkUrl", "");
this.$set(this.form, "checkUrlName", "");
this.fileList = [];
this.checkUrlList = [];
this.checkUrlNameList = [];
this.open = true;
this.title = "验收";
},
@ -574,36 +682,36 @@ export default {
handleListCheck() {
// console.log(this.ids)
this.fileList1 = [];
this.checkUrlList1 = []
this.checkUrlNameList1 = []
this.checkUrlList1 = [];
this.checkUrlNameList1 = [];
this.aform = {
checkResult:'通过',
checkUrl:'',
checkUrlName:'',
checkResult: "通过",
checkUrl: "",
checkUrlName: ""
};
this.imageUrl = ''
this.imageUrl = "";
this.openAll = true;
this.title = "批量验收";
},
/** 提交按钮 */
submitForm: function() {
// console.log(this.form)
this.form.checkUrl = this.checkUrlList.join(',');
this.form.checkUrlName = this.checkUrlNameList.join(',');
let equipments = [this.form]
console.log(equipments)
this.form.checkUrl = this.checkUrlList.join(",");
this.form.checkUrlName = this.checkUrlNameList.join(",");
let equipments = [this.form];
console.log(equipments);
this.$refs["form"].validate(valid => {
if (valid) {
updatePurchaseCheckDetails(equipments).then(response => {
if(response.code == 200){
if (response.code == 200) {
this.$message({
message: '操作成功',
type: 'success'
})
message: "操作成功",
type: "success"
});
this.open = false;
this.fileList = []
this.checkUrlList = []
this.checkUrlNameList = []
this.fileList = [];
this.checkUrlList = [];
this.checkUrlNameList = [];
this.getTaskInfo();
}
});
@ -612,30 +720,30 @@ export default {
},
submitListForm: function() {
// console.log(this.aform)
this.aform.checkUrl = this.checkUrlList1.join(',');
this.aform.checkUrlName = this.checkUrlNameList1.join(',');
this.ids.forEach(item=>{
item.checkNum = item.purchaseNum
item.checkResult = this.aform.checkResult
item.checkUrl = this.aform.checkUrl
item.checkUrlName = this.aform.checkUrlName
})
this.aform.checkUrl = this.checkUrlList1.join(",");
this.aform.checkUrlName = this.checkUrlNameList1.join(",");
this.ids.forEach(item => {
item.checkNum = item.purchaseNum;
item.checkResult = this.aform.checkResult;
item.checkUrl = this.aform.checkUrl;
item.checkUrlName = this.aform.checkUrlName;
});
// console.log(this.ids)
let equipments = this.ids
console.log(equipments)
let equipments = this.ids;
console.log(equipments);
this.$refs["aform"].validate(valid => {
if (valid) {
updatePurchaseCheckDetails(equipments).then(response => {
if(response.code == 200){
if (response.code == 200) {
this.$message({
message: '验收成功',
type: 'success'
})
message: "验收成功",
type: "success"
});
this.openAll = false;
this.open = false;
this.fileList1 = []
this.checkUrlList1 = []
this.checkUrlNameList1 = []
this.fileList1 = [];
this.checkUrlList1 = [];
this.checkUrlNameList1 = [];
this.getTaskInfo();
}
});
@ -643,43 +751,53 @@ export default {
});
},
//
imgUpLoad(param,name,index) {
param.type = 'ma'
imgUpLoad(param).then(res => {
if(res.code == 200) {
imgUpLoad(param, name, index) {
param.type = "ma";
imgUpLoad(param)
.then(res => {
if (res.code == 200) {
// console.log(res.data)
if(this.open){
this.checkUrlList.push(res.data.fileUrl)
this.checkUrlNameList.push(res.data.fileName)
if (this.open) {
this.checkUrlList.push(res.data.fileUrl);
this.checkUrlNameList.push(res.data.fileName);
}
if(this.openAll){
this.checkUrlList1.push(res.data.fileUrl)
this.checkUrlNameList1.push(res.data.fileName)
if (this.openAll) {
this.checkUrlList1.push(res.data.fileUrl);
this.checkUrlNameList1.push(res.data.fileName);
// this.aform.checkUrl = res.data.fileUrl;
// this.aform.checkUrlName = res.data.fileName;
}
}else{
} else {
// this.$msgError(res.msg)
this.$modal.msgError(res.msg);
}
}).catch((error) => {
})
.catch(error => {
// this.$msgError(error)
this.$modal.msgError(error);
})
});
},
handleAvatarSuccess(res,file) {
handleAvatarSuccess(res, file) {
// console.log("success")
},
handleRemove(file, fileList) {
if(this.open){
if (this.open) {
let sum = 0;
this.checkUrlNameList.forEach((item,index) => { if(item == file.name){ sum = index } });
this.checkUrlNameList.forEach((item, index) => {
if (item == file.name) {
sum = index;
}
});
this.checkUrlNameList.splice(sum, 1);
this.checkUrlList.splice(sum, 1);
}
if(this.openAll){
if (this.openAll) {
let sum1 = 0;
this.checkUrlNameList1.forEach((item,index) => { if(item == file.name){ sum1 = index } });
this.checkUrlNameList1.forEach((item, index) => {
if (item == file.name) {
sum1 = index;
}
});
this.checkUrlNameList1.splice(sum1, 1);
this.checkUrlList1.splice(sum1, 1);
}
@ -691,30 +809,34 @@ export default {
this.dialogVisible = true;
},
//
openImg(url){
openImg(url) {
this.dialogImageUrl = this.uploadUrl + url;
this.dialogVisible = true;
},
//
selectable(row,index) {
if(row.status==0){
return true
}else{
return false
selectable(row, index) {
if (row.status == 0) {
return true;
} else {
return false;
}
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {
this.download(
"system/dict/type/export",
{
...this.queryParams
}, `type_${new Date().getTime()}.xlsx`)
},
`type_${new Date().getTime()}.xlsx`
);
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功");
this.$store.dispatch('dict/cleanDict');
this.$store.dispatch("dict/cleanDict");
});
}
}

View File

@ -8,9 +8,9 @@
v-show="showSearch"
label-width="80px"
>
<el-form-item label="名称" prop="dictName">
<el-form-item label="名称" prop="name">
<el-input
v-model="queryParams.dictName"
v-model="queryParams.name"
placeholder="请输入名称"
clearable
maxlength="50"
@ -52,24 +52,56 @@
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="dictId" />
<el-table-column label="物资名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="单位" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="借出方单位" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="原计划数" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="现计划数" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="借入方单位" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column
label="规格型号"
align="center"
prop="typeModelName"
:show-overflow-tooltip="true"
/>
<el-table-column label="单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column
label="借出方单位"
align="center"
prop="borrowerCompany"
:show-overflow-tooltip="true"
/>
<el-table-column
label="原计划数"
align="center"
prop="borrowerOrigPlanNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="现计划数"
align="center"
prop="borrowerNowPlanNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="借入方单位"
align="center"
prop="lenderCompany"
:show-overflow-tooltip="true"
/>
<!-- <el-table-column label="原计划数" align="center" prop="dictName" :show-overflow-tooltip="true" />-->
<el-table-column label="现有计划数" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="借调数量" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="操作人" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="操作时间" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column
label="现有计划数"
align="center"
prop="lenderNowPlanNum"
:show-overflow-tooltip="true"
/>
<el-table-column label="借调数量" align="center" prop="borrowNum" :show-overflow-tooltip="true" />
<el-table-column label="操作人" align="center" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column label="操作时间" align="center" prop="createTime" :show-overflow-tooltip="true" />
<el-table-column label="备注" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
<!-- <el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -86,7 +118,7 @@
v-hasPermi="['store:labelType:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table-column>-->
</el-table>
<pagination
@ -242,7 +274,11 @@ import {
refreshCache
} from "@/api/system/dict/type";
import { getunitInfoAll } from "@/api/store/tools";
import { getPlanList, addOrUpdateMange } from "@/api/store/newBuy";
import {
getPlanList,
addOrUpdateMange,
getManageList
} from "@/api/store/newBuy";
export default {
name: "PlanSecond",
@ -276,9 +312,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined
name: undefined
},
//
dialogParams: {
@ -314,7 +348,7 @@ export default {
/** 查询字典类型列表 */
getList() {
this.loading = true;
listType(this.queryParams).then(response => {
getManageList(this.queryParams).then(response => {
this.typeList = response.rows;
this.total = response.total;
this.loading = false;
@ -434,7 +468,13 @@ export default {
}
});
addOrUpdateMange(this.dialogForm).then(res => {
console.log(res);
if (res.code == 200) {
this.$message.success("借调成功");
this.open = false;
this.resetQuery();
} else {
this.$message.error("借调失败,请联系管理员");
}
});
}
}