新购编码修改
This commit is contained in:
parent
5c50ce4706
commit
294fbc4d3e
|
|
@ -133,18 +133,64 @@ export function delMacodeList(maCode) {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//新购验收-验收-通知-常用人员
|
||||
export function getNoticeUserList(query) {
|
||||
return request({
|
||||
url: '/system/person/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//新购验收-验收-通知-所有人员
|
||||
export function getAllNotificationList(query) {
|
||||
return request({
|
||||
url: '/system/person/notification',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//新购验收-验收-通知-常用人员-添加
|
||||
export function addNoticeUser(data) {
|
||||
return request({
|
||||
url: '/system/person',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除
|
||||
export function delNoticeUser(id) {
|
||||
return request({
|
||||
url: '/system/person/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
//新购验收-入库列表
|
||||
export function getPutInList(query) {
|
||||
return request({
|
||||
url: '/material/purchaseCheckInfo/putInList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function getPutinDetailsList(query) {
|
||||
return request({
|
||||
url: '/material/purchaseMacode/putinDetails',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 修改状态-审核
|
||||
export function changePutinStatus(data) {
|
||||
return request({
|
||||
url: '/material/purchaseMacode/manageStatus',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,24 +23,24 @@ export function getTypeList(query) {
|
|||
//修试后入库--列表
|
||||
export function getRepairedList(data) {
|
||||
return request({
|
||||
url: '/material/RepairTestInput/getRepairedList',
|
||||
method: 'post',
|
||||
data: data
|
||||
url: '/sgzb-material/RepairTestInput/getRepairedList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
//修试后入库--详情
|
||||
export function getRepairedDetailList(data) {
|
||||
return request({
|
||||
url: '/material//RepairTestInput/getRepairedDetailList',
|
||||
method: 'post',
|
||||
data: data
|
||||
url: '/sgzb-material//RepairTestInput/getRepairedDetailList',
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
//修试后入库--审核
|
||||
export function inputByType(data) {
|
||||
return request({
|
||||
url: '/material/RepairTestInput/inputByType',
|
||||
url: '/sgzb-material/RepairTestInput/inputByType',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
|
|
|
|||
|
|
@ -188,9 +188,9 @@ export default {
|
|||
lotName: [
|
||||
{ required: true, message: "标段工程名称不能为空", trigger: "blur" }
|
||||
],
|
||||
ownPro: [
|
||||
{ required: true, message: "所属工程项目不能为空", trigger: "blur" }
|
||||
],
|
||||
// ownPro: [
|
||||
// { required: true, message: "所属工程项目不能为空", trigger: "blur" }
|
||||
// ],
|
||||
typeId: [
|
||||
{ required: true, message: "工程类型不能为空", trigger: "blur" }
|
||||
],
|
||||
|
|
|
|||
|
|
@ -190,7 +190,19 @@
|
|||
</el-form-item>
|
||||
|
||||
<el-form-item label="合同照片" prop="fileName">
|
||||
<el-input v-model="form.fileName" placeholder="图片上传" />
|
||||
<el-upload
|
||||
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
||||
action="#" :limit='1'
|
||||
:file-list="fileList"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
accept=".png,.jpg,.jpeg"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove">
|
||||
<i class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
||||
|
|
@ -202,7 +214,9 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" height="650px" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -211,7 +225,7 @@
|
|||
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
import { getAgreementList, getAgreementInfoId,addAgreement, updateAgreement, removeAgreement,getUnitList, getProjectList } from "@/api/claimAndRefund/receive";
|
||||
|
||||
import { imgUpLoad,fileUpLoad } from "@/api/system/upload";
|
||||
|
||||
|
||||
export default {
|
||||
|
|
@ -253,6 +267,16 @@ export default {
|
|||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
//图片上传
|
||||
uploadHeader: process.env.VUE_APP_BASE_API,
|
||||
imageUrl:'',
|
||||
imageName:'',
|
||||
fileList:[],
|
||||
field101fileList:[],
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
//上传地址
|
||||
uploadUrl:'http://192.168.0.14:21624/system',//线上服务器地址+system
|
||||
// 表单校验
|
||||
rules: {
|
||||
contractCode: [
|
||||
|
|
@ -331,9 +355,12 @@ export default {
|
|||
agreementId: undefined,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
fileUrl: undefined,
|
||||
fileName: undefined,
|
||||
status: "0",
|
||||
remark: undefined
|
||||
};
|
||||
this.fileList = []
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
@ -353,9 +380,50 @@ export default {
|
|||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
|
||||
this.open = true;
|
||||
|
||||
this.title = "新建";
|
||||
},
|
||||
// 图片上传
|
||||
imgUpLoad(param,name,index) {
|
||||
console.log(param,'image')
|
||||
param.type = 'ma'
|
||||
imgUpLoad(param).then(res => {
|
||||
if(res.code == 200) {
|
||||
this.form.fileUrl = res.data.fileUrl;
|
||||
this.form.fileName = res.data.fileName;
|
||||
this.imageUrl = res.data.fileUrl;
|
||||
this.imageName = res.data.fileName;
|
||||
}else{
|
||||
// this.$msgError(res.msg)
|
||||
this.$modal.msgError(res.msg);
|
||||
}
|
||||
}).catch((error) => {
|
||||
// this.$msgError(error)
|
||||
this.$modal.msgError(error);
|
||||
})
|
||||
},
|
||||
handleAvatarSuccess(res,file) {
|
||||
console.log("success")
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
this.imageUrl = "";
|
||||
this.form.fileUrl = "";
|
||||
this.form.fileName = "";
|
||||
},
|
||||
//图片点击查看
|
||||
handlePictureCardPreview(file) {
|
||||
console.log(file)
|
||||
this.dialogImageUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
//图片查看
|
||||
openImg(url){
|
||||
this.dialogImageUrl = this.uploadUrl + url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.agreementId)
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@
|
|||
<span v-if="scope.row.status==0">未验收</span>
|
||||
<span v-if="scope.row.status==1">已验收</span>
|
||||
<span v-if="scope.row.status==2">待通知</span>
|
||||
<span v-if="scope.row.status==3">不通过</span>
|
||||
<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="250">
|
||||
|
|
@ -87,6 +89,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-show="scope.row.status==0 || scope.row.status==3"
|
||||
@click="handleCheck(scope.row)"
|
||||
>验收</el-button>
|
||||
<!-- <el-button
|
||||
|
|
@ -174,13 +177,13 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="noticeUserList" height="400">
|
||||
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
||||
<el-table-column label="序号" align="center" key="userId" prop="userId" />
|
||||
<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="deptName" prop="deptName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="角色" align="center" key="deptName" prop="dept.deptName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="联系电话" align="center" key="phonenumber" prop="phonenumber" width="120" />
|
||||
<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="操作"
|
||||
align="center"
|
||||
|
|
@ -199,7 +202,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="peopleOpen = true">人员添加</el-button>
|
||||
<el-button type="primary" @click="addUserOpen">人员添加</el-button>
|
||||
<el-button type="primary" @click="configNotice">消息通知</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
|
@ -210,9 +213,9 @@
|
|||
<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="" prop="" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="角色" align="center" key="deptName" prop="dept.deptName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="联系电话" align="center" key="phonenumber" prop="phonenumber" width="120" />
|
||||
<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="操作"
|
||||
align="center"
|
||||
|
|
@ -244,8 +247,7 @@
|
|||
|
||||
<script>
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
import { getPurchaseCheckInfo,bmNoticeInfo,updatePurchaseCheckDetails } from "@/api/store/newBuy";
|
||||
import { getUserByRoleList } from "@/api/system/user";
|
||||
import { getPurchaseCheckInfo,bmNoticeInfo,updatePurchaseCheckDetails,getNoticeUserList,getAllNotificationList,addNoticeUser,delNoticeUser } from "@/api/store/newBuy";
|
||||
import { imgUpLoad,fileUpLoad } from "@/api/system/upload";
|
||||
|
||||
export default {
|
||||
|
|
@ -273,6 +275,8 @@ export default {
|
|||
noticeUserList:[],
|
||||
//选择人员
|
||||
chosenUserList:[],
|
||||
//确认消息通知人员-勾选的通知人员
|
||||
configUserList:[],
|
||||
//任务数据
|
||||
taskInfo:{},
|
||||
// 表格数据
|
||||
|
|
@ -344,7 +348,8 @@ export default {
|
|||
this.taskId = taskId;
|
||||
console.log(this.taskId)
|
||||
this.getTaskInfo();
|
||||
this.getUserList()
|
||||
this.getAllUserList()
|
||||
this.getNoticeUserList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
|
@ -357,6 +362,8 @@ export default {
|
|||
this.loading = false;
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 返回列表页
|
||||
jumpList(){
|
||||
const obj = { path: "/store/newBuy/newDevicesList" }
|
||||
|
|
@ -391,6 +398,9 @@ export default {
|
|||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
|
||||
//----消息通知
|
||||
getNowTime(){
|
||||
var today = new Date();
|
||||
var year = today.getFullYear();//获取年份
|
||||
|
|
@ -402,73 +412,88 @@ export default {
|
|||
//通知按钮
|
||||
handleNotice(){
|
||||
this.noticeOpen = true;
|
||||
// console.log(this.getNowTime())
|
||||
// var str = ''
|
||||
// this.equipmentList.forEach(item => {
|
||||
// str = str+'机具类型:'+ item.machineTypeName +',规格型号:K87-AD4/38-36.52-M1-B,数量:8.000;'
|
||||
// });
|
||||
this.nform.notice = '各位同事您好,请于'+this.getNowTime()+'进行机具验收。验收单号:'+this.taskInfo.code;
|
||||
},
|
||||
/** 查询用户列表--库管员 */
|
||||
getUserList() {
|
||||
getUserByRoleList({roleId:'101'}).then(response => {
|
||||
//查询短信通知人员
|
||||
getNoticeUserList() {
|
||||
getNoticeUserList().then(response => {
|
||||
this.noticeUserList = response.data;
|
||||
}
|
||||
);
|
||||
},
|
||||
/** 查询所有用户列表--可添加人员 */
|
||||
getAllUserList() {
|
||||
getAllNotificationList().then(response => {
|
||||
this.userList = response.data;
|
||||
}
|
||||
);
|
||||
},
|
||||
// 多选框选中数据
|
||||
addUserOpen(){
|
||||
this.getAllUserList()
|
||||
this.peopleOpen = true;
|
||||
},
|
||||
// 多选框选中-添加人员
|
||||
handleSelectionUser(selection) {
|
||||
console.log(selection)
|
||||
this.chosenUserList = selection;
|
||||
},
|
||||
//添加人员
|
||||
addUser(){
|
||||
console.log(this.noticeUserList,"noticeUserList")
|
||||
console.log(this.chosenUserList,"chosenUserList")
|
||||
this.noticeUserList = this.chosenUserList;
|
||||
// this.chosenUserList.forEach((chosen,index)=>{
|
||||
|
||||
// this.noticeUserList.unshift(chosen)
|
||||
|
||||
|
||||
// })
|
||||
// console.log(this.noticeUserList,"noticeUserList")
|
||||
// console.log(this.chosenUserList,"chosenUserList")
|
||||
this.peopleOpen = false;
|
||||
|
||||
addNoticeUser(this.chosenUserList).then(response => {
|
||||
if(response.code==200){
|
||||
this.getNoticeUserList()
|
||||
this.peopleOpen = false;
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
delUser(row){
|
||||
this.noticeUserList.forEach((item,index)=>{
|
||||
if(item.userId == row.userId){
|
||||
console.log('del')
|
||||
this.noticeUserList.splice(index,1)
|
||||
}
|
||||
})
|
||||
delNoticeUser(row.userId).then(response => {
|
||||
if(response.code==200){
|
||||
this.getNoticeUserList()
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
// 多选框选中-添加消息通知
|
||||
handleSelectionNotice(selection) {
|
||||
this.configUserList = selection;
|
||||
},
|
||||
//确认消息通知
|
||||
configNotice(){
|
||||
// console.log(this.nform.notice,'message')
|
||||
// console.log(this.taskInfo.taskId,'taskId')
|
||||
// console.log(this.noticeUserList,'bmNoticeInfoList')
|
||||
this.noticeUserList.forEach((item,index)=>{
|
||||
|
||||
this.configUserList.forEach((item,index)=>{
|
||||
item.noticeUser = item.userId;
|
||||
item.phone = item.phonenumber;
|
||||
item.phone = item.telphone;
|
||||
})
|
||||
let param = {
|
||||
message:this.nform.notice,
|
||||
taskId:this.taskInfo.taskId,
|
||||
bmNoticeInfoList:this.noticeUserList,
|
||||
bmNoticeInfoList:this.configUserList,
|
||||
}
|
||||
bmNoticeInfo(param).then(response=>{
|
||||
console.log(response)
|
||||
if(response.code==200){
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.noticeOpen = false
|
||||
this.getTaskInfo()
|
||||
}
|
||||
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()
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
}else{
|
||||
this.$message({
|
||||
message: '请选择通知人员!',
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
// 多选框选中数据
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@
|
|||
<el-col :span="9"></el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="rules" size="small" :inline="true">
|
||||
<el-form :model="maForm" ref="maForm" :rules="rules" size="small" :inline="true">
|
||||
<el-row>
|
||||
<el-form-item label="采购日期" prop="purchaseTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.purchaseTime"
|
||||
v-model="maForm.purchaseTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="到货日期" prop="arrivalTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.arrivalTime"
|
||||
v-model="maForm.arrivalTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购员" prop="purchaser">
|
||||
<el-select v-model="dataForm.purchaser" placeholder="请选择采购员" style="width: 100%;">
|
||||
<el-select v-model="maForm.purchaser" placeholder="请选择采购员" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.userId"
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="dataForm.remark"
|
||||
v-model="maForm.remark"
|
||||
placeholder="请输入备注"
|
||||
clearable
|
||||
type="textarea"
|
||||
|
|
@ -135,7 +135,8 @@
|
|||
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" width="55"/>
|
||||
<el-table-column label="机具类型" prop="machineTypeName" :show-overflow-tooltip="true" width="200"/>
|
||||
<el-table-column label="机具类型" prop="machineTypeName" :show-overflow-tooltip="true" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" prop="specificationType" :show-overflow-tooltip="true" width="200"/>
|
||||
<el-table-column label="单位" prop="unitName" width="100" />
|
||||
<el-table-column label="购置单价(元)" prop="purchasePrice" align="center" width="150">
|
||||
|
|
@ -143,7 +144,7 @@
|
|||
<el-input v-model="scope.row.purchasePrice" type="number" maxlength="10"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="*采购数量" prop="purchaseNum" width="150" type="number" maxlength="10">
|
||||
<el-table-column label="采购数量" prop="purchaseNum" width="150" type="number" maxlength="10">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.purchaseNum"></el-input>
|
||||
</template>
|
||||
|
|
@ -276,7 +277,7 @@ export default {
|
|||
productionTime:'',
|
||||
supplierId:'',
|
||||
},
|
||||
dataForm:{
|
||||
maForm:{
|
||||
purchaseTime:'',
|
||||
arrivalTime:'',
|
||||
purchaser:'',
|
||||
|
|
@ -359,6 +360,7 @@ export default {
|
|||
},
|
||||
//添加机具类型
|
||||
select(row){
|
||||
console.log(row)
|
||||
if(row.level==4){
|
||||
for(let i = 0; i < this.equipmentList.length; i++) {
|
||||
if (this.equipmentList[i].typeId == row.typeId) {
|
||||
|
|
@ -366,8 +368,9 @@ export default {
|
|||
break;
|
||||
}
|
||||
}
|
||||
row.productionTime = this.queryParams.productionTime
|
||||
row.supplierId = this.queryParams.supplierId
|
||||
this.$set(row, 'productionTime', this.queryParams.productionTime);
|
||||
this.$set(row, 'supplierId', this.queryParams.supplierId);
|
||||
|
||||
this.equipmentList.unshift(row)
|
||||
}
|
||||
},
|
||||
|
|
@ -391,10 +394,10 @@ export default {
|
|||
// this.loading = true;
|
||||
getPurchaseCheckInfo({taskId:this.taskId,keyWord:this.queryParams.keyWord}).then(response => {
|
||||
// this.taskInfo = response.data
|
||||
this.dataForm.purchaseTime = response.data.purchaseTime;
|
||||
this.dataForm.arrivalTime = response.data.arrivalTime;
|
||||
this.dataForm.purchaser = response.data.purchaser;
|
||||
this.dataForm.remark = response.data.remark;
|
||||
this.maForm.purchaseTime = response.data.purchaseTime;
|
||||
this.maForm.arrivalTime = response.data.arrivalTime;
|
||||
this.maForm.purchaser = response.data.purchaser;
|
||||
this.maForm.remark = response.data.remark;
|
||||
this.equipmentList = response.data.checkDetailsList;
|
||||
// this.loading = false;
|
||||
})
|
||||
|
|
@ -452,59 +455,67 @@ export default {
|
|||
|
||||
/** 新增按钮操作 */
|
||||
handleSave() {
|
||||
// this.$modal.confirm('是否确认').then(function() {
|
||||
this.$refs["dataForm"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.dataForm,'dataForm')
|
||||
console.log(this.equipmentList,'equipmentList')
|
||||
let isEmpty = true
|
||||
this.equipmentList.forEach(item=>{
|
||||
if(item.purchaseNum=='' || !item.purchaseNum){
|
||||
isEmpty = false
|
||||
}
|
||||
})
|
||||
console.log(this.taskId)
|
||||
|
||||
this.dataForm.taskId = this.taskId
|
||||
this.dataForm.checkDetailsList = this.equipmentList;
|
||||
console.log(this.dataForm)
|
||||
if(isEmpty){
|
||||
if(this.equipmentList.length>0){
|
||||
if(this.isEdit){
|
||||
console.log('编辑')
|
||||
this.loading = true;
|
||||
updatePurchaseCheckInfo(this.dataForm).then(response => {
|
||||
if(response.code == 200){
|
||||
this.$modal.msgSuccess("编辑成功");
|
||||
this.$tab.closeOpenPage({ path: "/store/newBuy/newDevicesList" });
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
|
||||
}else if(!this.isEdit){
|
||||
console.log('新增')
|
||||
this.loading = true;
|
||||
addPurchaseCheckInfo(this.dataForm).then(response => {
|
||||
if(response.code == 200){
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$tab.closeOpenPage({ path: "/store/newBuy/newDevicesList" });
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
if(this.equipmentList.length>0){
|
||||
this.$refs["maForm"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
console.log(this.maForm,'maForm')
|
||||
console.log(this.equipmentList,'equipmentList')
|
||||
let isEmpty = true
|
||||
this.equipmentList.forEach(item=>{
|
||||
if(item.purchaseNum=='' || !item.purchaseNum){
|
||||
isEmpty = false
|
||||
}
|
||||
})
|
||||
console.log(this.taskId)
|
||||
|
||||
this.maForm.taskId = this.taskId
|
||||
this.maForm.checkDetailsList = this.equipmentList;
|
||||
console.log(this.maForm)
|
||||
if(isEmpty){
|
||||
if(this.equipmentList.length>0){
|
||||
this.$modal.confirm('是否确认保存当前页面').then(function() { }).then(() => {
|
||||
|
||||
if(this.isEdit){
|
||||
console.log('编辑')
|
||||
this.loading = true;
|
||||
updatePurchaseCheckInfo(this.maForm).then(response => {
|
||||
if(response.code == 200){
|
||||
this.$modal.msgSuccess("编辑成功");
|
||||
this.$tab.closeOpenPage({ path: "/store/newBuy/newDevicesList" });
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
|
||||
}else if(!this.isEdit){
|
||||
console.log('新增')
|
||||
this.loading = true;
|
||||
addPurchaseCheckInfo(this.maForm).then(response => {
|
||||
if(response.code == 200){
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$tab.closeOpenPage({ path: "/store/newBuy/newDevicesList" });
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
}
|
||||
}).catch(() => {});
|
||||
}else{
|
||||
this.$modal.msgError("请先选择并添加机具类型!!!");
|
||||
}
|
||||
}else{
|
||||
this.$modal.msgError("请先选择并添加机具类型!!!");
|
||||
this.$modal.msgError("请填写采购数量!!!");
|
||||
}
|
||||
}else{
|
||||
this.$modal.msgError("请填写采购数量!!!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
// })
|
||||
|
||||
|
||||
}else{
|
||||
this.$modal.msgError("请先添加机具类型");
|
||||
}
|
||||
|
||||
|
||||
// this.reset();
|
||||
// this.open = true;
|
||||
|
|
|
|||
|
|
@ -66,10 +66,10 @@
|
|||
<!-- <el-table-column label="编码类型" align="center" prop="codeType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="二维码" align="center" prop="dictName" :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>
|
||||
<span v-if="scope.row.status==1">正常</span>
|
||||
</template> -->
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status==0">待入库</span>
|
||||
<span v-if="scope.row.status==1">已入库</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -108,8 +108,9 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="生成数量" prop="count">
|
||||
<el-input-number controls-position="right" v-model="form.count" type="number" :min="1" placeholder="请输入编码生成数量" />
|
||||
<el-form-item label="后缀范围" prop="count">
|
||||
<div style="display: flex;"><el-input v-model="form.str" placeholder="0001"></el-input> - <el-input v-model="form.str1" placeholder="0005"></el-input></div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
|
@ -120,14 +121,14 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<!-- <el-col :span="2">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
size="mini"
|
||||
@click="createCodeList"
|
||||
>生成</el-button>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="2">
|
||||
<el-button
|
||||
type="primary"
|
||||
|
|
@ -143,7 +144,11 @@
|
|||
<el-table-column label="序号" align="center" type="index"/>
|
||||
<el-table-column label="机具种类" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.maCode" v-bind:class="[scope.row.statusFlag==1 ? redColor : '']"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="固定资产编码" align="center" prop="assetsCode" width="120" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
|
|
@ -183,6 +188,7 @@ import { getMacodeList,getMacodeDetailList,makeEquipmentNumber,editPurchaseMacod
|
|||
|
||||
import { getTypeList } from "@/api/store/warehousing";
|
||||
import { getListByMaType } from "@/api/store/tools";
|
||||
import { number } from 'echarts';
|
||||
|
||||
|
||||
export default {
|
||||
|
|
@ -221,9 +227,9 @@ export default {
|
|||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
exCode:'NXJJ',
|
||||
exCode:'NSJJ',
|
||||
count:1,
|
||||
isFixed:'1',
|
||||
// isFixed:'',
|
||||
typeId:''
|
||||
},
|
||||
codeList: [],//弹窗列表list
|
||||
|
|
@ -316,33 +322,25 @@ export default {
|
|||
/** 编码按钮操作 */ //getCodeList newCodeList
|
||||
handleCode(row) {
|
||||
console.log(row)
|
||||
let param = {
|
||||
taskId:this.taskId,
|
||||
typeId:row.typeId,
|
||||
}
|
||||
this.newCodeList = [];
|
||||
getMacodeDetailList(param).then(response => {
|
||||
this.getCodeList = response.data;
|
||||
this.codeList = this.getCodeList.concat(this.newCodeList)
|
||||
this.open = true;
|
||||
this.title = "生成编码";
|
||||
});
|
||||
this.form = row
|
||||
// this.form.count = row.checkNum;
|
||||
this.form = row;
|
||||
let arr = this.form.arrivalTime.split('-')
|
||||
this.form.exCode = 'NSJJ'+this.form.typeCode+this.form.specsCode+arr[0][2]+arr[0][3]+arr[1];
|
||||
this.form.count = row.checkNum;
|
||||
this.form.typeId = row.typeId;
|
||||
this.form.taskId = row.taskId;
|
||||
this.form.isFixed = '1';
|
||||
this.form.exCode = 'NXJJ'+this.form.typeCode+this.form.specsCode;
|
||||
// this.open = true;
|
||||
// this.title = "生成编码";
|
||||
this.codeList=[]
|
||||
this.open = true;
|
||||
this.title = "生成编码";
|
||||
// let param = {
|
||||
// taskId:this.taskId,
|
||||
// typeId:row.typeId,
|
||||
// }
|
||||
// getMacodeDetailList(param).then(response => {
|
||||
// this.codeList = response.data;
|
||||
|
||||
// });
|
||||
|
||||
},
|
||||
//生成列表codeList
|
||||
createCodeList(){
|
||||
// console.log(this.form.checkNum)
|
||||
// console.log(this.codeList.length)
|
||||
// console.log(this.newCodeList)
|
||||
|
||||
if(this.codeList.length>=this.form.checkNum){
|
||||
this.$modal.msgError("生成编码数量不可超过采购验收数量!!!");
|
||||
}else{
|
||||
|
|
@ -363,52 +361,71 @@ export default {
|
|||
},
|
||||
//填充按钮
|
||||
fillingCodeList(){
|
||||
// console.log(this.form.checkNum)
|
||||
|
||||
// console.log(this.getCodeList,'getCodeList')
|
||||
// console.log(this.newCodeList,'newCodeList')
|
||||
// console.log(this.codeList)
|
||||
// let emptyNum = 0;
|
||||
// for(let i = 0; i < this.codeList.length; i++) {
|
||||
// if(!this.codeList.maCode || this.codeList.maCode==''){
|
||||
// emptyNum = emptyNum+1;
|
||||
// }
|
||||
// };
|
||||
// console.log(emptyNum,'emptyNum')
|
||||
if(this.newCodeList.length>0){
|
||||
let param = {
|
||||
"typeId": this.form.typeId,
|
||||
"count": this.newCodeList.length
|
||||
}
|
||||
makeEquipmentNumber(param).then(response => {
|
||||
// this.newCodeList.forEach((item,index) => {
|
||||
// this.$set(item,'maCode',response.data.equipmentNum);
|
||||
console.log(Number(this.form.str))
|
||||
this.codeList = []
|
||||
let num = Number(this.form.str)
|
||||
console.log(Number(this.form.str1))
|
||||
let num1 = Number(this.form.str1)
|
||||
let count= num1-num+1;//生成数量
|
||||
|
||||
// });
|
||||
response.data.equipmentNum.forEach((item,index) => {
|
||||
this.$set(this.newCodeList[index], 'maCode', item);
|
||||
// this.newCodeList[index].maCode = item
|
||||
});
|
||||
console.log(this.newCodeList)
|
||||
this.codeList = this.getCodeList.concat(this.newCodeList)
|
||||
|
||||
// response.equipmentNum
|
||||
});
|
||||
let sum = count + this.form.bindNum;
|
||||
console.log(sum)
|
||||
if(sum>this.form.checkNum){
|
||||
this.$modal.msgError("编码数量已超过验收数量");
|
||||
}else{
|
||||
this.$modal.msgError("已全部绑定过设备编码");
|
||||
if(num1>num){
|
||||
for(let i = 0; i < count; i++) {
|
||||
let obj = {
|
||||
typeName:this.form.typeName,
|
||||
specificationType:this.form.specificationType,
|
||||
typeId: this.form.typeId,
|
||||
taskId: this.form.taskId,
|
||||
maCode:this.form.exCode+(i+num),
|
||||
assetsCode:'',
|
||||
isFixed:this.form.isFixed,
|
||||
}
|
||||
this.codeList.push(obj)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
console.log(this.newCodeList)
|
||||
if(this.newCodeList.length==0){
|
||||
console.log(this.codeList)
|
||||
|
||||
// for(let i = 0; i < this.codeListt; i++) {
|
||||
// if(this.codeList[i].maCode==''){
|
||||
// this.$modal.msgError("设备编码不能为空");
|
||||
// return false
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
if(this.codeList.length==0){
|
||||
this.$modal.msgError("无新增编码绑定");
|
||||
}else{
|
||||
editPurchaseMacode(this.newCodeList).then(response => {
|
||||
this.$modal.msgSuccess("绑定成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
||||
|
||||
|
||||
editPurchaseMacode(this.codeList).then(response => {
|
||||
console.log(response.data)
|
||||
if(response.data && response.data.length>0){
|
||||
this.codeList = response.data;
|
||||
// this.codeList.forEach(item=>{
|
||||
// if(item.statusFlag==1){
|
||||
// item.maCode=''
|
||||
// }
|
||||
// })
|
||||
|
||||
|
||||
}else{
|
||||
this.$modal.msgSuccess("绑定成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -466,3 +483,10 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.redColor{
|
||||
color: red;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.purchasingStatus=='已验收合格'"
|
||||
@click="handleCode(scope.row)"
|
||||
>编码管理</el-button>
|
||||
<el-button
|
||||
|
|
|
|||
|
|
@ -1,56 +1,55 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="名称" prop="dictName">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入名称"
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="提交入库时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="规格型号" prop="status">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.status"-->
|
||||
<!-- placeholder="请选择规格型号"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.sys_normal_disable"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="设备类型" prop="status">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.status"-->
|
||||
<!-- placeholder="请选择设备类型"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.sys_normal_disable"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="提交入库时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.submitStorageTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
range-separator="-"
|
||||
placeholder="提交入库时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typeList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="modelId">
|
||||
<el-select
|
||||
v-model="queryParams.modelId"
|
||||
placeholder="请选择规格型号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="model in modelList"
|
||||
:key="model.typeId"
|
||||
:label="model.typeName"
|
||||
:value="model.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
|
|
@ -59,7 +58,7 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
|
|
@ -69,7 +68,7 @@
|
|||
@click="handleAdd"
|
||||
v-hasPermi="['system:dict:add']"
|
||||
>入库审核</el-button>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
|
|
@ -92,7 +91,7 @@
|
|||
<!-- v-hasPermi="['system:dict:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
|
|
@ -101,47 +100,42 @@
|
|||
@click="handleExport"
|
||||
v-hasPermi="['system:dict:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<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="dictId" />
|
||||
<el-table-column label="采购日期" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货日期" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不通过原因" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<el-table v-loading="loading" :data="tableList" >
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column label="序号" align="center" type="index" width="55px"/>
|
||||
|
||||
|
||||
<el-table-column label="采购单号" align="center" prop="code" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="采购日期" align="center" prop="purchaseTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="到货日期" align="center" prop="arrivalTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="采购机具设备" align="center" prop="purchasingTypeName" :show-overflow-tooltip="true" width="250"/>
|
||||
<el-table-column label="采购员" align="center" prop="purchaserName" :show-overflow-tooltip="true" width="100"/>
|
||||
<el-table-column label="发布人员" align="center" prop="createBy" :show-overflow-tooltip="true" width="100"/>
|
||||
<el-table-column label="发布时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="不通过原因" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="状态" align="center" prop="taskStatus">
|
||||
<!-- <template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||
</template>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
|
||||
<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-edit"
|
||||
@click="handleView(scope.row)"
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:dict:edit']"
|
||||
>审核</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
|
|
@ -165,23 +159,63 @@
|
|||
|
||||
|
||||
|
||||
<!-- 审核对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="名称" prop="dictName">
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form :model="query" ref="query" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="关键字" prop="dictName">
|
||||
<el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入名称"
|
||||
v-model="query.dictName"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- <el-form-item label="状态" prop="status">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
placeholder="审核状态"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option label="未审核" value="0" />
|
||||
<el-option label="已入库" value="1" />
|
||||
<el-option label="驳回" value="2" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="设备类型" prop="typeId">
|
||||
<el-select
|
||||
v-model="query.typeId"
|
||||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typeList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="modelId">
|
||||
<el-select
|
||||
v-model="query.modelId"
|
||||
placeholder="请选择规格型号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="model in modelList"
|
||||
:key="model.typeId"
|
||||
:label="model.typeName"
|
||||
:value="model.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
|
||||
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
|
|
@ -189,21 +223,19 @@
|
|||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
v-hasPermi="['system:dict:add']"
|
||||
>通过</el-button>
|
||||
@click="passAll"
|
||||
>批量通过</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="refusedAll"
|
||||
:disabled="multiple"
|
||||
v-hasPermi="['system:dict:add']"
|
||||
>不通过</el-button>
|
||||
>批量不通过</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
|
|
@ -216,34 +248,30 @@
|
|||
<!-- >导出</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="detailTableList" @selection-change="handleSelectionChange" height="400">
|
||||
<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" type="index" />
|
||||
<el-table-column label="机具类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="数量" align="center" prop="repairNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="编号" align="center" prop="maCode" :show-overflow-tooltip="true" />
|
||||
|
||||
<el-table-column label="不通过原因" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="showHandle">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-hasPermi="['system:dict:edit']"
|
||||
@click="pass(scope.row)"
|
||||
>通过</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:dict:remove']"
|
||||
@click="refused(scope.row)"
|
||||
>不通过</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
|
|
@ -257,26 +285,24 @@
|
|||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
v-show="dialogTotal>0"
|
||||
:total="dialogTotal"
|
||||
:page.sync="query.pageNum"
|
||||
:limit.sync="query.pageSize"
|
||||
@pagination="getDialogTable"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
|
||||
import { getRepairedDetailList, inputByType } from "@/api/store/warehousing";
|
||||
import { getPutInList,getPutinDetailsList ,changePutinStatus} from "@/api/store/newBuy";
|
||||
export default {
|
||||
name: "Dict",
|
||||
dicts: ['sys_normal_disable'],
|
||||
|
|
@ -294,12 +320,19 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 字典表格数据
|
||||
// 总条数
|
||||
dialogTotal: 0,
|
||||
//搜索下拉数据
|
||||
typeList: [],
|
||||
modelList: [],
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
detailTableList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
showHandle: true,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
|
|
@ -310,6 +343,11 @@ export default {
|
|||
dictType: undefined,
|
||||
status: undefined
|
||||
},
|
||||
query: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
|
@ -327,16 +365,28 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
|
||||
/** 查询字典类型列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.typeList = response.rows;
|
||||
getPutInList(this.queryParams).then(response => {
|
||||
this.tableList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
getDialogTable(){
|
||||
this.loading = true;
|
||||
getPutinDetailsList(this.query).then(response => {
|
||||
this.detailTableList = response.rows;
|
||||
this.dialogTotal = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
|
@ -358,34 +408,133 @@ export default {
|
|||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleDialogQuery() {
|
||||
this.query.pageNum = 1;
|
||||
this.getDialogTable();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
// this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加字典类型";
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.dictId)
|
||||
this.ids = selection.map(item => item)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const dictId = row.dictId || this.ids
|
||||
getType(dictId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改字典类型";
|
||||
});
|
||||
// this.reset();
|
||||
this.query.taskId = row.taskId
|
||||
this.getDialogTable()
|
||||
this.open = true;
|
||||
this.showHandle = true
|
||||
this.title = "审核";
|
||||
},
|
||||
//查看
|
||||
handleView(row) {
|
||||
this.query.taskId = row.taskId
|
||||
this.getDialogTable()
|
||||
this.open = true;
|
||||
this.showHandle = false
|
||||
this.title = "查看";
|
||||
},
|
||||
pass(row) {
|
||||
console.log(row)
|
||||
console.log(this.query.taskId)
|
||||
row.taskId = this.query.taskId;
|
||||
let obj = {
|
||||
taskId:this.query.taskId,
|
||||
checkResult:'1',//1 审核通过 2 驳回 -必填
|
||||
maId:row.maId,
|
||||
maCode:row.maCode,
|
||||
typeId:row.typeId,
|
||||
|
||||
// remark:row.remark,
|
||||
// repairNum:row.repairNum,
|
||||
}
|
||||
|
||||
let param =[obj]
|
||||
changePutinStatus(param).then(response => {
|
||||
if(response.code==200){
|
||||
this.$modal.msgSuccess("审批成功");
|
||||
this.getDialogTable();
|
||||
}else{
|
||||
this.$modal.msgSuccess("审批失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
passAll() {
|
||||
console.log(this.query.taskId)
|
||||
console.log(this.ids)
|
||||
this.ids.forEach(item => {
|
||||
item.taskId = this.query.taskId;
|
||||
item.checkType = '1'
|
||||
item.type= item.manageType//0.编号 1.计数
|
||||
});
|
||||
|
||||
changePutinStatus(this.ids).then(response => {
|
||||
if(response.code==200){
|
||||
this.$modal.msgSuccess("审批成功");
|
||||
this.getDialogTable();
|
||||
}else{
|
||||
this.$modal.msgSuccess("审批失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
refused(row) {
|
||||
console.log(row)
|
||||
console.log(this.query.taskId)
|
||||
row.taskId = this.query.taskId;
|
||||
let obj = {
|
||||
taskId:this.query.taskId,
|
||||
id:row.id,
|
||||
checkType:'2',//1 审核通过 2 驳回 -必填
|
||||
type:row.manageType,//0.编号 1.计数
|
||||
maId:row.maId,
|
||||
typeId:row.typeId,
|
||||
remark:row.remark,
|
||||
repairNum:row.repairNum,
|
||||
}
|
||||
|
||||
let param =[obj]
|
||||
changePutinStatus(param).then(response => {
|
||||
if(response.code==200){
|
||||
this.$modal.msgSuccess("审批成功");
|
||||
this.getDialogTable();
|
||||
}else{
|
||||
this.$modal.msgSuccess("审批失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
refusedAll() {
|
||||
console.log(this.query.taskId)
|
||||
console.log(this.ids)
|
||||
this.ids.forEach(item => {
|
||||
item.taskId = this.query.taskId;
|
||||
item.checkType = '2'
|
||||
item.type=item.manageType
|
||||
});
|
||||
|
||||
changePutinStatus(this.ids).then(response => {
|
||||
if(response.code==200){
|
||||
this.$modal.msgSuccess("审批成功");
|
||||
this.getDialogTable();
|
||||
}else{
|
||||
this.$modal.msgSuccess("审批失败");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
|
|
|
|||
|
|
@ -131,24 +131,24 @@
|
|||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="物品种类" prop="itemType">
|
||||
<el-input v-model="form.itemType" placeholder="请输入物品种类" />
|
||||
<el-input v-model="form.itemType" placeholder="请输入物品种类" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备类型" prop="deviceType">
|
||||
<el-input v-model="form.deviceType" placeholder="请输入设备类型" />
|
||||
<el-input v-model="form.deviceType" placeholder="请输入设备类型" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="规格型号" prop="specificationType">
|
||||
<el-input v-model="form.specificationType" placeholder="请输入规格型号" />
|
||||
<el-input v-model="form.specificationType" placeholder="请输入规格型号" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备编号" prop="maCode">
|
||||
<el-input v-model="form.maCode" placeholder="请输入设备编号" />
|
||||
<el-input v-model="form.maCode" placeholder="请输入设备编号" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@
|
|||
</el-row>
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
|
||||
<el-dialog :title="title" :visible.sync="open" width="850px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
|
@ -273,16 +273,15 @@
|
|||
<el-form-item label="图片" prop="photoName">
|
||||
<el-upload
|
||||
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
||||
action="#"
|
||||
action="#" :limit='1'
|
||||
:file-list="fileList"
|
||||
:show-file-list="false"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
accept=".png,.jpg,.jpeg"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove">
|
||||
<img v-if="imageUrl" :src="uploadUrl+imageUrl" style="width: 140px;height: 140px;" class="avatar">
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
<i class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
@ -337,7 +336,7 @@
|
|||
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
<img width="100%" height="650px" :src="dialogImageUrl" alt="">
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
|
@ -728,13 +727,10 @@ export default {
|
|||
},
|
||||
handleAvatarSuccess(res,file) {
|
||||
console.log("success")
|
||||
|
||||
// this.imageUrl = URL.createObjectURL(file.raw);
|
||||
// console.log(this.imageUrl)
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
console.log(this.form,'222222')
|
||||
this.imageUrl = "";
|
||||
this.form.photoUrl = "";
|
||||
this.form.photoName = "";
|
||||
},
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="提交入库时间">
|
||||
<el-form-item label="维修时间时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.submitStorageTime"
|
||||
v-model="queryParams.wxTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
placeholder="提交入库时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型" prop="typeId">
|
||||
<!-- <el-form-item label="设备类型" prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择设备类型"
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
:value="model.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
|
||||
|
|
@ -136,6 +136,7 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="taskStatus=='入库进行中'"
|
||||
>审核</el-button>
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
|
|
@ -183,9 +184,9 @@
|
|||
<el-option label="驳回" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="设备类型" prop="typeId">
|
||||
<el-form-item label="设备类型" prop="deviceTypeId">
|
||||
<el-select
|
||||
v-model="query.typeId"
|
||||
v-model="query.deviceTypeId"
|
||||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
|
|
@ -198,9 +199,9 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="modelId">
|
||||
<el-form-item label="规格型号" prop="typeId">
|
||||
<el-select
|
||||
v-model="query.modelId"
|
||||
v-model="query.typeId"
|
||||
placeholder="请选择规格型号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
|
|
@ -212,7 +213,7 @@
|
|||
:value="model.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
|
||||
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
|
||||
|
|
@ -260,7 +261,11 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="不通过原因" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status=='0'">未审核</span>
|
||||
<span v-if="scope.row.status=='1'">已入库</span>
|
||||
<span v-if="scope.row.status=='2'">驳回 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="showHandle">
|
||||
|
|
@ -269,10 +274,12 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
@click="pass(scope.row)"
|
||||
v-if="scope.row.status=='0'"
|
||||
>通过</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status=='0'"
|
||||
@click="refused(scope.row)"
|
||||
>不通过</el-button>
|
||||
<!-- <el-button-->
|
||||
|
|
|
|||
Loading…
Reference in New Issue