新购绑定
This commit is contained in:
parent
db4ad685cf
commit
b6e541aab4
|
|
@ -9,6 +9,67 @@ export function getListNewBuy(query) {
|
|||
})
|
||||
}
|
||||
|
||||
//任务 详情
|
||||
export function getPurchaseCheckInfo(id) {
|
||||
return request({
|
||||
url: '/material/purchase_check_info/'+ id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//人员 详情
|
||||
export function getNoticePeople(query) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
// 人员--删除
|
||||
export function delPeople(ids) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/' + ids,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 人员管理--新增
|
||||
export function addNoticeUser(data) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/batchAddNoticePerson',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 仓库管理--修改
|
||||
export function bmNoticeInfo(data) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/batchSendSms',
|
||||
method: 'put',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//机具类型管理列表信息
|
||||
export function getUserAll() {
|
||||
return request({
|
||||
url: '/system/user/list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//获取机具类型树2
|
||||
export function equipmentTypeTree(query) {
|
||||
return request({
|
||||
url: '/material/ma_type/equipmentType',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
//查看机具类型管理列表详细信息
|
||||
export function getHouseDetail(id) {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
//机具类型管理列表信息
|
||||
export function getListNewBuyBind(query) {
|
||||
return request({
|
||||
url: '/material/purchase/bind/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
//任务 详情
|
||||
export function getListDetail(query) {
|
||||
return request({
|
||||
url: '/material/purchase/bind/details',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
//二级页面 详情
|
||||
export function getListDetailById(query) {
|
||||
return request({
|
||||
url: '/material/purchase/bind/getById',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
//人员 详情
|
||||
export function getNoticePeople(query) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/list',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
// 人员--删除
|
||||
export function delPeople(ids) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/' + ids,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
// 人员管理--新增
|
||||
export function addNoticeUser(data) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/batchAddNoticePerson',
|
||||
method: 'post',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
// 仓库管理--修改
|
||||
export function bmNoticeInfo(data) {
|
||||
return request({
|
||||
url: '/material/purchase_notice_person/batchSendSms',
|
||||
method: 'put',
|
||||
data: data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//机具类型管理列表信息
|
||||
export function getUserAll() {
|
||||
return request({
|
||||
url: '/system/user/list',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
|
|
|||
|
|
@ -1,69 +1,61 @@
|
|||
<template>
|
||||
<!-- 新增工机具 -->
|
||||
<div>
|
||||
<!-- <el-form -->
|
||||
<!-- :model="queryParams" -->
|
||||
<!-- ref="queryForm" -->
|
||||
<!-- size="small" -->
|
||||
<!-- :inline="true" -->
|
||||
<!-- label-width="100px" -->
|
||||
<!-- > -->
|
||||
<!-- <el-form-item label="出厂日期">
|
||||
<el-form
|
||||
:model="maForm"
|
||||
ref="maForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="到货日期" prop="arrivalTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.productionTime"
|
||||
v-model="maForm.arrivalTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
:picker-options="pickerOptions"
|
||||
type="date"
|
||||
placeholder="出厂日期"
|
||||
@change="changeTime"
|
||||
placeholder="请选择到货日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="机具厂家" prop="supplierId">
|
||||
<el-form-item label="物资厂家" prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.supplierId"
|
||||
placeholder="机具厂家"
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择物资厂家"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierList"
|
||||
:key="item.supplierId"
|
||||
:label="item.supplier"
|
||||
:value="item.supplierId"
|
||||
v-for="typeItem in typesList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<!-- </el-form> -->
|
||||
<el-form
|
||||
:model="maForm"
|
||||
ref="maForm"
|
||||
:rules="rules"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="线下采购单编号" prop="purchaseNumber">
|
||||
<el-input
|
||||
placeholder="请输入线下采购单编号"
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂日期" prop="arrivalTime">
|
||||
<el-date-picker
|
||||
v-model="maForm.arrivalTime"
|
||||
style="width: 240px"
|
||||
v-model="maForm.purchaseNumber"
|
||||
value-format="yyyy-MM-dd"
|
||||
:picker-options="pickerOptions"
|
||||
type="date"
|
||||
placeholder="请选择出厂日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="税率" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入税率"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="equipmentId">
|
||||
<!-- <treeselect
|
||||
v-model="queryParams.equipmentId"
|
||||
default-expand-all
|
||||
:options="equipmentTypeList"
|
||||
placeholder="请选择规格型号"
|
||||
@select="select"
|
||||
:disable-branch-nodes="true"
|
||||
style="width: 240px"
|
||||
noChildrenText="没有数据了"
|
||||
noOptionsText="没有数据"
|
||||
noResultsText="没有搜索结果"
|
||||
/> -->
|
||||
|
||||
<el-form-item label="类型规格" prop="typeId">
|
||||
<el-cascader
|
||||
:key="propsKey"
|
||||
v-model="deviceType"
|
||||
|
|
@ -79,40 +71,7 @@
|
|||
@change="deviceTypeChange"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购日期" prop="purchaseTime">
|
||||
<el-date-picker
|
||||
v-model="maForm.purchaseTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="请选择采购日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="到货日期" prop="arrivalTime">
|
||||
<el-date-picker
|
||||
v-model="maForm.arrivalTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
:picker-options="pickerOptions"
|
||||
type="date"
|
||||
placeholder="请选择到货日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购员" prop="purchaser">
|
||||
<el-select
|
||||
v-model="maForm.purchaser"
|
||||
filterable
|
||||
placeholder="请选择采购员"
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userList"
|
||||
:key="item.userId"
|
||||
:label="item.userName"
|
||||
:value="item.userId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="maForm.remark"
|
||||
|
|
@ -152,19 +111,19 @@
|
|||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="机具名称"
|
||||
prop="machineTypeName"
|
||||
label="物资名称"
|
||||
prop="maTypeName"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="规格型号"
|
||||
prop="specificationType"
|
||||
prop="typeName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" label="单位" prop="unitName" />
|
||||
<el-table-column
|
||||
label="购置单价(元)"
|
||||
label="购置单价(元含税)"
|
||||
prop="purchasePrice"
|
||||
align="center"
|
||||
>
|
||||
|
|
@ -177,27 +136,30 @@
|
|||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购数量" prop="purchaseNum">
|
||||
<el-table-column
|
||||
label="购置单价(元不含税)"
|
||||
prop="purchasePrice"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
type="number"
|
||||
:min="1"
|
||||
clearable
|
||||
v-model.number="scope.row.purchaseNum"
|
||||
v-model="scope.row.purchasePrice"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
:min="0"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="机具厂家"
|
||||
prop="supplierId"
|
||||
label="是否为固定资产"
|
||||
prop="productionTime"
|
||||
align="center"
|
||||
width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.supplierId"
|
||||
placeholder="机具厂家"
|
||||
placeholder="固定资产"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
|
|
@ -228,16 +190,21 @@
|
|||
></el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="相关配套资料"
|
||||
align="center"
|
||||
prop="checkUrlName"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div @click="openGt(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||
{{ '报告管理' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document"
|
||||
v-if="scope.row.manageType == 2"
|
||||
@click="handleDetail(scope.row)"
|
||||
>明细</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
|
@ -256,15 +223,67 @@
|
|||
:holdingpoleData="holdingpoleData"
|
||||
@close="onDialogClose"
|
||||
></holdingpole-dialog>
|
||||
|
||||
|
||||
<!-- 报告管理弹窗 -->
|
||||
<!-- <el-dialog :title="title" :visible.sync="showGt" width="1000px" height="1000px" append-to-body @close="cancelGt">
|
||||
<el-form :model="queryGt" ref="queryFormGt" size="small" :inline="true" label-width="68px"> </el-form>
|
||||
|
||||
<el-table v-loading="loadingTwo" :data="gtList" width="600px" height = "600px" >
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryGt.pageNum - 1) * queryGt.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="杆塔id" align="center" prop="gtId" v-if="false" />
|
||||
<el-table-column label="杆塔编号" align="center" prop="gtCode" sortable/>
|
||||
<el-table-column label="杆塔经度" align="center" prop="lon" sortable/>
|
||||
<el-table-column label="杆塔纬度" align="center" prop="lat" sortable/>
|
||||
<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="handleUpdateGt(scope.row)"
|
||||
v-hasPermi="['basic:device:edit']"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDeleteGt(scope.row)"
|
||||
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- <pagination
|
||||
v-show="totalTwo>0"
|
||||
:total="totalTwo"
|
||||
:page.sync="queryGt.pageNum"
|
||||
:limit.sync="queryGt.pageSize"
|
||||
@pagination="getListGt"
|
||||
/> -->
|
||||
<!--
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {
|
||||
// addPurchaseCheckInfo,
|
||||
// getPurchaseCheckInfo,
|
||||
// updatePurchaseCheckInfo,
|
||||
// } from '@/api/store/newBuy'
|
||||
import {
|
||||
getPurchaseCheckInfo,
|
||||
equipmentTypeTree,
|
||||
addPurchaseCheckInfo,
|
||||
// getPurchaseCheckInfo,
|
||||
updatePurchaseCheckInfo,
|
||||
} from '@/api/baseGround/newBuy'
|
||||
// import { getUserByRoleList } from '@/api/system/user'
|
||||
// import { equipmentTypeTree, supplierInfoList } from '@/api/store/tools'
|
||||
// import Treeselect from '@riophae/vue-treeselect'
|
||||
|
|
@ -297,6 +316,7 @@ export default {
|
|||
// isEdit: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
loadingTwo: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
|
|
@ -319,6 +339,7 @@ export default {
|
|||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
showGt:false,
|
||||
// 是否显示弹出层(数据权限)
|
||||
openDataScope: false,
|
||||
menuExpand: false,
|
||||
|
|
@ -329,6 +350,11 @@ export default {
|
|||
holdingpoleData: {},
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
queryGt: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
id:undefined,
|
||||
},
|
||||
// 数据范围选项
|
||||
dataScopeOptions: [
|
||||
{
|
||||
|
|
@ -442,16 +468,151 @@ export default {
|
|||
// }
|
||||
|
||||
if (this.isEdit) {
|
||||
this.taskId = this.editTaskId
|
||||
console.log('isEdit',this.isEdit)
|
||||
this.id = this.editTaskId
|
||||
this.getTaskInfo()
|
||||
}
|
||||
|
||||
this.getUserList()
|
||||
// this.getUserList()
|
||||
// this.getList();
|
||||
this.equipmentType()
|
||||
this.supplierInfoList()
|
||||
// this.supplierInfoList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
/** 机具类型 */
|
||||
equipmentType() {
|
||||
console.log('11111111')
|
||||
equipmentTypeTree().then((response) => {
|
||||
this.equipmentTypeList = response.data
|
||||
console.log('22221111',this.equipmentTypeList)
|
||||
this.equipmentTypeList.forEach((item, index) => {
|
||||
if (item.children && item.children.length > 0) {
|
||||
item.children.forEach((item2, index2) => {
|
||||
if (item2.children && item2.children.length > 0) {
|
||||
item2.children.forEach((item3) => {
|
||||
if (
|
||||
item3.children &&
|
||||
item3.children.length > 0
|
||||
) {
|
||||
item3.children.forEach((item4) => {
|
||||
item4.machineTypeName =
|
||||
item3.typeName
|
||||
item4.specificationType =
|
||||
item4.typeName
|
||||
this.$set(item4, 'purchasePrice', 0)
|
||||
this.$set(item4, 'purchaseNum', 1)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
let selectList = []
|
||||
this.equipmentList.forEach((e) => {
|
||||
selectList.push(
|
||||
this.getParentsById(this.equipmentTypeList, e.typeId),
|
||||
)
|
||||
})
|
||||
this.deviceType = selectList
|
||||
})
|
||||
},
|
||||
|
||||
getParentsById(list, id) {
|
||||
for (let i in list) {
|
||||
if (list[i].typeId == id) {
|
||||
//查询到就返回该数组对象的value
|
||||
return [list[i].typeId]
|
||||
}
|
||||
if (list[i].children) {
|
||||
let node = this.getParentsById(list[i].children, id)
|
||||
if (node !== undefined) {
|
||||
//查询到把父节把父节点加到数组前面
|
||||
node.unshift(list[i].typeId)
|
||||
return node
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/** 新增按钮操作 */
|
||||
handleSave() {
|
||||
if (this.equipmentList.length > 0) {
|
||||
this.$refs['maForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
// console.log(this.maForm,'maForm')
|
||||
// console.log(this.equipmentList,'equipmentList')
|
||||
this.equipmentList.forEach((item) => {
|
||||
if (item.purchaseNum == '' || !item.purchaseNum) {
|
||||
isEmpty = false
|
||||
}
|
||||
})
|
||||
|
||||
this.maForm.taskId = this.taskId
|
||||
this.maForm.checkDetailsList = this.equipmentList
|
||||
// console.log(this.maForm)
|
||||
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.$emit(
|
||||
'addToolsSuccess',
|
||||
)
|
||||
}
|
||||
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.$emit(
|
||||
'addToolsSuccess',
|
||||
)
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
} else {
|
||||
this.$modal.msgError(
|
||||
'请先选择并添加机具类型!!!',
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$modal.msgError('请先添加机具类型')
|
||||
}
|
||||
},
|
||||
/** 查询用户列表--采购员 */
|
||||
getUserList() {
|
||||
getUserByRoleList({ roleIds: [152] }).then((response) => {
|
||||
|
|
@ -544,22 +705,39 @@ export default {
|
|||
//获取任务详情--- 编辑回显数据
|
||||
getTaskInfo() {
|
||||
// this.loading = true;
|
||||
getPurchaseCheckInfo({
|
||||
taskId: this.taskId,
|
||||
keyWord: this.queryParams.keyWord,
|
||||
}).then((response) => {
|
||||
getPurchaseCheckInfo(this.id).then((response) => {
|
||||
// this.taskInfo = response.data
|
||||
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.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
this.equipmentList = response.data.checkDetailsList
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList
|
||||
|
||||
// this.loading = false;
|
||||
})
|
||||
},
|
||||
|
||||
//打开报告管理页面
|
||||
openGt(row){
|
||||
this.proId = row.proId;
|
||||
this.title = "新购验收报告管理"
|
||||
this.showGt = true;
|
||||
this.loadingTwo = true
|
||||
// this.getListGt();
|
||||
},
|
||||
|
||||
cancelGt() {
|
||||
this.showGt = false;
|
||||
this.resetForm("queryFormGt");
|
||||
},
|
||||
|
||||
// /** 杆塔重置按钮操作 */
|
||||
// resetQueryGt() {
|
||||
// this.resetForm("queryFormGt");
|
||||
// this.currentSelectionGt = []//重置清除已选列表
|
||||
// this.handleQueryGt();
|
||||
// },
|
||||
getParentsById(list, id) {
|
||||
for (let i in list) {
|
||||
if (list[i].typeId == id) {
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
</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="请选择设备类型"
|
||||
placeholder="请选择设备状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
<el-table-column
|
||||
align="center"
|
||||
label="到货时间"
|
||||
prop="purchaseNumber"
|
||||
prop="arrivalTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
@ -121,31 +121,31 @@
|
|||
<el-table-column
|
||||
label="采购物资"
|
||||
align="center"
|
||||
prop="purchaseTime"
|
||||
prop="purchaseMaTypeName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购数量"
|
||||
align="center"
|
||||
prop="arrivalTime"
|
||||
prop="purchaseMaNumber"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购价格(元含税)"
|
||||
align="center"
|
||||
prop="purchasingTypeName"
|
||||
prop="purchaseTaxPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购价格(元不含税)"
|
||||
align="center"
|
||||
prop="purchaserName"
|
||||
prop="purchaseNoTaxPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="税率"
|
||||
align="center"
|
||||
prop="purchasingStatus"
|
||||
prop="taxRate"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
|
|
@ -161,7 +161,7 @@
|
|||
<el-table-column
|
||||
label="操作人"
|
||||
align="center"
|
||||
prop="remark"
|
||||
prop="createUserName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
|
|
@ -169,7 +169,7 @@
|
|||
<el-table-column
|
||||
label="操作时间"
|
||||
align="center"
|
||||
prop="remark"
|
||||
prop="createTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
|
|
@ -188,46 +188,22 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.taskStatus == 24"
|
||||
v-hasPermi="['newPurchase:tools:edit']"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
scope.row.purchasingStatus != '已入库' &&
|
||||
scope.row.purchasingStatus != '已审核' &&
|
||||
scope.row.purchasingStatus != '已验收合格' &&
|
||||
scope.row.purchasingStatus != '待审核' &&
|
||||
scope.row.purchasingStatus != '验收不通过' &&
|
||||
scope.row.purchasingStatus != '驳回'
|
||||
"
|
||||
@click="handleAccept(scope.row)"
|
||||
v-hasPermi="['newPurchase:tools:accept']"
|
||||
>验收</el-button
|
||||
>
|
||||
@click="handleNotice(scope.row)"
|
||||
v-hasPermi="['newPurchase:tools:edit']"
|
||||
>通知</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
scope.row.purchasingId == 26 &&
|
||||
scope.row.manageType == 0
|
||||
"
|
||||
@click="handleCode(scope.row)"
|
||||
v-hasPermi="['newPurchase:tools:coding']"
|
||||
>编码管理</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
scope.row.purchasingId == 26 ||
|
||||
scope.row.purchasingId == 28
|
||||
"
|
||||
@click="handlePrint(scope.row)"
|
||||
>验收单</el-button
|
||||
>
|
||||
|
|
@ -236,7 +212,6 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
v-if="scope.row.purchasingId === 24"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['newPurchase:tools:del']"
|
||||
>删除</el-button
|
||||
|
|
@ -270,7 +245,7 @@
|
|||
font-size: 16px;
|
||||
"
|
||||
>
|
||||
到货验收单
|
||||
机具设备到货验收单
|
||||
</div>
|
||||
<div
|
||||
class="info"
|
||||
|
|
@ -279,13 +254,13 @@
|
|||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>工程名称:</span>
|
||||
<span>单据编号:</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
|
|
@ -296,8 +271,9 @@
|
|||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>验收单编号:</span>{{ printData.code }}
|
||||
<span>生产厂家(供应商):</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
|
|
@ -307,43 +283,7 @@
|
|||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>合同名称:</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>合同编号:</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>验收地点:</span>
|
||||
</div>
|
||||
<div
|
||||
class="item"
|
||||
style="
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: 5px;
|
||||
font-size: 14px;
|
||||
"
|
||||
>
|
||||
<span>供应商:</span
|
||||
><span v-if="printTableData.length > 0">{{
|
||||
supplierStr
|
||||
}}</span>
|
||||
<span>到货日期:</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
|
|
@ -361,9 +301,10 @@
|
|||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
row=2
|
||||
/>
|
||||
<el-table-column
|
||||
label="机具名称"
|
||||
label="物资名称"
|
||||
align="center"
|
||||
prop="machineTypeName"
|
||||
/>
|
||||
|
|
@ -373,37 +314,41 @@
|
|||
prop="specificationType"
|
||||
/>
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
label="单位"
|
||||
align="center"
|
||||
prop="unitName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购数量"
|
||||
<el-table-column label="配送信息" align="center">
|
||||
<el-table-column
|
||||
label="到货数量"
|
||||
align="center"
|
||||
prop="purchaseNum"
|
||||
/>
|
||||
<el-table-column
|
||||
label="验收结论"
|
||||
align="center"
|
||||
prop="purchaseNum"
|
||||
/>
|
||||
<el-table-column label="质保质量" align="center">
|
||||
<el-table-column
|
||||
label="实收份数"
|
||||
align="center"
|
||||
prop="purchaseNum"
|
||||
/>
|
||||
<el-table-column
|
||||
label="符合要求"
|
||||
align="center"
|
||||
prop="purchaseNum"
|
||||
/>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="unitName"
|
||||
/>
|
||||
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="已验收数量111"-->
|
||||
<!-- align="center"-->
|
||||
<!-- prop=""-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
label="本次验收数量"
|
||||
align="center"
|
||||
prop="checkNum"
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="累积验收数量"-->
|
||||
<!-- align="center"-->
|
||||
<!-- prop=""-->
|
||||
<!-- />-->
|
||||
<el-table-column
|
||||
label="验收日期"
|
||||
align="center"
|
||||
prop="updateTime"
|
||||
/>
|
||||
<!-- <el-table-column-->
|
||||
<!-- label="合格证及技术资料"-->
|
||||
<!-- align="center"-->
|
||||
<!-- prop=""-->
|
||||
|
|
@ -419,30 +364,21 @@
|
|||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<div class="item" style="width: 50%">
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>接收单位验收意见:</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>验收人:</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>接收单位(章):</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>验收负责人: 年 月 日</span>
|
||||
<span>供应科:</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" style="width: 50%">
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>供应商:</span>
|
||||
<span>生产技术科:</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" style="width: 33%">
|
||||
<div>
|
||||
<span>供应商(章):</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>验收负责人: 年 月 日</span>
|
||||
<span>库管班:</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -454,6 +390,126 @@
|
|||
<el-button @click="openPrint = false">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 通知弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="showPeople" width="800px" append-to-body @close="cancel">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="20">
|
||||
<el-form :model="form" ref="form" size="small" :inline="true" label-width="120px">
|
||||
<el-form-item label="通知内容:" prop="remark">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 6 }"
|
||||
placeholder="请输入通知内容"
|
||||
style="width: 80%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loadingTwo" :data="getListPeople" width="600px" height = "600px" >
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
||||
<el-table-column label="人员名称" align="center" prop="userName" sortable/>
|
||||
<el-table-column label="所属机构" align="center" prop="newdeptId" sortable/>
|
||||
<el-table-column label="角色" align="center" prop="userRoleName" sortable/>
|
||||
<el-table-column label="联系电话" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDeletePeople(scope.row)"
|
||||
v-hasPermi="['basic:device:del']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="addUserOpen"
|
||||
>人员添加</el-button
|
||||
>
|
||||
<el-button type="primary" @click="configNotice"
|
||||
>发起验收</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 人员添加 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="peopleOpen"
|
||||
v-if="peopleOpen"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="userList"
|
||||
@selection-change="handleSelectionUser"
|
||||
height="450"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column
|
||||
label="人员账号"
|
||||
align="center"
|
||||
key="userName"
|
||||
prop="userName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="人员名称"
|
||||
align="center"
|
||||
key="nickName"
|
||||
prop="nickName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="所属机构"
|
||||
align="center"
|
||||
key="deptName"
|
||||
prop="deptName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="角色"
|
||||
align="center"
|
||||
key="roleName"
|
||||
prop="roleName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="联系电话"
|
||||
align="center"
|
||||
key="phonenumber"
|
||||
prop="phonenumber"
|
||||
width="120"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="160"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope" v-if="scope.row.userId !== 1">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@click="addUser(scope.row)"
|
||||
>添加</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="addUser">添加</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -463,6 +519,10 @@ import {
|
|||
getPurchaseCheckInfo,
|
||||
getAcceptanceForm,
|
||||
purchaseCheckInfoRemove,
|
||||
getNoticePeople,
|
||||
getUserAll,
|
||||
addNoticeUser,
|
||||
bmNoticeInfo,
|
||||
} from '@/api/baseGround/newBuy'
|
||||
// import {
|
||||
// getRepairedList,
|
||||
|
|
@ -481,6 +541,7 @@ export default {
|
|||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loadingTwo: true,
|
||||
updateTime:"",
|
||||
// 选中数组
|
||||
ids: [],
|
||||
|
|
@ -490,13 +551,22 @@ export default {
|
|||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showPeople: false,
|
||||
peopleOpen: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
totalTwo: 0,
|
||||
//搜索下拉数据
|
||||
typesList: [],
|
||||
modelList: [],
|
||||
// 字典表格数据
|
||||
typeList: [],
|
||||
getListPeople:[],
|
||||
configUserList: [],
|
||||
phoneNumbers:[],
|
||||
//选择人员
|
||||
chosenUserList: [],
|
||||
userList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 日期范围
|
||||
|
|
@ -510,6 +580,9 @@ export default {
|
|||
typeId: '',
|
||||
keyWord: '',
|
||||
},
|
||||
form: {
|
||||
remark: '',
|
||||
},
|
||||
openPrint: false,
|
||||
printData: {},
|
||||
printTableData: [],
|
||||
|
|
@ -522,15 +595,43 @@ export default {
|
|||
// this.getTypeList()
|
||||
},
|
||||
methods: {
|
||||
getTypeList() {
|
||||
getTypeList({ level: '3' }).then((response) => {
|
||||
this.typesList = response.data
|
||||
})
|
||||
getTypeList({ level: '4' }).then((response) => {
|
||||
this.modelList = response.data
|
||||
// 多选框选中-添加人员
|
||||
handleSelectionUser(selection) {
|
||||
// console.log(selection)
|
||||
this.chosenUserList = selection
|
||||
},
|
||||
|
||||
//添加人员
|
||||
addUser() {
|
||||
if (this.chosenUserList.length < 1) {
|
||||
this.$message.error('请选择人员!')
|
||||
return
|
||||
}
|
||||
// console.log(this.chosenUserList,"chosenUserList")
|
||||
addNoticeUser(this.chosenUserList).then((response) => {
|
||||
if (response.code == 200) {
|
||||
// this.getNoticeUserList()
|
||||
this.peopleOpen = false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/** 查询所有用户列表--可添加人员 */
|
||||
getAllUserList() {
|
||||
getUserAll().then((response) => {
|
||||
this.userList = response.rows
|
||||
})
|
||||
},
|
||||
|
||||
// getTypeList() {
|
||||
// getTypeList({ level: '3' }).then((response) => {
|
||||
// this.typesList = response.data
|
||||
// })
|
||||
// getTypeList({ level: '4' }).then((response) => {
|
||||
// this.modelList = response.data
|
||||
// })
|
||||
// },
|
||||
|
||||
getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
|
|
@ -563,34 +664,96 @@ export default {
|
|||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
// this.$tab.closeOpenPage({
|
||||
// path: '/store/newBuy/newDevicesArrival',
|
||||
// })
|
||||
|
||||
this.$emit('addTools')
|
||||
},
|
||||
/** 查看按钮操作 */
|
||||
handleView(row) {
|
||||
// let query = { taskId: row.taskId, isView: true }
|
||||
// this.$tab
|
||||
// .closeOpenPage({
|
||||
// path: '/store/newBuy/newDevicesAccept',
|
||||
// query,
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.$tab.refreshPage()
|
||||
// })
|
||||
this.$emit('queryTools', row.taskId)
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
// let query = { taskId: row.taskId }
|
||||
// this.$tab.closeOpenPage({
|
||||
// path: '/store/newBuy/newDevicesArrival',
|
||||
// query,
|
||||
// })
|
||||
this.$emit('editTools', row.taskId)
|
||||
},
|
||||
|
||||
//----消息通知
|
||||
getNowTime() {
|
||||
var today = new Date()
|
||||
var year = today.getFullYear() //获取年份
|
||||
var month = today.getMonth() + 1 //获取月份
|
||||
var day = today.getDate() //获取日期
|
||||
return year + '-' + month + '-' + day
|
||||
},
|
||||
|
||||
handleNotice(row){
|
||||
this.reset()
|
||||
this.$set(
|
||||
this.form,
|
||||
'remark',
|
||||
'各位同事您好,请于' +
|
||||
this.getNowTime() +
|
||||
'在宏源工业园,进行机具验收。'
|
||||
)
|
||||
this.showPeople = true;
|
||||
const taskId = row.taskId;
|
||||
getNoticePeople({taskId: taskId}).then((response) => {
|
||||
this.getListPeople = response.rows;
|
||||
this.showPeople = true
|
||||
this.loadingTwo = false
|
||||
this.title = '通知'
|
||||
})
|
||||
},
|
||||
|
||||
addUserOpen() {
|
||||
this.getAllUserList()
|
||||
this.peopleOpen = true
|
||||
},
|
||||
|
||||
//确认消息通知
|
||||
configNotice() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.configUserList.forEach((item, index) => {
|
||||
item.telphone = item.telphone
|
||||
item.remark = this.form.remark
|
||||
this.phoneNumbers.push(item.telphone)
|
||||
})
|
||||
let param = {
|
||||
phoneNumbers: this.phoneNumbers,
|
||||
content: this.form.remark,
|
||||
}
|
||||
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',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 人员取消按钮
|
||||
cancel() {
|
||||
this.showPeople = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.taskId)
|
||||
|
|
@ -641,9 +804,9 @@ export default {
|
|||
//查看验收单
|
||||
handlePrint(row) {
|
||||
// this.query.taskId = row.taskId
|
||||
this.getPrintTable(row.taskId)
|
||||
// this.getPrintTable(row.taskId)
|
||||
this.openPrint = true
|
||||
this.title = '新购工机具验收单'
|
||||
this.title = '机具设备到货验收单'
|
||||
},
|
||||
//打印
|
||||
print() {
|
||||
|
|
@ -665,17 +828,32 @@ export default {
|
|||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
|
||||
handleDeletePeople(row){
|
||||
const ids = row.id
|
||||
this.$modal
|
||||
.confirm('是否确认删除所选择的数据项?')
|
||||
.then(function () {
|
||||
return deletePeople(ids)
|
||||
})
|
||||
.then(() => {
|
||||
this.handleNotice(row)
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
'material/purchaseCheckInfo/export',
|
||||
'material//purchase_check_info/export',
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`新购工机具验收_${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(to) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -6,13 +6,18 @@
|
|||
:pageContent="pageContent"
|
||||
@goBack="goBack"
|
||||
/>
|
||||
<component :is="isShowComponent"
|
||||
<component
|
||||
:is="isShowComponent"
|
||||
:isEdit="isEdit"
|
||||
:editTaskId="editTaskId"
|
||||
:queryTaskId="queryTaskId"
|
||||
:isView="isView"
|
||||
:codingTaskId="codingTaskId"
|
||||
@addTools="addTools"/>
|
||||
@addTools="addTools"
|
||||
@editTools="editTools"
|
||||
@addToolsSuccess="addToolsSuccess"
|
||||
@queryTools="queryTools"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -20,11 +25,13 @@
|
|||
import PageHeader from "@/components/pageHeader";
|
||||
import Home from "./component/home.vue"; // 主列表
|
||||
import AddTools from './component/addTools.vue' // 新增机具 和 修改机具
|
||||
import QueryTools from './component/queryTools.vue' // 查询机具 和 验收机具
|
||||
export default {
|
||||
components: {
|
||||
Home,
|
||||
PageHeader,
|
||||
AddTools,
|
||||
QueryTools
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -51,6 +58,20 @@ export default {
|
|||
addToolsSuccess() {
|
||||
this.isShowComponent = 'Home'
|
||||
},
|
||||
/* 编辑工机具 */
|
||||
editTools(id) {
|
||||
this.isEdit = true
|
||||
this.pageContent = '编辑机具'
|
||||
this.editTaskId = id
|
||||
this.isShowComponent = 'AddTools'
|
||||
},
|
||||
/* 查询工机具 */
|
||||
queryTools(id) {
|
||||
this.isView = true
|
||||
this.pageContent = '详情信息'
|
||||
this.queryTaskId = id
|
||||
this.isShowComponent = 'QueryTools'
|
||||
},
|
||||
/* 返回按钮 */
|
||||
goBack() {
|
||||
this.isShowComponent = "Home";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,531 @@
|
|||
<template>
|
||||
<!-- 新增工机具 -->
|
||||
<div>
|
||||
<el-form
|
||||
:model="maForm"
|
||||
ref="maForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="类型规格" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入类型规格"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="机具厂家" prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择机具厂家"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typesList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂日期" prop="arrivalTime">
|
||||
<el-date-picker
|
||||
v-model="maForm.arrivalTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
:picker-options="pickerOptions"
|
||||
type="date"
|
||||
placeholder="请选择出厂日期"
|
||||
></el-date-picker>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleBackAll"
|
||||
>驳回</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="equipmentList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="物资名称"
|
||||
prop="materialName"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="规格型号"
|
||||
prop="materialModel"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="到货数量"
|
||||
prop="checkNum"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" label="单位" prop="unitName" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="供应商"
|
||||
prop="supplierName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="出厂日期"
|
||||
prop="productDate"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="相关配套资料"
|
||||
align="center"
|
||||
prop="checkUrlName"
|
||||
>
|
||||
<!-- <template slot-scope="scope">
|
||||
<div @click="openGt(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||
{{ '报告管理' }}
|
||||
</div>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="状态"
|
||||
prop="statusName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope" >
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleView(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleBind(scope.row)"
|
||||
>绑定</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="success"
|
||||
@click="handleDonload(scope.row)"
|
||||
>下载</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-close"
|
||||
@click="handleBack(scope.row)"
|
||||
>驳回</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="maForm.pageNum"
|
||||
:limit.sync="maForm.pageSize"
|
||||
@pagination="getListPeople"
|
||||
/>
|
||||
|
||||
<!-- 新购查看弹窗 -->
|
||||
<el-dialog :title="titleBind" :visible.sync="showBind" width="800px" append-to-body >
|
||||
<el-form :model="queryBind" ref="queryFormBind" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
</el-form>
|
||||
<el-table v-loading="loadingTwo" :data="getListPeople" width="600px" height = "600px" >
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
||||
<el-table-column label="序号" align="center" prop="userName" sortable/>
|
||||
<el-table-column label="类型名称" align="center" prop="newdeptId" sortable/>
|
||||
<el-table-column label="规格型号" align="center" prop="userRoleName" sortable/>
|
||||
<el-table-column label="设备编码" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="绑定人员" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="绑定时间" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="出厂编号" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="出厂时间" align="center" prop="telphone" sortable/>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryBind.pageNum"
|
||||
:limit.sync="queryBind.pageSize"
|
||||
@pagination="getListPeople"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 绑定查看弹窗 -->
|
||||
<el-dialog :title="titleBind" :visible.sync="showBind" width="800px" append-to-body >
|
||||
<el-form :model="queryBindTwo" ref="queryFormBind" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item
|
||||
label="前缀"
|
||||
label-width="50px"
|
||||
prop="codePrefix"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryBindTwo.codePrefix"
|
||||
placeholder="请输入前缀"
|
||||
clearable
|
||||
maxlength="20"
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="后缀起始值"
|
||||
label-width="100px"
|
||||
prop="codeSuffixStart"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryBindTwo.codeSuffixStart"
|
||||
clearable
|
||||
placeholder="请输入后缀起始值"
|
||||
maxlength="99999999"
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" @click="handleQuery">填充</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleQuery">绑定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loadingTwo" :data="getListBind" width="600px" height = "600px" >
|
||||
<el-table-column label="序号" align="center" prop="userName" />
|
||||
<el-table-column label="设备名称" align="center" prop="newdeptId" />
|
||||
<el-table-column label="规格型号" align="center" prop="userRoleName" />
|
||||
<el-table-column label="设备编码" align="center" prop="telphone" />
|
||||
<el-table-column label="出厂编号" align="center" prop="telphone" />
|
||||
<el-table-column label="出厂时间" align="center" prop="telphone" />
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {
|
||||
// } from '@/api/store/newBuy'
|
||||
import {
|
||||
getPurchaseCheckInfo,
|
||||
equipmentTypeTree,
|
||||
addPurchaseCheckInfo,
|
||||
// getPurchaseCheckInfo,
|
||||
updatePurchaseCheckInfo,
|
||||
} from '@/api/baseGround/newBuy'
|
||||
// import { getUserByRoleList } from '@/api/system/user'
|
||||
// import { equipmentTypeTree, supplierInfoList } from '@/api/store/tools'
|
||||
// import Treeselect from '@riophae/vue-treeselect'
|
||||
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
// import HoldingpoleDialog from '@/components/HoldingpoleDialog/index.vue'
|
||||
|
||||
// import {} from '@/api/store/newBuy'
|
||||
|
||||
export default {
|
||||
name: 'BindTools',
|
||||
dicts: ['sys_normal_disable'],
|
||||
// components: { Treeselect, HoldingpoleDialog },
|
||||
props: {
|
||||
isEdit: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false
|
||||
},
|
||||
},
|
||||
editTaskId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
taskId: '',
|
||||
// isEdit: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
loadingTwo: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
//机具类型
|
||||
equipmentTypeList: [],
|
||||
// 角色表格数据
|
||||
equipmentList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
titleBind: '',
|
||||
getListBind: [],
|
||||
getListPeople: [],
|
||||
typesList:[],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
showBind: false,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
queryBind:
|
||||
{
|
||||
oageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
queryBindTwo:
|
||||
{
|
||||
codePrefix: undefined,
|
||||
codeSuffixStart: undefined,
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
equipmentId: undefined,
|
||||
productionTime: '',
|
||||
supplierId: '',
|
||||
},
|
||||
maForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pickerOptions() {
|
||||
return {
|
||||
disabledDate(time) {
|
||||
const currentDate = new Date()
|
||||
currentDate.setHours(0, 0, 0, 0)
|
||||
return time.getTime() < currentDate.getTime()
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// 'maForm.purchaseTime'() {
|
||||
// if (this.maForm.purchaseTime != '') {
|
||||
// // this.maForm.arrivalTime = ''
|
||||
// }
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
|
||||
if (this.isEdit) {
|
||||
console.log('isEdit',this.isEdit)
|
||||
this.id = this.editTaskId
|
||||
this.getTaskInfo()
|
||||
}
|
||||
|
||||
// this.getUserList()
|
||||
// this.getList();
|
||||
// this.supplierInfoList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
handleQuery(){
|
||||
|
||||
},
|
||||
|
||||
handleDelete(row){
|
||||
|
||||
},
|
||||
|
||||
resetQuery(){
|
||||
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleBackAll() {
|
||||
},
|
||||
|
||||
//获取任务详情--- 编辑回显数据
|
||||
getTaskInfo() {
|
||||
// this.loading = true;
|
||||
getPurchaseCheckInfo(this.id).then((response) => {
|
||||
// this.taskInfo = response.data
|
||||
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.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList
|
||||
|
||||
// this.loading = false;
|
||||
})
|
||||
},
|
||||
|
||||
//打开查看页面
|
||||
handleView(row){
|
||||
this.titleBind = "查看"
|
||||
this.showBind = true;
|
||||
this.loadingTwo = false
|
||||
// this.getListGt();
|
||||
},
|
||||
|
||||
|
||||
|
||||
/** 查询右侧列表 */
|
||||
getList() {
|
||||
// this.loading = true;
|
||||
// listRole().then(response => {
|
||||
// this.equipmentList = response.rows;
|
||||
// this.total = response.total;
|
||||
// this.loading = false;
|
||||
// }
|
||||
// );
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
if (this.$refs.menu != undefined) {
|
||||
this.$refs.menu.setCheckedKeys([])
|
||||
}
|
||||
;(this.menuExpand = false),
|
||||
(this.menuNodeAll = false),
|
||||
(this.deptExpand = true),
|
||||
(this.deptNodeAll = false),
|
||||
(this.form = {
|
||||
roleId: undefined,
|
||||
roleName: undefined,
|
||||
roleKey: undefined,
|
||||
roleSort: 0,
|
||||
status: '0',
|
||||
menuIds: [],
|
||||
deptIds: [],
|
||||
menuCheckStrictly: true,
|
||||
deptCheckStrictly: true,
|
||||
remark: undefined,
|
||||
})
|
||||
this.resetForm('form')
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.roleId)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
// this.reset();
|
||||
// this.form = response.data;
|
||||
// this.open = true;
|
||||
},
|
||||
/** 明细按钮操作 */
|
||||
handleDetail(row) {
|
||||
this.holdingpoleData = row
|
||||
this.showDialog = true
|
||||
},
|
||||
onDialogClose() {
|
||||
console.log('弹窗已关闭')
|
||||
this.showDialog = false
|
||||
// 在这里执行关闭后的相关操作
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleBack(row) {
|
||||
// console.log(row.id)
|
||||
this.$modal
|
||||
.confirm('是否确认删除所选择的数据项?')
|
||||
.then(() => {
|
||||
this.deviceType.forEach((e, index) => {
|
||||
if (e[3] === row.typeId) {
|
||||
this.deviceType.splice(index, 1)
|
||||
this.propsKey++
|
||||
}
|
||||
})
|
||||
this.equipmentList.forEach((item, index) => {
|
||||
if (item.id == row.id) {
|
||||
this.equipmentList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
|
||||
// const roleIds = row.roleId || this.ids;
|
||||
// this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
|
||||
// return delRole(roleIds);
|
||||
// }).then(() => {
|
||||
// this.getList();
|
||||
// this.$modal.msgSuccess("删除成功");
|
||||
// }).catch(() => {});
|
||||
},
|
||||
|
||||
handleBind(row){
|
||||
this.loadingTwo = true
|
||||
this.titleBind = "绑定"
|
||||
this.showBind = true;
|
||||
this.getListBind = null
|
||||
this.loadingTwo = false
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.popper-select {
|
||||
.el-cascader-panel .el-scrollbar .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-cascader-panel .el-scrollbar:nth-child(4) .el-checkbox {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,591 @@
|
|||
<template>
|
||||
<!-- 新增工机具 -->
|
||||
<div>
|
||||
<el-form
|
||||
:model="maForm"
|
||||
ref="maForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="类型规格" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入类型规格"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="机具厂家" prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请选择机具厂家"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typesList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂日期" prop="arrivalTime">
|
||||
<el-date-picker
|
||||
v-model="maForm.arrivalTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
:picker-options="pickerOptions"
|
||||
type="date"
|
||||
placeholder="请选择出厂日期"
|
||||
></el-date-picker>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleBackAll"
|
||||
>驳回</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="equipmentList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="物资名称"
|
||||
prop="materialName"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="规格型号"
|
||||
prop="materialModel"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="到货数量"
|
||||
prop="checkNum"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" label="单位" prop="unitName" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="供应商"
|
||||
prop="supplierName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="出厂日期"
|
||||
prop="productDate"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="相关配套资料"
|
||||
align="center"
|
||||
prop="checkUrlName"
|
||||
>
|
||||
<!-- <template slot-scope="scope">
|
||||
<div @click="openGt(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||
{{ '报告管理' }}
|
||||
</div>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="状态"
|
||||
prop="statusName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope" >
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleView(scope.row)"
|
||||
v-if="scope.row.statusName == '已绑定'"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleBind(scope.row)"
|
||||
v-if="scope.row.statusName != '已绑定'"
|
||||
>绑定</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-close"
|
||||
@click="handleBack(scope.row)"
|
||||
v-if="scope.row.statusName != '已绑定'"
|
||||
>驳回</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="maForm.pageNum"
|
||||
:limit.sync="maForm.pageSize"
|
||||
@pagination="getListPeople"
|
||||
/>
|
||||
|
||||
<!-- 新购查看弹窗 -->
|
||||
<el-dialog :title="titleBind" :visible.sync="showBind" width="1000px" append-to-body >
|
||||
<el-form :model="queryBind" ref="queryFormBind" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
</el-form>
|
||||
<el-table v-loading="loadingTwo" :data="getListPeople" width="800px" height = "600px" >
|
||||
<el-table-column label="序号" align="center" prop="userName" sortable/>
|
||||
<el-table-column label="类型名称" align="center" prop="newdeptId" sortable/>
|
||||
<el-table-column label="规格型号" align="center" prop="userRoleName" sortable/>
|
||||
<el-table-column label="设备编码" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="绑定人员" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="绑定时间" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="出厂编号" align="center" prop="telphone" sortable/>
|
||||
<el-table-column label="出厂时间" align="center" prop="telphone" sortable/>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryBind.pageNum"
|
||||
:limit.sync="queryBind.pageSize"
|
||||
@pagination="getListPeople"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 绑定查看弹窗 -->
|
||||
<el-dialog :title="titleTwo" :visible.sync="showTwo" width="1100px" append-to-body @close="cancel">
|
||||
<el-form :model="queryBindTwo" ref="queryFormBind" :rules="queryBindTwoRules" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item
|
||||
label="前缀"
|
||||
label-width="50px"
|
||||
prop="codePrefix"
|
||||
|
||||
>
|
||||
<el-input
|
||||
v-model="queryBindTwo.codePrefix"
|
||||
placeholder="请输入前缀"
|
||||
clearable
|
||||
maxlength="20"
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="后缀起始值"
|
||||
label-width="100px"
|
||||
prop="codeSuffixStart"
|
||||
|
||||
>
|
||||
<el-input
|
||||
v-model="queryBindTwo.codeSuffixStart"
|
||||
clearable
|
||||
placeholder="请输入后缀起始值"
|
||||
maxlength="99999999"
|
||||
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" @click="handleAdd">填充</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleQuery">绑定</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loadingTwo" :data="codeTableList" width="1000px" height = "600px" >
|
||||
<el-table-column label="设备名称" align="center" prop="materialName" />
|
||||
<el-table-column label="规格型号" align="center" prop="materialModel" />
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" />
|
||||
<el-table-column label="出厂编号" align="center" prop="outFacCode">
|
||||
<template v-slot:default="{ row }" >
|
||||
<el-input
|
||||
v-model="row.outFacCode"
|
||||
placeholder="请输入出厂编码"
|
||||
maxlength="30"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出厂时间" align="center" prop="productDate" >
|
||||
<template v-slot:default="{ row }">
|
||||
<el-date-picker
|
||||
v-model="row.productDate"
|
||||
type="date"
|
||||
placeholder="请输入检验时间"
|
||||
style="width: 160px"
|
||||
></el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<template>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleRemove(scope.row)"
|
||||
>
|
||||
移除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import {
|
||||
// } from '@/api/store/newBuy'
|
||||
import {
|
||||
getPurchaseCheckInfo,
|
||||
equipmentTypeTree,
|
||||
addPurchaseCheckInfo,
|
||||
// getPurchaseCheckInfo,
|
||||
updatePurchaseCheckInfo,
|
||||
} from '@/api/baseGround/newBuy'
|
||||
|
||||
import {
|
||||
getListDetail,
|
||||
getListDetailById,
|
||||
} from '@/api/baseGround/newBuyBind'
|
||||
// import { getUserByRoleList } from '@/api/system/user'
|
||||
// import { equipmentTypeTree, supplierInfoList } from '@/api/store/tools'
|
||||
// import Treeselect from '@riophae/vue-treeselect'
|
||||
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
// import HoldingpoleDialog from '@/components/HoldingpoleDialog/index.vue'
|
||||
|
||||
// import {} from '@/api/store/newBuy'
|
||||
|
||||
export default {
|
||||
name: 'BindTools',
|
||||
dicts: ['sys_normal_disable'],
|
||||
// components: { Treeselect, HoldingpoleDialog },
|
||||
props: {
|
||||
editTaskId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
taskId: '',
|
||||
// isEdit: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
loadingTwo: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
num:0,
|
||||
//机具类型
|
||||
equipmentTypeList: [],
|
||||
// 角色表格数据
|
||||
equipmentList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
titleBind: '',
|
||||
titleTwo: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
showBind: false,
|
||||
showTwo: false,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
queryBind:
|
||||
{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
queryBindTwo:
|
||||
{
|
||||
codePrefix: undefined,
|
||||
codeSuffixStart: undefined,
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
equipmentId: undefined,
|
||||
productionTime: '',
|
||||
supplierId: '',
|
||||
},
|
||||
maForm: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
materialName: undefined,
|
||||
materialModel: undefined,
|
||||
codeTableList:[],
|
||||
productDate:undefined,
|
||||
queryBindTwoRules: {
|
||||
codePrefix: [
|
||||
{ required: true, message: '请输入前缀', trigger: 'blur' },
|
||||
],
|
||||
codeSuffixStart: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入后缀起始值',
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
pattern: /^[1-9][0-9]*$/,
|
||||
message: '请输入大于0且不能以0开头的正整数',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pickerOptions() {
|
||||
return {
|
||||
disabledDate(time) {
|
||||
const currentDate = new Date()
|
||||
currentDate.setHours(0, 0, 0, 0)
|
||||
return time.getTime() < currentDate.getTime()
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
// 'maForm.purchaseTime'() {
|
||||
// if (this.maForm.purchaseTime != '') {
|
||||
// // this.maForm.arrivalTime = ''
|
||||
// }
|
||||
// },
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.taskId = this.editTaskId
|
||||
this.getTaskInfo();
|
||||
// this.getUserList()
|
||||
// this.getList();
|
||||
// this.supplierInfoList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
/** 新增按钮操作 */
|
||||
handleBackAll() {
|
||||
},
|
||||
|
||||
//获取任务详情--- 编辑回显数据
|
||||
getTaskInfo() {
|
||||
this.loading = true;
|
||||
getListDetail({taskId: this.taskId}).then((response) => {
|
||||
this.equipmentList = response.rows
|
||||
// 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.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
// this.equipmentList = response.data.purchaseCheckDetailsList
|
||||
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
|
||||
//打开查看页面
|
||||
handleView(row){
|
||||
this.loadingTwo = true;
|
||||
getListDetailById({taskId: row.taskId,typeId: row.typeId}).then((response) => {
|
||||
this.getListBind = response.rows;
|
||||
this.showBind = true
|
||||
this.titleBind = "查看"
|
||||
this.loadingTwo = false
|
||||
})
|
||||
},
|
||||
//打开绑定页面
|
||||
handleBind(row){
|
||||
this.titleTwo = "绑定"
|
||||
this.showTwo = true;
|
||||
this.num = row.checkNum;
|
||||
this.materialName = row.materialName;
|
||||
this.materialModel = row.materialModel;
|
||||
this.productDate = row.productDate;
|
||||
},
|
||||
|
||||
//填充
|
||||
handleAdd(){
|
||||
// this.$refs['queryBindTwo'].validate((valid) => {
|
||||
// if(valid){
|
||||
this.codeTableList = []
|
||||
// 设备编码: 前缀 拼接 后缀
|
||||
for (let i = 0; i < this.num; i++) {
|
||||
let suffix = parseInt(this.queryBindTwo.codeSuffixStart) + i
|
||||
suffix = suffix
|
||||
.toString()
|
||||
.padStart(
|
||||
this.queryBindTwo.codeSuffixStart?.length,
|
||||
'0',
|
||||
)
|
||||
console.log('suffix',suffix)
|
||||
// console.log('🚀 ~ fillCodeForm ~ suffix:', suffix);
|
||||
suffix = isNaN(suffix) ? '' : suffix
|
||||
console.log('suffixTwo',suffix)
|
||||
const maCode = `${
|
||||
this.queryBindTwo.codePrefix || ''
|
||||
}${suffix}`
|
||||
console.log('maCode',maCode)
|
||||
// 出厂编码
|
||||
const outFacCode = ''
|
||||
const materialName = this.materialName;
|
||||
const materialModel = this.materialModel;
|
||||
const productDate = this.productDate;
|
||||
// const productDate = this.queryBindTwo.productDate
|
||||
this.codeTableList.push({
|
||||
materialName,
|
||||
materialModel,
|
||||
maCode,
|
||||
outFacCode,
|
||||
productDate,
|
||||
})
|
||||
}
|
||||
// }
|
||||
// })
|
||||
},
|
||||
|
||||
cancel(){
|
||||
this.codeTableList = [];
|
||||
this.showTwo = false;
|
||||
this.reset()
|
||||
},
|
||||
reset() {
|
||||
this.resetForm("queryFormBind");
|
||||
},
|
||||
|
||||
handleQuery(){
|
||||
|
||||
},
|
||||
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
if (this.$refs.menu != undefined) {
|
||||
this.$refs.menu.setCheckedKeys([])
|
||||
}
|
||||
;(this.menuExpand = false),
|
||||
(this.menuNodeAll = false),
|
||||
(this.deptExpand = true),
|
||||
(this.deptNodeAll = false),
|
||||
(this.form = {
|
||||
roleId: undefined,
|
||||
roleName: undefined,
|
||||
roleKey: undefined,
|
||||
roleSort: 0,
|
||||
status: '0',
|
||||
menuIds: [],
|
||||
deptIds: [],
|
||||
menuCheckStrictly: true,
|
||||
deptCheckStrictly: true,
|
||||
remark: undefined,
|
||||
})
|
||||
this.resetForm('form')
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.roleId)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
// this.reset();
|
||||
// this.form = response.data;
|
||||
// this.open = true;
|
||||
},
|
||||
/** 明细按钮操作 */
|
||||
handleDetail(row) {
|
||||
this.holdingpoleData = row
|
||||
this.showDialog = true
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleBack(row) {
|
||||
// console.log(row.id)
|
||||
this.$modal
|
||||
.confirm('是否确认删除所选择的数据项?')
|
||||
.then(() => {
|
||||
this.deviceType.forEach((e, index) => {
|
||||
if (e[3] === row.typeId) {
|
||||
this.deviceType.splice(index, 1)
|
||||
this.propsKey++
|
||||
}
|
||||
})
|
||||
this.equipmentList.forEach((item, index) => {
|
||||
if (item.id == row.id) {
|
||||
this.equipmentList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
|
||||
// const roleIds = row.roleId || this.ids;
|
||||
// this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
|
||||
// return delRole(roleIds);
|
||||
// }).then(() => {
|
||||
// this.getList();
|
||||
// this.$modal.msgSuccess("删除成功");
|
||||
// }).catch(() => {});
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.popper-select {
|
||||
.el-cascader-panel .el-scrollbar .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.el-cascader-panel .el-scrollbar:nth-child(4) .el-checkbox {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,575 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="50px"
|
||||
>
|
||||
<el-form-item label="日期">
|
||||
<el-date-picker
|
||||
v-model="queryParams.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" label-width="100px">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择设备状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typesList"
|
||||
:key="typeItem.typeId"
|
||||
:label="typeItem.typeName"
|
||||
:value="typeItem.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="关键字" prop="keyWord" label-width="100px">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出数据</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="bindList"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="到货时间"
|
||||
prop="arrivalTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购单号"
|
||||
align="center"
|
||||
prop="purchaseCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购物资"
|
||||
align="center"
|
||||
prop="purchaseMaterial"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购数量"
|
||||
align="center"
|
||||
prop="purchaseNum"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建人"
|
||||
align="center"
|
||||
prop="createBy"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
prop="statusName"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remark"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column label="操作" align="center" width="400">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-zoom-in"
|
||||
@click="handleView(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-paperclip"
|
||||
@click="handleBind(scope.row)"
|
||||
v-hasPermi="['newPurchase:tools:edit']"
|
||||
>编码绑定</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-close"
|
||||
@click="handleNotice(scope.row)"
|
||||
v-if="scope.row.statusName != '已驳回'"
|
||||
>驳回</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="success"
|
||||
@click="handleBindQr(scope.row)"
|
||||
>二维码绑定</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 新购查看弹窗 -->
|
||||
<el-dialog :title="titleBind" :visible.sync="showBind" width="1000px" append-to-body >
|
||||
<el-form :model="queryBind" ref="queryFormBind" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
</el-form>
|
||||
<el-table v-loading="loadingTwo" :data="getListBind" width="800px" height = "600px" >
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (queryBind.pageNum - 1) * queryBind.pageSize + scope.$index + 1 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型名称" align="center" prop="materialName" sortable/>
|
||||
<el-table-column label="规格型号" align="center" prop="materialModel" sortable/>
|
||||
<el-table-column label="设备编码" align="center" prop="maCode" sortable/>
|
||||
<el-table-column label="绑定人员" align="center" prop="createBy" sortable/>
|
||||
<el-table-column label="绑定时间" align="center" prop="createTime" sortable/>
|
||||
<el-table-column label="出厂编号" align="center" prop="outFacCode" sortable/>
|
||||
<el-table-column label="出厂时间" align="center" prop="productDate" sortable/>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryBind.pageNum"
|
||||
:limit.sync="queryBind.pageSize"
|
||||
@pagination="getListBind"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getListNewBuy,
|
||||
getPurchaseCheckInfo,
|
||||
getAcceptanceForm,
|
||||
purchaseCheckInfoRemove,
|
||||
getNoticePeople,
|
||||
getUserAll,
|
||||
addNoticeUser,
|
||||
bmNoticeInfo,
|
||||
} from '@/api/baseGround/newBuy'
|
||||
import {
|
||||
getListNewBuyBind,
|
||||
getListDetail,
|
||||
} from '@/api/baseGround/newBuyBind'
|
||||
// import {
|
||||
// getRepairedList,
|
||||
// getRepairedDetailList,
|
||||
// inputByType,
|
||||
// getTypeList,
|
||||
// } from '@/api/store/warehousing'
|
||||
// import vueEasyPrint from 'vue-easy-print'
|
||||
// import { getLeaseAuditListAll } from '@/api/claimAndRefund/receive'
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
dicts: ['sys_normal_disable'],
|
||||
// components: { vueEasyPrint },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loadingTwo: true,
|
||||
updateTime:"",
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
showBind: false,
|
||||
peopleOpen: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
totalTwo: 0,
|
||||
//搜索下拉数据
|
||||
typesList: [],
|
||||
modelList: [],
|
||||
// 字典表格数据
|
||||
bindList: [],
|
||||
getListBind:[],
|
||||
configUserList: [],
|
||||
phoneNumbers:[],
|
||||
//选择人员
|
||||
chosenUserList: [],
|
||||
userList: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
titleBind: '',
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
time: null, //申请时间
|
||||
name: undefined,
|
||||
typeId: '',
|
||||
keyWord: '',
|
||||
},
|
||||
queryBind: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
openPrint: false,
|
||||
printData: {},
|
||||
printTableData: [],
|
||||
// 供应商
|
||||
supplierStr: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
// this.getTypeList()
|
||||
},
|
||||
methods: {
|
||||
// 多选框选中-添加人员
|
||||
handleSelectionUser(selection) {
|
||||
// console.log(selection)
|
||||
this.chosenUserList = selection
|
||||
},
|
||||
|
||||
// getTypeList() {
|
||||
// getTypeList({ level: '3' }).then((response) => {
|
||||
// this.typesList = response.data
|
||||
// })
|
||||
// getTypeList({ level: '4' }).then((response) => {
|
||||
// this.modelList = response.data
|
||||
// })
|
||||
// },
|
||||
|
||||
getList() {
|
||||
this.loading = true
|
||||
const params = {
|
||||
keyWord: this.queryParams.keyWord,
|
||||
startTime: this.queryParams.dateRange && this.queryParams.dateRange[0],
|
||||
endTime: this.queryParams.dateRange && this.queryParams.dateRange[1],
|
||||
status: this.queryParams.status,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum,
|
||||
}
|
||||
getListNewBuyBind(this.addDateRange(params)).then(
|
||||
(response) => {
|
||||
this.bindList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
},
|
||||
)
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.time = []
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.keyWord = ''
|
||||
this.handleQuery()
|
||||
},
|
||||
// /** 新增按钮操作 */
|
||||
// handleAdd() {
|
||||
// this.$emit('addTools')
|
||||
// },
|
||||
/** 查看按钮操作 */
|
||||
handleView(row) {
|
||||
this.loadingTwo = true;
|
||||
getListDetail({taskId: row.taskId}).then((response) => {
|
||||
this.getListBind = response.rows;
|
||||
this.showBind = true
|
||||
this.titleBind = "查看"
|
||||
this.loadingTwo = false
|
||||
})
|
||||
},
|
||||
/** 编码绑定按钮操作 */
|
||||
handleBind(row) {
|
||||
this.$emit('bindTools', row.taskId)
|
||||
},
|
||||
|
||||
/** 编码绑定按钮操作 */
|
||||
handleBindQr(row) {
|
||||
this.$emit('bindQrTools', row.taskId)
|
||||
},
|
||||
|
||||
//----消息通知
|
||||
getNowTime() {
|
||||
var today = new Date()
|
||||
var year = today.getFullYear() //获取年份
|
||||
var month = today.getMonth() + 1 //获取月份
|
||||
var day = today.getDate() //获取日期
|
||||
return year + '-' + month + '-' + day
|
||||
},
|
||||
|
||||
handleNotice(row){
|
||||
this.reset()
|
||||
this.showBind = true;
|
||||
const taskId = row.taskId;
|
||||
getNoticePeople({taskId: taskId}).then((response) => {
|
||||
this.getListBind = response.rows;
|
||||
this.showBind = true
|
||||
this.loadingTwo = false
|
||||
this.title = '通知'
|
||||
})
|
||||
},
|
||||
|
||||
addUserOpen() {
|
||||
this.getAllUserList()
|
||||
this.peopleOpen = true
|
||||
},
|
||||
|
||||
//确认消息通知
|
||||
configNotice() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.configUserList.forEach((item, index) => {
|
||||
item.telphone = item.telphone
|
||||
item.remark = this.form.remark
|
||||
this.phoneNumbers.push(item.telphone)
|
||||
})
|
||||
let param = {
|
||||
phoneNumbers: this.phoneNumbers,
|
||||
content: this.form.remark,
|
||||
}
|
||||
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',
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 人员取消按钮
|
||||
cancel() {
|
||||
this.showBind = false;
|
||||
this.reset();
|
||||
},
|
||||
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.taskId)
|
||||
this.single = selection.length != 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
|
||||
/** 验收按钮 */
|
||||
handleAccept(row) {
|
||||
// let query = { taskId: row.taskId }
|
||||
// this.$tab.closeOpenPage({
|
||||
// path: '/store/newBuy/newDevicesAccept',
|
||||
// query,
|
||||
// })
|
||||
this.$emit('acceptTools', row.taskId)
|
||||
},
|
||||
//编码管理
|
||||
handleCode(row) {
|
||||
// let query = { taskId: row.taskId }
|
||||
// this.$tab
|
||||
// .closeOpenPage({
|
||||
// path: '/store/newBuy/newDevicesCode',
|
||||
// query,
|
||||
// })
|
||||
// .then(() => {
|
||||
// this.$tab.refreshPage()
|
||||
// })
|
||||
this.$emit('codingTools', row.taskId)
|
||||
},
|
||||
|
||||
//获取验收单数据
|
||||
getPrintTable(taskId) {
|
||||
getAcceptanceForm({ taskId: taskId }).then((response) => {
|
||||
this.printData = response.data
|
||||
this.printTableData = response.data.checkDetailsList
|
||||
|
||||
let supplierList = []
|
||||
this.printTableData.forEach((e) => {
|
||||
if (e.supplier) {
|
||||
supplierList.push(e.supplier)
|
||||
}
|
||||
})
|
||||
supplierList = [...new Set(supplierList)]
|
||||
|
||||
this.supplierStr = supplierList.join(',')
|
||||
})
|
||||
},
|
||||
//查看验收单
|
||||
handlePrint(row) {
|
||||
// this.query.taskId = row.taskId
|
||||
// this.getPrintTable(row.taskId)
|
||||
this.openPrint = true
|
||||
this.title = '机具设备到货验收单'
|
||||
},
|
||||
//打印
|
||||
print() {
|
||||
this.$refs.remarksPrintRef.print()
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
// console.log(row)
|
||||
const taskIds = row.taskId || this.ids
|
||||
this.$modal
|
||||
.confirm('是否确认删除所选择的数据项?')
|
||||
.then(function () {
|
||||
return purchaseCheckInfoRemove(taskIds)
|
||||
})
|
||||
.then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
|
||||
handleDeletePeople(row){
|
||||
const ids = row.id
|
||||
this.$modal
|
||||
.confirm('是否确认删除所选择的数据项?')
|
||||
.then(function () {
|
||||
return deletePeople(ids)
|
||||
})
|
||||
.then(() => {
|
||||
this.handleNotice(row)
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
'material/purchase_check_info/export',
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`新购工机具验收_${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler(to) {
|
||||
if (to.query.keyWord) {
|
||||
this.queryParams.keyWord = to.query.keyWord
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-table .fixed-width .el-button--mini {
|
||||
width: 70px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<template>
|
||||
<!-- 新购验收绑定 -->
|
||||
<div class="app-container">
|
||||
<PageHeader
|
||||
v-if="isShowComponent != 'Home'"
|
||||
:pageContent="pageContent"
|
||||
@goBack="goBack"
|
||||
/>
|
||||
<component
|
||||
:is="isShowComponent"
|
||||
:isEdit="isEdit"
|
||||
:editTaskId="editTaskId"
|
||||
:queryTaskId="queryTaskId"
|
||||
:isView="isView"
|
||||
:codingTaskId="codingTaskId"
|
||||
@bindTools="bindTools"
|
||||
@bindQrTools="bindQrTools"
|
||||
@addToolsSuccess="addToolsSuccess"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PageHeader from "@/components/pageHeader";
|
||||
import Home from "./component/home.vue"; // 主列表
|
||||
import BindTools from './component/bindTools.vue' // 编码绑定
|
||||
import BindQrTools from './component/bindQrTools.vue' // 二维码绑定
|
||||
export default {
|
||||
components: {
|
||||
Home,
|
||||
PageHeader,
|
||||
BindTools,
|
||||
BindQrTools,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShowComponent: "Home",
|
||||
pageContent: "新增机具",
|
||||
isEdit: false,
|
||||
editTaskId: "",
|
||||
queryTaskId: "",
|
||||
isView: false,
|
||||
codingTaskId: "",
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
/* 编码绑定 */
|
||||
bindTools(taskId) {
|
||||
this.editTaskId = taskId
|
||||
this.queryTaskId = ''
|
||||
this.pageContent = '编码绑定'
|
||||
this.isShowComponent = 'BindTools'
|
||||
},
|
||||
/* 新增成功 */
|
||||
addToolsSuccess() {
|
||||
this.isShowComponent = 'Home'
|
||||
},
|
||||
/* 二维码绑定 */
|
||||
bindQrTools(taskId) {
|
||||
this.pageContent = '二维码绑定'
|
||||
this.editTaskId = taskId
|
||||
this.isShowComponent = 'BindQrTools'
|
||||
},
|
||||
/* 编辑工机具 */
|
||||
editTools(id) {
|
||||
this.isEdit = true
|
||||
this.pageContent = '编辑机具'
|
||||
this.editTaskId = id
|
||||
this.isShowComponent = 'BindTools'
|
||||
},
|
||||
|
||||
/* 返回按钮 */
|
||||
goBack() {
|
||||
this.isShowComponent = "Home";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue