新购验收编码管理-1221-zzy
This commit is contained in:
parent
5564d3d391
commit
bb40579796
|
|
@ -1,5 +1,5 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
// 查询列表
|
// 查询新购任务列表
|
||||||
export function listPurchaseCheckInfo(query) {
|
export function listPurchaseCheckInfo(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/material/purchaseCheckInfo/list',
|
url: '/material/purchaseCheckInfo/list',
|
||||||
|
|
@ -7,7 +7,7 @@ export function listPurchaseCheckInfo(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//新增任务
|
//新增新购任务
|
||||||
export function addPurchaseCheckInfo(data) {
|
export function addPurchaseCheckInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/material/purchaseCheckInfo',
|
url: '/material/purchaseCheckInfo',
|
||||||
|
|
@ -15,12 +15,20 @@ export function listPurchaseCheckInfo(query) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//编辑新购任务
|
||||||
//任务 详情
|
export function updatePurchaseCheckInfo(data) {
|
||||||
export function getPurchaseCheckInfo(taskId) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/material/purchaseCheckInfo/' + taskId,
|
url: '/material/purchaseCheckInfo',
|
||||||
method: 'get'
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//任务 详情
|
||||||
|
export function getPurchaseCheckInfo(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/purchaseCheckInfo/getDetails',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//消息通知
|
//消息通知
|
||||||
|
|
@ -83,9 +91,47 @@ export function delMacode(taskIds) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//新购验收-编号管理-绑定弹窗详情列表
|
||||||
|
export function getMacodeList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/purchaseMacode/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//新购验收-编号管理-绑定弹窗详情列表
|
||||||
|
export function getMacodeDetailList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/material/purchaseMacode/getInfo',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//新购验收-编号管理-生成编码
|
||||||
|
export function makeEquipmentNumber(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/purchaseMacode/equipmentNumber',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//新购验收-编号管理-保存
|
||||||
|
export function editPurchaseMacode(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/purchaseMacode',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export function delMacodeList(maCode) {
|
||||||
|
return request({
|
||||||
|
url: '/material/purchaseMacode/' + maCode,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<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="dictName">
|
<el-form-item label="名称" prop="keyWord">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.dictName"
|
v-model="queryParams.keyWord"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入名称"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
|
|
@ -20,32 +20,29 @@
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="success"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleNotice"
|
@click="handleNotice"
|
||||||
>通知</el-button>
|
>通知</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
|
||||||
plain
|
plain
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="jumpList"
|
@click="jumpList"
|
||||||
>采购验收管理</el-button>
|
>采购验收管理</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
<!-- <el-col :span="1.5">-->
|
<el-button
|
||||||
<!-- <el-button-->
|
type="primary"
|
||||||
<!-- type="danger"-->
|
plain
|
||||||
<!-- plain-->
|
size="mini"
|
||||||
<!-- icon="el-icon-delete"-->
|
:disabled="multiple"
|
||||||
<!-- size="mini"-->
|
@click="handleListCheck"
|
||||||
<!-- :disabled="multiple"-->
|
>批量验收</el-button>
|
||||||
<!-- @click="handleDelete"-->
|
</el-col>
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
|
|
@ -54,9 +51,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
|
|
||||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
|
||||||
|
|
@ -73,8 +68,11 @@
|
||||||
<el-table-column label="机具厂家" align="center" prop="supplier" :show-overflow-tooltip="true" />
|
<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="checkNum" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="是否已具备设备自编号" align="center" prop="dictName" :show-overflow-tooltip="true" />
|
<el-table-column label="验收图片" align="center" prop="checkUrlName" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="验收图片" align="center" prop="checkUrl" :show-overflow-tooltip="true" />
|
<template slot-scope="scope">
|
||||||
|
<span @click="openImg(scope.row.checkUrl)" style="color: #02A7F0;"> {{ scope.row.checkUrlName }} </span>
|
||||||
|
</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">
|
<el-table-column label="状态" align="center" prop="status" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -96,23 +94,12 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
>编码管理</el-button> -->
|
>编码管理</el-button> -->
|
||||||
<!-- <el-button
|
|
||||||
size="mini"
|
|
||||||
type="text"
|
|
||||||
icon="el-icon-delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>删除</el-button> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 验收弹窗 -->
|
<!-- 验收弹窗 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||||
|
|
@ -123,18 +110,27 @@
|
||||||
<el-form-item label="规格型号" prop="specificationType">
|
<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>
|
||||||
<el-form-item label="验收数量" prop="checkNum">
|
<el-form-item label="采购数量" prop="purchaseNum">
|
||||||
<el-input v-model="form.checkNum" placeholder="" disabled/>
|
<el-input v-model="form.purchaseNum" placeholder="" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="验收结论" prop="checkResult">
|
<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-radio v-model="form.checkResult" label="不通过">不通过</el-radio>
|
<el-radio v-model="form.checkResult" label="不通过">不通过</el-radio>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="验收通过数量" prop="inputNum">
|
<el-form-item label="验收通过数量" prop="checkNum">
|
||||||
<el-input-number v-model="form.inputNum" style="width:100%;" controls-position="right" :min="0" />
|
<el-input-number v-model="form.checkNum" style="width:100%;" controls-position="right" :min="0" :max="form.purchaseNum" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="验收图片" prop="checkUrl">
|
<el-form-item label="验收图片" prop="checkUrl">
|
||||||
<el-input v-model="form.checkUrl" placeholder="图片上传" />
|
<el-upload
|
||||||
|
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
||||||
|
action="#"
|
||||||
|
:file-list="fileList"
|
||||||
|
:show-file-list="false"
|
||||||
|
list-type="picture-card"
|
||||||
|
accept=".png,.jpg,.jpeg">
|
||||||
|
<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>
|
||||||
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
|
|
@ -143,6 +139,33 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 批量验收弹窗 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="openAll" width="600px" 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>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验收图片" prop="checkUrl">
|
||||||
|
<el-upload
|
||||||
|
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
||||||
|
action="#"
|
||||||
|
:file-list="fileList"
|
||||||
|
:show-file-list="false"
|
||||||
|
list-type="picture-card"
|
||||||
|
accept=".png,.jpg,.jpeg">
|
||||||
|
<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>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
|
<el-button type="primary" @click="submitListForm">确 定</el-button>
|
||||||
|
<el-button @click="openAll=false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 通知弹窗 -->
|
<!-- 通知弹窗 -->
|
||||||
<el-dialog :title="title" :visible.sync="noticeOpen" width="1000px" append-to-body>
|
<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 ref="nform" :model="nform" :rules="nrules" label-width="100px">
|
||||||
|
|
@ -151,7 +174,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="noticeUserList" height="500">
|
<el-table v-loading="loading" :data="noticeUserList" height="400">
|
||||||
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
<!-- <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="userId" prop="userId" />
|
||||||
<el-table-column label="人员名称" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
|
<el-table-column label="人员名称" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
|
||||||
|
|
@ -213,6 +236,9 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="dialogVisible">
|
||||||
|
<img width="100%" :src="dialogImageUrl" alt="">
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -220,6 +246,7 @@
|
||||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||||
import { getPurchaseCheckInfo,bmNoticeInfo,updatePurchaseCheckDetails } from "@/api/store/newBuy";
|
import { getPurchaseCheckInfo,bmNoticeInfo,updatePurchaseCheckDetails } from "@/api/store/newBuy";
|
||||||
import { getUserByRoleList } from "@/api/system/user";
|
import { getUserByRoleList } from "@/api/system/user";
|
||||||
|
import { imgUpLoad,fileUpLoad } from "@/api/system/upload";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Dict",
|
name: "Dict",
|
||||||
|
|
@ -254,16 +281,26 @@ export default {
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
openAll: false,
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
dictName: undefined,
|
keyWord: undefined,
|
||||||
dictType: undefined,
|
|
||||||
status: undefined
|
|
||||||
},
|
},
|
||||||
|
//图片上传参数---
|
||||||
|
imageUrl:'',
|
||||||
|
imageName:'',
|
||||||
|
fileList:[],
|
||||||
|
field101fileList:[],
|
||||||
|
//上传地址
|
||||||
|
uploadUrl:'http://192.168.0.14:21624/system',//线上服务器地址+system
|
||||||
|
// uploadUrl:'http://10.40.92.140:9201',//本地测试
|
||||||
|
dialogImageUrl: '',
|
||||||
|
dialogVisible: false,
|
||||||
|
//--------------
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
|
|
@ -271,12 +308,23 @@ export default {
|
||||||
checkResult: [
|
checkResult: [
|
||||||
{ required: true, message: "验收结论不能为空", trigger: "blur" }
|
{ required: true, message: "验收结论不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
inputNum: [
|
checkNum: [
|
||||||
{ required: true, message: "验收通过数量不能为空", trigger: "blur" }
|
{ required: true, message: "验收通过数量不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
checkUrl: [
|
checkUrl: [
|
||||||
{ required: true, message: "验收图片不能为空", trigger: "blur" }
|
{ required: true, message: "验收图片不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
aform: {},
|
||||||
|
// 表单校验
|
||||||
|
arules: {
|
||||||
|
checkResult: [
|
||||||
|
{ required: true, message: "验收结论不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
checkUrl: [
|
||||||
|
{ required: true, message: "验收图片不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
},
|
},
|
||||||
peopleOpen:false,
|
peopleOpen:false,
|
||||||
noticeOpen:false,
|
noticeOpen:false,
|
||||||
|
|
@ -303,29 +351,17 @@ export default {
|
||||||
//获取任务详情-列表数据
|
//获取任务详情-列表数据
|
||||||
getTaskInfo(){
|
getTaskInfo(){
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getPurchaseCheckInfo(this.taskId).then(response => {
|
getPurchaseCheckInfo({taskId:this.taskId,keyWord:this.queryParams.keyWord}).then(response => {
|
||||||
this.taskInfo = response.data
|
this.taskInfo = response.data
|
||||||
this.equipmentList = response.data.checkDetailsList;
|
this.equipmentList = response.data.checkDetailsList;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 返回列表页
|
// 返回列表页
|
||||||
jumpList(){
|
jumpList(){
|
||||||
const obj = { path: "/store/newBuy/newDevicesList" }
|
const obj = { path: "/store/newBuy/newDevicesList" }
|
||||||
this.$tab.closeOpenPage(obj);
|
this.$tab.closeOpenPage(obj);
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 查询字典类型列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
||||||
this.equipmentList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
|
@ -347,7 +383,7 @@ export default {
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getTaskInfo();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
|
@ -409,9 +445,9 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
configNotice(){
|
configNotice(){
|
||||||
console.log(this.nform.notice,'message')
|
// console.log(this.nform.notice,'message')
|
||||||
console.log(this.taskInfo.taskId,'taskId')
|
// console.log(this.taskInfo.taskId,'taskId')
|
||||||
console.log(this.noticeUserList,'bmNoticeInfoList')
|
// console.log(this.noticeUserList,'bmNoticeInfoList')
|
||||||
this.noticeUserList.forEach((item,index)=>{
|
this.noticeUserList.forEach((item,index)=>{
|
||||||
item.noticeUser = item.userId;
|
item.noticeUser = item.userId;
|
||||||
item.phone = item.phonenumber;
|
item.phone = item.phonenumber;
|
||||||
|
|
@ -429,7 +465,7 @@ export default {
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
this.noticeOpen = false
|
this.noticeOpen = false
|
||||||
|
this.getTaskInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
@ -437,32 +473,45 @@ export default {
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.dictId)
|
this.ids = selection.map(item => item)
|
||||||
this.single = selection.length!=1
|
this.single = selection.length!=1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 验收按钮操作 */
|
||||||
handleCheck(row) {
|
handleCheck(row) {
|
||||||
// this.reset();
|
|
||||||
// const dictId = row.dictId || this.ids
|
|
||||||
// getType(dictId).then(response => {
|
|
||||||
console.log(row)
|
console.log(row)
|
||||||
let rowData = row
|
let rowData = row
|
||||||
rowData.checkNum = rowData.purchaseNum;
|
rowData.checkNum = rowData.purchaseNum;
|
||||||
|
rowData.checkResult = rowData.purchaseNum || "通过";
|
||||||
this.form = rowData;
|
this.form = rowData;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
this.imageUrl = rowData.checkUrl
|
||||||
this.title = "验收";
|
this.title = "验收";
|
||||||
// });
|
},
|
||||||
|
/** 批量验收按钮操作 */
|
||||||
|
handleListCheck() {
|
||||||
|
console.log(this.ids)
|
||||||
|
|
||||||
|
this.aform = {
|
||||||
|
checkResult:'通过',
|
||||||
|
checkUrl:'',
|
||||||
|
checkUrlName:'',
|
||||||
|
};
|
||||||
|
this.imageUrl = ''
|
||||||
|
this.openAll = true;
|
||||||
|
this.title = "批量验收";
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
|
console.log(this.form)
|
||||||
|
let equipments = [this.form]
|
||||||
|
console.log(equipments)
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let param = [this.form]
|
updatePurchaseCheckDetails(equipments).then(response => {
|
||||||
updatePurchaseCheckDetails(param).then(response => {
|
|
||||||
if(response.code == 200){
|
if(response.code == 200){
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '操作成功',
|
message: '验收成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
|
@ -472,16 +521,65 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
submitListForm: function() {
|
||||||
handleDelete(row) {
|
console.log(this.aform)
|
||||||
const dictIds = row.dictId || this.ids;
|
this.ids.forEach(item=>{
|
||||||
this.$modal.confirm('是否确认删除该数据项?').then(function() {
|
item.checkNum = item.purchaseNum
|
||||||
return delType(dictIds);
|
item.checkResult = this.aform.checkResult
|
||||||
}).then(() => {
|
item.checkUrl = this.aform.checkUrl
|
||||||
this.getList();
|
item.checkUrlName = this.aform.checkUrlName
|
||||||
this.$modal.msgSuccess("删除成功");
|
})
|
||||||
}).catch(() => {});
|
console.log(this.ids)
|
||||||
|
let equipments = this.ids
|
||||||
|
console.log(equipments)
|
||||||
|
this.$refs["aform"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
updatePurchaseCheckDetails(equipments).then(response => {
|
||||||
|
if(response.code == 200){
|
||||||
|
this.$message({
|
||||||
|
message: '验收成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
this.openAll = false;
|
||||||
|
this.open = false;
|
||||||
|
this.getTaskInfo();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
// 图片上传
|
||||||
|
imgUpLoad(param,name,index) {
|
||||||
|
console.log(param,'image')
|
||||||
|
param.type = 'ma'
|
||||||
|
imgUpLoad(param).then(res => {
|
||||||
|
if(res.code == 200) {
|
||||||
|
if(this.open){
|
||||||
|
this.form.checkUrl = res.data.fileUrl;
|
||||||
|
this.form.checkUrlName = res.data.fileName;
|
||||||
|
}
|
||||||
|
if(this.openAll){
|
||||||
|
this.aform.checkUrl = res.data.fileUrl;
|
||||||
|
this.aform.checkUrlName = 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);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//图片查看
|
||||||
|
openImg(url){
|
||||||
|
this.dialogImageUrl = this.uploadUrl + url;
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('system/dict/type/export', {
|
this.download('system/dict/type/export', {
|
||||||
|
|
|
||||||
|
|
@ -2,39 +2,44 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-row :gutter="24" class="mb8">
|
<el-row :gutter="24" class="mb8">
|
||||||
<!-- <el-col :span="4" style="text-align:center;"><h4>新购任务信息:</h4></el-col> -->
|
<!-- <el-col :span="4" style="text-align:center;"><h4>新购任务信息:</h4></el-col> -->
|
||||||
<el-col :span="16">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" >
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" >
|
||||||
<el-form-item label="机具类型" prop="equipmentId">
|
<el-col :span="5">
|
||||||
<treeselect v-model="queryParams.equipmentId" default-expand-all :options="equipmentTypeList" placeholder="请选择机具类型" @select="select" style="width: 250px;"/>
|
<el-form-item label="机具类型" prop="equipmentId">
|
||||||
</el-form-item>
|
<treeselect v-model="queryParams.equipmentId" default-expand-all :options="equipmentTypeList" placeholder="请选择机具类型" @select="select" style="width: 240px;"/>
|
||||||
<el-form-item label="出厂日期">
|
</el-form-item>
|
||||||
<el-date-picker
|
</el-col>
|
||||||
v-model="queryParams.productionTime"
|
<el-col :span="5">
|
||||||
style="width: 240px"
|
<el-form-item label="出厂日期">
|
||||||
value-format="yyyy-MM-dd"
|
<el-date-picker
|
||||||
type="date"
|
v-model="queryParams.productionTime"
|
||||||
range-separator="-"
|
style="width: 240px"
|
||||||
start-placeholder="开始日期"
|
value-format="yyyy-MM-dd"
|
||||||
end-placeholder="结束日期"
|
type="date"
|
||||||
></el-date-picker>
|
placeholder="出厂日期"
|
||||||
</el-form-item>
|
@change="changeTime"
|
||||||
<el-form-item label="机具厂家" prop="supplierId">
|
></el-date-picker>
|
||||||
<el-select
|
</el-form-item>
|
||||||
v-model="queryParams.supplierId"
|
</el-col>
|
||||||
placeholder="机具厂家"
|
<el-col :span="5">
|
||||||
clearable
|
<el-form-item label="机具厂家" prop="supplierId">
|
||||||
style="width: 240px"
|
<el-select
|
||||||
>
|
v-model="queryParams.supplierId"
|
||||||
<el-option
|
placeholder="机具厂家"
|
||||||
v-for="item in supplierList"
|
clearable
|
||||||
:key="item.supplierId"
|
style="width: 240px"
|
||||||
:label="item.supplier"
|
@change="changeSupplier"
|
||||||
:value="item.supplierId"
|
>
|
||||||
/>
|
<el-option
|
||||||
</el-select>
|
v-for="item in supplierList"
|
||||||
</el-form-item>
|
:key="item.supplierId"
|
||||||
</el-form>
|
:label="item.supplier"
|
||||||
</el-col>
|
:value="item.supplierId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9"></el-col>
|
||||||
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form :model="dataForm" ref="dataForm" :rules="rules" size="small" :inline="true">
|
<el-form :model="dataForm" ref="dataForm" :rules="rules" size="small" :inline="true">
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|
@ -67,7 +72,6 @@
|
||||||
:key="item.userId"
|
:key="item.userId"
|
||||||
:label="item.userName"
|
:label="item.userName"
|
||||||
:value="item.userId"
|
:value="item.userId"
|
||||||
v-if="item.status !='1'"
|
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -89,7 +93,7 @@
|
||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleSave"
|
||||||
>保存</el-button>
|
>保存</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
|
|
@ -131,7 +135,7 @@
|
||||||
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="序号" type="index" width="55"/>
|
<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 label="规格型号" prop="specificationType" :show-overflow-tooltip="true" width="200"/>
|
<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="unitName" width="100" />
|
||||||
<el-table-column label="购置单价(元)" prop="purchasePrice" align="center" width="150">
|
<el-table-column label="购置单价(元)" prop="purchasePrice" align="center" width="150">
|
||||||
|
|
@ -139,7 +143,7 @@
|
||||||
<el-input v-model="scope.row.purchasePrice" type="number" maxlength="10"></el-input>
|
<el-input v-model="scope.row.purchasePrice" type="number" maxlength="10"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.purchaseNum"></el-input>
|
<el-input v-model="scope.row.purchaseNum"></el-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -191,7 +195,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addPurchaseCheckInfo } from "@/api/store/newBuy";
|
import { addPurchaseCheckInfo,getPurchaseCheckInfo,updatePurchaseCheckInfo } from "@/api/store/newBuy";
|
||||||
import { getUserByRoleList } from "@/api/system/user";
|
import { getUserByRoleList } from "@/api/system/user";
|
||||||
import { equipmentTypeTree ,supplierInfoList} from "@/api/store/tools";
|
import { equipmentTypeTree ,supplierInfoList} from "@/api/store/tools";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
|
|
@ -206,6 +210,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
taskId:'',
|
taskId:'',
|
||||||
|
isEdit:false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: false,
|
loading: false,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
|
|
@ -300,6 +305,14 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
const taskId = this.$route.query && this.$route.query.taskId;
|
const taskId = this.$route.query && this.$route.query.taskId;
|
||||||
this.taskId = taskId;
|
this.taskId = taskId;
|
||||||
|
if(this.taskId=='' || !this.taskId){
|
||||||
|
this.isEdit = false
|
||||||
|
}else if(this.taskId!=''){
|
||||||
|
this.isEdit = true;
|
||||||
|
this.getTaskInfo()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
this.getUserList()
|
this.getUserList()
|
||||||
// this.getList();
|
// this.getList();
|
||||||
this.equipmentType();
|
this.equipmentType();
|
||||||
|
|
@ -344,6 +357,7 @@ export default {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//添加机具类型
|
||||||
select(row){
|
select(row){
|
||||||
if(row.level==4){
|
if(row.level==4){
|
||||||
for(let i = 0; i < this.equipmentList.length; i++) {
|
for(let i = 0; i < this.equipmentList.length; i++) {
|
||||||
|
|
@ -352,12 +366,40 @@ export default {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
row.productionTime = this.queryParams.productionTime
|
||||||
|
row.supplierId = this.queryParams.supplierId
|
||||||
this.equipmentList.unshift(row)
|
this.equipmentList.unshift(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//选择机具厂家
|
||||||
|
changeSupplier(supplierId){
|
||||||
|
this.equipmentList.forEach(item=>{
|
||||||
|
this.$set(item, 'supplierId', supplierId);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//选择出厂日期
|
||||||
|
changeTime(time){
|
||||||
|
console.log(time)
|
||||||
|
this.equipmentList.forEach(item=>{
|
||||||
|
this.$set(item, 'productionTime', time);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//获取任务详情--- 编辑回显数据
|
||||||
|
getTaskInfo(){
|
||||||
|
// 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.equipmentList = response.data.checkDetailsList;
|
||||||
|
// this.loading = false;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
/** 查询右侧列表 */
|
/** 查询右侧列表 */
|
||||||
getList() {
|
getList() {
|
||||||
// this.loading = true;
|
// this.loading = true;
|
||||||
|
|
@ -409,21 +451,56 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleSave() {
|
||||||
// this.$modal.confirm('是否确认').then(function() {
|
// this.$modal.confirm('是否确认').then(function() {
|
||||||
this.$refs["dataForm"].validate(valid => {
|
this.$refs["dataForm"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log(this.dataForm,'dataForm')
|
console.log(this.dataForm,'dataForm')
|
||||||
console.log(this.equipmentList,'equipmentList')
|
console.log(this.equipmentList,'equipmentList')
|
||||||
this.dataForm.checkDetailsList = this.equipmentList;
|
let isEmpty = true
|
||||||
this.loading = true;
|
this.equipmentList.forEach(item=>{
|
||||||
addPurchaseCheckInfo(this.dataForm).then(response => {
|
if(item.purchaseNum=='' || !item.purchaseNum){
|
||||||
if(response.code == 200){
|
isEmpty = false
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.$tab.closeOpenPage({ path: "/store/newBuy/newDevicesList" });
|
|
||||||
}
|
}
|
||||||
this.loading = 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;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("请先选择并添加机具类型!!!");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("请填写采购数量!!!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -446,6 +523,13 @@ export default {
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
|
console.log(row.id)
|
||||||
|
this.equipmentList.forEach((item,index)=>{
|
||||||
|
if(item.id == row.id){
|
||||||
|
this.equipmentList.splice(index,1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// const roleIds = row.roleId || this.ids;
|
// const roleIds = row.roleId || this.ids;
|
||||||
// this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
|
// this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
|
||||||
// return delRole(roleIds);
|
// return delRole(roleIds);
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<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="dictName">
|
<el-form-item label="名称" prop="typeName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.dictName"
|
v-model="queryParams.typeName"
|
||||||
placeholder="请输入名称"
|
placeholder="请输入名称"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['store:labelType:add']"
|
v-hasPermi="['store:labelType:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -36,57 +36,40 @@
|
||||||
@click="jumpList"
|
@click="jumpList"
|
||||||
>采购验收管理</el-button>
|
>采购验收管理</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="success"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- :disabled="single"-->
|
|
||||||
<!-- @click="handleUpdate"-->
|
|
||||||
<!-- v-hasPermi="['store:labelType:edit']"-->
|
|
||||||
<!-- >修改</el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="1.5">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="danger"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- :disabled="multiple"-->
|
|
||||||
<!-- @click="handleDelete"-->
|
|
||||||
<!-- v-hasPermi="['store:labelType:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['store:labelType:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col> -->
|
|
||||||
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="codeList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||||
<el-table-column label="序号" align="center" type="index" />
|
<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="typeName" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="规格型号" align="center" prop="specificationType" :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="purchaseTime" :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="bindNum" :show-overflow-tooltip="true" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
<span v-if="scope.row.bindNum>0">{{ scope.row.bindNum }}</span>
|
||||||
|
<span v-else >0</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="是否为固定资产" align="center" prop="fixCode" :show-overflow-tooltip="true" >
|
<el-table-column label="是否为固定资产" align="center" prop="fixCode" :show-overflow-tooltip="true" >
|
||||||
</el-table-column>
|
|
||||||
<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">
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.fixCode == '0'">是</span>
|
||||||
|
<span v-if="scope.row.fixCode == '1'">否</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <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==0">删除</span>
|
||||||
<span v-if="scope.row.status==1">正常</span>
|
<span v-if="scope.row.status==1">正常</span>
|
||||||
</template>
|
</template> -->
|
||||||
</el-table-column>
|
</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">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -94,88 +77,110 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleCode(scope.row)"
|
||||||
v-hasPermi="['store:labelType:edit']"
|
>绑定编码</el-button>
|
||||||
>编辑</el-button>
|
<!-- <el-button
|
||||||
<el-button
|
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['store:labelType:remove']"
|
>删除</el-button> -->
|
||||||
>删除</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<!--
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/> -->
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-row :gutter="24" class="mb8">
|
||||||
<el-form-item label="机具类型名称" prop="typeId">
|
<el-form ref="form" :model="form" :rules="rules" label-width="78px">
|
||||||
<el-select
|
<el-input v-model="form.typeId" disabled v-show="false"/>
|
||||||
v-model="form.typeId"
|
<el-col :span="7">
|
||||||
placeholder="请选择机具类型"
|
<el-form-item label="编码前缀" prop="exCode">
|
||||||
clearable
|
<el-input v-model="form.exCode" :readonly="true"/>
|
||||||
style="width: 100%"
|
</el-form-item>
|
||||||
@change="selectType"
|
</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>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="固定资产" prop="isFixed">
|
||||||
|
<el-select v-model="form.isFixed" placeholder="是否为固定资产" clearable allow-create="">
|
||||||
|
<el-option label="是" value="0"/>
|
||||||
|
<el-option label="否" value="1"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
@click="createCodeList"
|
||||||
|
>生成</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
size="mini"
|
||||||
|
@click="fillingCodeList"
|
||||||
|
>填充</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<el-table v-loading="loading" :data="codeList" height="400">
|
||||||
|
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
||||||
|
<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="assetsCode" width="120" />
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
width="160"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
>
|
>
|
||||||
<el-option
|
<template slot-scope="scope">
|
||||||
v-for="typeItem in typeList"
|
<el-button
|
||||||
:key="typeItem.typeId"
|
size="mini"
|
||||||
:label="typeItem.typeName"
|
type="text"
|
||||||
:value="typeItem.typeId"
|
icon="el-icon-delete"
|
||||||
/>
|
@click="delCode(scope.row)"
|
||||||
</el-select>
|
>删除</el-button>
|
||||||
</el-form-item>
|
</template>
|
||||||
<el-form-item label="规格型号" prop="modelId">
|
</el-table-column>
|
||||||
<el-select
|
</el-table>
|
||||||
v-model="form.modelId"
|
|
||||||
placeholder="请选择规格型号"
|
|
||||||
clearable
|
|
||||||
style="width: 100%"
|
|
||||||
@change="selectType"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="typeItem in modelList"
|
|
||||||
:key="typeItem.typeId"
|
|
||||||
:label="typeItem.typeName"
|
|
||||||
:value="typeItem.typeId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<!-- <el-input v-model="form.modelId" placeholder="请输入规格型号" /> -->
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="设备编号" prop="maCode">
|
|
||||||
<el-input v-model="form.maCode" placeholder="请输入设备编号" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="固定资产" prop="isFixed">
|
|
||||||
<el-radio-group v-model="form.isFixed">
|
|
||||||
<el-radio label="0">是</el-radio>
|
|
||||||
<el-radio label="1">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="固定资产编号" prop="fixCode" v-if="form.isFixed=='0'">
|
|
||||||
<el-input v-model="form.fixCode" placeholder="请输入固定资产编号" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||||
import { listPurchaseMacodeInfo,addPurchaseMacode,updateMacode,delMacode,getMacodeInfo } from "@/api/store/newBuy";
|
import { getPurchaseCheckInfo, listPurchaseMacodeInfo,addPurchaseMacode,updateMacode,delMacode,getMacodeInfo, } from "@/api/store/newBuy";
|
||||||
|
import { getMacodeList,getMacodeDetailList,makeEquipmentNumber,editPurchaseMacode,delMacodeList } from "@/api/store/newBuy";
|
||||||
|
|
||||||
import { getTypeList } from "@/api/store/warehousing";
|
import { getTypeList } from "@/api/store/warehousing";
|
||||||
import { getListByMaType } from "@/api/store/tools";
|
import { getListByMaType } from "@/api/store/tools";
|
||||||
|
|
||||||
|
|
@ -200,8 +205,8 @@ export default {
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
taskId:'',
|
taskId:'',
|
||||||
// 字典表格数据
|
// 表格数据
|
||||||
codeList: [],
|
typeList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
|
|
@ -210,31 +215,32 @@ export default {
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
// pageNum: 1,
|
||||||
pageSize: 10,
|
// pageSize: 10,
|
||||||
dictName: undefined,
|
typeName: undefined,
|
||||||
dictType: undefined,
|
|
||||||
status: undefined
|
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
exCode:'NXJJ',
|
||||||
|
count:1,
|
||||||
|
isFixed:'1',
|
||||||
|
typeId:''
|
||||||
|
},
|
||||||
|
codeList: [],//弹窗列表list
|
||||||
|
getCodeList: [],//已成过的编码list
|
||||||
|
newCodeList: [],//新的编码list
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
typeId: [
|
// typeId: [
|
||||||
{ required: true, message: "机具类型名称不能为空", trigger: "blur" }
|
// { required: true, message: "机具类型名称不能为空", trigger: "blur" }
|
||||||
],
|
// ],
|
||||||
modelId: [
|
// modelId: [
|
||||||
{ required: true, message: "规格型号不能为空", trigger: "blur" }
|
// { required: true, message: "规格型号不能为空", trigger: "blur" }
|
||||||
],
|
// ],
|
||||||
maCode: [
|
// maCode: [
|
||||||
{ required: true, message: "设备编号不能为空", trigger: "blur" }
|
// { required: true, message: "设备编号不能为空", trigger: "blur" }
|
||||||
],
|
// ],
|
||||||
isFixed: [
|
|
||||||
{ required: true, message: "请选择是否为固定资产", trigger: "blur" }
|
|
||||||
],
|
|
||||||
fixCode: [
|
|
||||||
{ required: true, message: "固定资产编号不能为空", trigger: "blur" }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -243,9 +249,9 @@ export default {
|
||||||
this.taskId = taskId;
|
this.taskId = taskId;
|
||||||
console.log(this.taskId)
|
console.log(this.taskId)
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getTypeList();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取类型数据
|
||||||
getTypeList() {
|
getTypeList() {
|
||||||
getTypeList({level:'3'}).then(response => {
|
getTypeList({level:'3'}).then(response => {
|
||||||
this.typeList = response.data;
|
this.typeList = response.data;
|
||||||
|
|
@ -259,13 +265,12 @@ export default {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
/** 查询字典类型列表 */
|
/** 查询列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.taskId = this.taskId
|
this.queryParams.taskId = this.taskId
|
||||||
listPurchaseMacodeInfo(this.queryParams).then(response => {
|
getMacodeList(this.queryParams).then(response => {
|
||||||
this.codeList = response.rows;
|
this.typeList = response.data;
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -273,7 +278,6 @@ export default {
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
|
|
@ -309,36 +313,127 @@ export default {
|
||||||
this.single = selection.length!=1
|
this.single = selection.length!=1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 编码按钮操作 */ //getCodeList newCodeList
|
||||||
handleUpdate(row) {
|
handleCode(row) {
|
||||||
this.reset();
|
console.log(row)
|
||||||
const maId = row.maId || this.ids
|
let param = {
|
||||||
getMacodeInfo(maId).then(response => {
|
taskId:this.taskId,
|
||||||
this.form = response.data;
|
typeId:row.typeId,
|
||||||
|
}
|
||||||
|
this.newCodeList = [];
|
||||||
|
getMacodeDetailList(param).then(response => {
|
||||||
|
this.getCodeList = response.data;
|
||||||
|
this.codeList = this.getCodeList.concat(this.newCodeList)
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改";
|
this.title = "生成编码";
|
||||||
});
|
});
|
||||||
|
this.form = row
|
||||||
|
// this.form.count = row.checkNum;
|
||||||
|
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 = "生成编码";
|
||||||
},
|
},
|
||||||
|
//生成列表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{
|
||||||
|
for(let i = 0; i < this.form.count; i++) {
|
||||||
|
let obj = {
|
||||||
|
typeName:this.form.typeName,
|
||||||
|
specificationType:this.form.specificationType,
|
||||||
|
typeId: this.form.typeId,
|
||||||
|
taskId: this.form.taskId,
|
||||||
|
assetsCode:'',
|
||||||
|
isFixed:this.form.isFixed,
|
||||||
|
}
|
||||||
|
this.newCodeList.push(obj)
|
||||||
|
}
|
||||||
|
console.log(this.newCodeList,'this.newCodeList')
|
||||||
|
this.codeList = this.getCodeList.concat(this.newCodeList)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//填充按钮
|
||||||
|
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);
|
||||||
|
|
||||||
|
// });
|
||||||
|
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
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("已全部绑定过设备编码");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.form.taskId = this.taskId;
|
console.log(this.newCodeList)
|
||||||
this.$refs["form"].validate(valid => {
|
if(this.newCodeList.length==0){
|
||||||
if (valid) {
|
this.$modal.msgError("无新增编码绑定");
|
||||||
if (this.form.maId != undefined) {
|
}else{
|
||||||
updateMacode(this.form).then(response => {
|
editPurchaseMacode(this.newCodeList).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("绑定成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
}
|
||||||
addPurchaseMacode(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
},
|
||||||
});
|
getdetailmaCodeList(data){
|
||||||
}
|
console.log(data)
|
||||||
}
|
let param = {
|
||||||
|
taskId:this.taskId,
|
||||||
|
typeId:data.typeId,
|
||||||
|
}
|
||||||
|
getMacodeDetailList(param).then(response => {
|
||||||
|
this.getCodeList = response.data;
|
||||||
|
this.codeList = this.getCodeList.concat(this.newCodeList)
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
delCode(row) {
|
||||||
|
const maCode = row.maCode ;
|
||||||
|
this.$modal.confirm('是否确认删除该数据项?').then(function() {
|
||||||
|
return delMacodeList(maCode);
|
||||||
|
}).then(() => {
|
||||||
|
this.getdetailmaCodeList(row);
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
},
|
},
|
||||||
// 返回列表页
|
// 返回列表页
|
||||||
jumpList(){
|
jumpList(){
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['store:labelType:add']"
|
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
|
|
@ -45,7 +44,6 @@
|
||||||
<!-- size="mini"-->
|
<!-- size="mini"-->
|
||||||
<!-- :disabled="single"-->
|
<!-- :disabled="single"-->
|
||||||
<!-- @click="handleUpdate"-->
|
<!-- @click="handleUpdate"-->
|
||||||
<!-- v-hasPermi="['store:labelType:edit']"-->
|
|
||||||
<!-- >修改</el-button>-->
|
<!-- >修改</el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- <el-col :span="1.5">-->
|
<!-- <el-col :span="1.5">-->
|
||||||
|
|
@ -56,7 +54,6 @@
|
||||||
<!-- size="mini"-->
|
<!-- size="mini"-->
|
||||||
<!-- :disabled="multiple"-->
|
<!-- :disabled="multiple"-->
|
||||||
<!-- @click="handleDelete"-->
|
<!-- @click="handleDelete"-->
|
||||||
<!-- v-hasPermi="['store:labelType:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
<!-- >删除</el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
|
|
@ -66,7 +63,6 @@
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['store:labelType:export']"
|
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
|
@ -79,17 +75,10 @@
|
||||||
<el-table-column label="采购日期" align="center" prop="purchaseTime" :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="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="purchasingTypeName" :show-overflow-tooltip="true" width="250"/>
|
||||||
<el-table-column label="采购员" align="center" prop="purchaser" :show-overflow-tooltip="true" width="100"/>
|
<el-table-column label="采购员" align="center" prop="purchaserName" :show-overflow-tooltip="true" width="100"/>
|
||||||
<el-table-column label="采购状态" align="center" prop="purchasingStatus" :show-overflow-tooltip="true" width="100"/>
|
<el-table-column label="采购状态" align="center" prop="purchasingStatus" :show-overflow-tooltip="true" width="100"/>
|
||||||
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
||||||
<!-- <el-table-column label="状态" align="center" prop="createTime" width="180">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-switch-->
|
|
||||||
<!-- v-model="scope.row.status">-->
|
|
||||||
<!-- </el-switch>-->
|
|
||||||
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -97,28 +86,25 @@
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['store:labelType:edit']"
|
v-if="scope.row.taskStatus==24"
|
||||||
>编辑</el-button>
|
>编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleAccept(scope.row)"
|
@click="handleAccept(scope.row)"
|
||||||
v-hasPermi="['store:labelType:edit']"
|
|
||||||
>验收</el-button>
|
>验收</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleCode(scope.row)"
|
@click="handleCode(scope.row)"
|
||||||
v-hasPermi="['store:labelType:edit']"
|
|
||||||
>编码管理</el-button>
|
>编码管理</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['store:labelType:remove']"
|
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -150,9 +136,6 @@
|
||||||
<el-form-item label="备注" prop="dictName">
|
<el-form-item label="备注" prop="dictName">
|
||||||
<el-input v-model="form.dictName" placeholder="请输入基层单位" />
|
<el-input v-model="form.dictName" placeholder="请输入基层单位" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
|
||||||
|
|
@ -261,6 +261,9 @@ export default {
|
||||||
businessLicense: undefined,
|
businessLicense: undefined,
|
||||||
status: "0",
|
status: "0",
|
||||||
};
|
};
|
||||||
|
this.imageUrl = ''
|
||||||
|
this.fileList = []
|
||||||
|
this.field101fileList = []
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
|
|
|
||||||
|
|
@ -58,8 +58,6 @@
|
||||||
>新增
|
>新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="info"
|
type="info"
|
||||||
|
|
@ -117,8 +115,7 @@
|
||||||
<el-table-column label="文档资料" align="center" key="documentName" prop="documentName"
|
<el-table-column label="文档资料" align="center" key="documentName" prop="documentName"
|
||||||
:show-overflow-tooltip="true">
|
:show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<a :href="'http://192.168.0.14:21624/system'+scope.row.documentUrl" style="color: #02A7F0;" :download="scope.row.documentName">{{ scope.row.documentName }}</a>
|
<a :href="uploadUrl+scope.row.documentUrl" style="color: #02A7F0;" :download="scope.row.documentName">{{ scope.row.documentName }}</a>
|
||||||
<!-- <a :href="'http://10.40.92.140:9201'+scope.row.documentUrl" style="color: #02A7F0;" :download="scope.row.documentName">{{ scope.row.documentName }}</a> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="资产属性" align="center" key="propName" prop="propName"
|
<el-table-column label="资产属性" align="center" key="propName" prop="propName"
|
||||||
|
|
@ -263,7 +260,7 @@
|
||||||
<el-form-item label="文档资料" prop="field101">
|
<el-form-item label="文档资料" prop="field101">
|
||||||
<el-upload ref="field101"
|
<el-upload ref="field101"
|
||||||
:file-list="field101fileList"
|
:file-list="field101fileList"
|
||||||
action="#" :limit='1'
|
action="#" :limit='1' accept=".docx,.pdf"
|
||||||
:http-request="(obj) => fileUpLoad(obj,'fileUrl')"
|
:http-request="(obj) => fileUpLoad(obj,'fileUrl')"
|
||||||
:on-exceed="exceedFile"
|
:on-exceed="exceedFile"
|
||||||
|
|
||||||
|
|
@ -280,11 +277,11 @@
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
|
accept=".png,.jpg,.jpeg"
|
||||||
:on-success="handleAvatarSuccess"
|
:on-success="handleAvatarSuccess"
|
||||||
:on-preview="handlePictureCardPreview"
|
:on-preview="handlePictureCardPreview"
|
||||||
:on-remove="handleRemove">
|
:on-remove="handleRemove">
|
||||||
<img v-if="imageUrl" :src="'http://192.168.0.14:21624/system'+imageUrl" style="width: 140px;height: 140px;" class="avatar">
|
<img v-if="imageUrl" :src="uploadUrl+imageUrl" style="width: 140px;height: 140px;" class="avatar">
|
||||||
<!-- <img v-if="imageUrl" :src="'http://10.40.92.140:9201'+imageUrl" style="width: 140px;height: 140px;" class="avatar"> -->
|
|
||||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -455,6 +452,9 @@ export default {
|
||||||
imageName:'',
|
imageName:'',
|
||||||
fileList:[],
|
fileList:[],
|
||||||
field101fileList:[],
|
field101fileList:[],
|
||||||
|
//上传地址
|
||||||
|
uploadUrl:'http://192.168.0.14:21624/system',//线上服务器地址+system
|
||||||
|
// uploadUrl:'http://10.40.92.140:9201',//本地测试
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: "children",
|
children: "children",
|
||||||
label: "label"
|
label: "label"
|
||||||
|
|
@ -601,6 +601,7 @@ export default {
|
||||||
documentUrl:"",
|
documentUrl:"",
|
||||||
documentName:""
|
documentName:""
|
||||||
};
|
};
|
||||||
|
this.imageUrl = ''
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
this.field101fileList = []
|
this.field101fileList = []
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
|
|
@ -745,8 +746,7 @@ export default {
|
||||||
},
|
},
|
||||||
//图片查看
|
//图片查看
|
||||||
openImg(url){
|
openImg(url){
|
||||||
this.dialogImageUrl = "http://192.168.0.14:21624/system" + url;//线上
|
this.dialogImageUrl = this.uploadUrl + url;
|
||||||
// this.dialogImageUrl = "http://10.40.92.140:9201" + url;//本地
|
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
//文件上传
|
//文件上传
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue