新购新增3
This commit is contained in:
parent
fe4daa62ac
commit
b971631106
|
|
@ -74,7 +74,7 @@
|
||||||
<el-table-column label="规格型号" align="center" prop="typeName" />
|
<el-table-column label="规格型号" align="center" prop="typeName" />
|
||||||
<el-table-column label="单位" align="center" prop="unitName"/>
|
<el-table-column label="单位" align="center" prop="unitName"/>
|
||||||
<el-table-column label="采购数量" align="center" prop="purchaseNum" />
|
<el-table-column label="采购数量" align="center" prop="purchaseNum" />
|
||||||
<el-table-column label="购置单价(元含税)" align="center" prop="purchasePrice" />
|
<el-table-column label="购置单价(元含税)" align="center" prop="purchaseTaxPrice" />
|
||||||
<el-table-column label="购置单价(元不含税)" align="center" prop="purchasePrice" />
|
<el-table-column label="购置单价(元不含税)" align="center" prop="purchasePrice" />
|
||||||
|
|
||||||
<el-table-column label="供应商" align="center" prop="supplierName" />
|
<el-table-column label="供应商" align="center" prop="supplierName" />
|
||||||
|
|
@ -191,7 +191,13 @@
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
rowData:{},
|
rowData:{},
|
||||||
fileDataList: [],
|
fileDataList: [
|
||||||
|
{dictLabel:"合格证",dictCode:"0",fileName:"",fileUrl:""},
|
||||||
|
{dictLabel:"型式试验报告",dictCode:"1",fileName:"",fileUrl:""},
|
||||||
|
{dictLabel:"出厂检测报告",dictCode:"2",fileName:"",fileUrl:""},
|
||||||
|
{dictLabel:"第三方监测报告",dictCode:"3",fileName:"",fileUrl:""},
|
||||||
|
{dictLabel:"其他报告",dictCode:"99",fileName:"",fileUrl:""},
|
||||||
|
],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
// pageNum: 1,
|
// pageNum: 1,
|
||||||
|
|
@ -289,20 +295,21 @@
|
||||||
//文件管理
|
//文件管理
|
||||||
openFileDialog(row){
|
openFileDialog(row){
|
||||||
this.rowData=row;
|
this.rowData=row;
|
||||||
this.getFileData()
|
// this.getFileData()
|
||||||
|
|
||||||
this.open=true
|
this.open=true
|
||||||
},
|
},
|
||||||
getFileData(){
|
// getFileData(){
|
||||||
let param = {
|
// let param = {
|
||||||
typeId:this.rowData.typeId,
|
// typeId:this.rowData.typeId,
|
||||||
taskId:this.rowData.taskId
|
// taskId:this.rowData.taskId
|
||||||
}
|
// }
|
||||||
this.dialogLoading=true
|
// this.dialogLoading=true
|
||||||
getPurchaseFileList(param).then((response) => {
|
// getPurchaseFileList(param).then((response) => {
|
||||||
this.fileDataList=response.data
|
// this.fileDataList=response.data
|
||||||
this.dialogLoading = false;
|
// this.dialogLoading = false;
|
||||||
}).catch(() => {this.dialogLoading = false;})
|
// }).catch(() => {this.dialogLoading = false;})
|
||||||
},
|
// },
|
||||||
beforeFileUpload(row){
|
beforeFileUpload(row){
|
||||||
this.rowData.dictCode=row.dictCode;
|
this.rowData.dictCode=row.dictCode;
|
||||||
this.rowData.dictLabel=row.dictLabel;
|
this.rowData.dictLabel=row.dictLabel;
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@
|
||||||
<el-table-column label="采购物资" align="center" prop="purchaseMaTypeName" />
|
<el-table-column label="采购物资" align="center" prop="purchaseMaTypeName" />
|
||||||
<el-table-column label="采购数量" align="center" prop="purchaseMaNumber" />
|
<el-table-column label="采购数量" align="center" prop="purchaseMaNumber" />
|
||||||
<el-table-column label="采购价格(元含税)" align="center" prop="purchaseTaxPrice" width="80"/>
|
<el-table-column label="采购价格(元含税)" align="center" prop="purchaseTaxPrice" width="80"/>
|
||||||
<el-table-column label="采购价格(元不含税)" align="center" prop="purchaseNoTaxPrice" width="98"/>
|
<el-table-column label="采购价格(元不含税)" align="center" prop="purchasePrice" width="98"/>
|
||||||
<el-table-column label="税率" align="center" prop="taxRate" />
|
<el-table-column label="税率" align="center" prop="taxRate" />
|
||||||
<el-table-column label="操作人" align="center" prop="createUserName" />
|
<el-table-column label="操作人" align="center" prop="createUserName" />
|
||||||
<el-table-column label="操作时间" align="center" prop="createTime" />
|
<el-table-column label="操作时间" align="center" prop="createTime" />
|
||||||
|
|
|
||||||
|
|
@ -214,9 +214,7 @@
|
||||||
prop="checkUrlName"
|
prop="checkUrlName"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div @click="openGt(scope.row)" style="color: #02a7f0; cursor: pointer">
|
<div style="color: rgb(2, 167, 240);cursor: pointer;" @click="openFileDialog(scope.row)">报告管理</div>
|
||||||
{{ '报告管理' }}
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
@ -234,66 +232,59 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<holdingpole-dialog
|
|
||||||
:dialog-class="'my-custom-dialog'"
|
|
||||||
:initial-visible="showDialog"
|
|
||||||
: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-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
|
||||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" />
|
<el-table :data="fileDataList" width="100%" height="350px">
|
||||||
<el-table-column label="序号" align="center" width="80" type="index">
|
<el-table-column label="序号" type="index" width="55" align="center"/>
|
||||||
<template slot-scope="scope">
|
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true"/>
|
||||||
<span>{{ (queryGt.pageNum - 1) * queryGt.pageSize + scope.$index + 1 }}</span>
|
<el-table-column label="文件名称" align="center" prop="fileName" :show-overflow-tooltip="true"/>
|
||||||
</template>
|
<el-table-column label="类型名称" align="center" :show-overflow-tooltip="true">
|
||||||
</el-table-column>
|
<template>
|
||||||
<el-table-column label="杆塔id" align="center" prop="gtId" v-if="false" />
|
<div>{{this.rowData.maTypeName}}</div>
|
||||||
<el-table-column label="杆塔编号" align="center" prop="gtCode" sortable/>
|
</template>
|
||||||
<el-table-column label="杆塔经度" align="center" prop="lon" sortable/>
|
</el-table-column>
|
||||||
<el-table-column label="杆塔纬度" align="center" prop="lat" sortable/>
|
<el-table-column label="规格型号" align="center" :show-overflow-tooltip="true">
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<template>
|
||||||
<template slot-scope="scope">
|
<div>{{this.rowData.typeName}}</div>
|
||||||
<el-button
|
</template>
|
||||||
size="mini"
|
</el-table-column>
|
||||||
type="text"
|
<!-- <el-table-column label="报告日期" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
||||||
icon="el-icon-edit"
|
<el-table-column label="截止有效期" align="center" prop="orgName" :show-overflow-tooltip="true"/> -->
|
||||||
@click="handleUpdateGt(scope.row)"
|
<el-table-column label="操作" align="center" width="100">
|
||||||
v-hasPermi="['basic:device:edit']"
|
<template slot-scope="scope">
|
||||||
>编辑</el-button>
|
<div style="display: flex;align-items: center;justify-content: space-between;">
|
||||||
<el-button
|
<el-upload ref="upload" :limit="1" :headers="upload.headers"
|
||||||
size="mini"
|
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||||
type="text"
|
:on-success="handleFileSuccess" :auto-upload="true"
|
||||||
icon="el-icon-delete"
|
>
|
||||||
@click="handleDeleteGt(scope.row)"
|
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
|
||||||
|
上传
|
||||||
|
</el-button>
|
||||||
|
</el-upload>
|
||||||
|
|
||||||
>删除</el-button>
|
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.fileUrl">
|
||||||
</template>
|
查看
|
||||||
</el-table-column>
|
</el-button>
|
||||||
</el-table>
|
</div>
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="totalTwo>0"
|
</template>
|
||||||
:total="totalTwo"
|
</el-table-column>
|
||||||
:page.sync="queryGt.pageNum"
|
</el-table>
|
||||||
:limit.sync="queryGt.pageSize"
|
</el-dialog>
|
||||||
@pagination="getListGt"
|
|
||||||
/> -->
|
<!-- 图片查看弹窗 -->
|
||||||
<!--
|
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px" >
|
||||||
</el-dialog> -->
|
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import {
|
|
||||||
// } from '@/api/store/newBuy'
|
|
||||||
import {
|
import {
|
||||||
getPurchaseCheckInfo,
|
getPurchaseCheckInfo,
|
||||||
equipmentTypeTree,
|
equipmentTypeTree,
|
||||||
|
|
@ -301,14 +292,13 @@ import {
|
||||||
updatePurchaseCheckInfo,
|
updatePurchaseCheckInfo,
|
||||||
} from '@/api/purchase/goodsArrived';
|
} from '@/api/purchase/goodsArrived';
|
||||||
import { getListFacturer } from '@/api/ma/supplier';
|
import { getListFacturer } from '@/api/ma/supplier';
|
||||||
// import { getUserByRoleList } from '@/api/system/user'
|
import { getToken } from '@/utils/auth'
|
||||||
|
import { uploadPurchaseFile } from "@/api/purchase/goodsAccept";
|
||||||
|
|
||||||
// import Treeselect from '@riophae/vue-treeselect'
|
// import Treeselect from '@riophae/vue-treeselect'
|
||||||
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
// import HoldingpoleDialog from '@/components/HoldingpoleDialog/index.vue'
|
// import HoldingpoleDialog from '@/components/HoldingpoleDialog/index.vue'
|
||||||
|
|
||||||
// import {} from '@/api/store/newBuy'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddTools',
|
name: 'AddTools',
|
||||||
dicts: ['sys_normal_disable'],
|
dicts: ['sys_normal_disable'],
|
||||||
|
|
@ -354,59 +344,30 @@ export default {
|
||||||
supplierList: [],
|
supplierList: [],
|
||||||
//机具类型
|
//机具类型
|
||||||
equipmentTypeList: [],
|
equipmentTypeList: [],
|
||||||
// 用户数据
|
|
||||||
userList: [],
|
|
||||||
// 角色表格数据
|
// 角色表格数据
|
||||||
equipmentList: [],
|
equipmentList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: '',
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
showGt:false,
|
rowData:{},
|
||||||
// 是否显示弹出层(数据权限)
|
fileDataList: [
|
||||||
openDataScope: false,
|
{dictLabel:"合格证",dictCode:"0",fileName:"",fileUrl:""},
|
||||||
menuExpand: false,
|
{dictLabel:"型式试验报告",dictCode:"1",fileName:"",fileUrl:""},
|
||||||
menuNodeAll: false,
|
{dictLabel:"出厂检测报告",dictCode:"2",fileName:"",fileUrl:""},
|
||||||
deptExpand: true,
|
{dictLabel:"第三方监测报告",dictCode:"3",fileName:"",fileUrl:""},
|
||||||
deptNodeAll: false,
|
{dictLabel:"其他报告",dictCode:"99",fileName:"",fileUrl:""},
|
||||||
showDialog: false,
|
|
||||||
holdingpoleData: {},
|
|
||||||
// 日期范围
|
|
||||||
dateRange: [],
|
|
||||||
queryGt: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
id:undefined,
|
|
||||||
taskId:undefined,
|
|
||||||
typesList:[],
|
|
||||||
},
|
|
||||||
// 数据范围选项
|
|
||||||
dataScopeOptions: [
|
|
||||||
{
|
|
||||||
value: '1',
|
|
||||||
label: '全部数据权限',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '2',
|
|
||||||
label: '自定数据权限',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '3',
|
|
||||||
label: '本部门数据权限',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '4',
|
|
||||||
label: '本部门及以下数据权限',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '5',
|
|
||||||
label: '仅本人数据权限',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
// 菜单列表
|
//图片查看弹窗
|
||||||
menuOptions: [],
|
dialogImageUrl: '',
|
||||||
// 部门列表
|
dialogVisible: false,
|
||||||
deptOptions: [],
|
//上传
|
||||||
|
upload: {
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: { Authorization: 'Bearer ' + getToken() },
|
||||||
|
// 上传的地址
|
||||||
|
url: process.env.VUE_APP_BASE_API + '/file/upload'
|
||||||
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
equipmentId: undefined,
|
equipmentId: undefined,
|
||||||
|
|
@ -486,49 +447,26 @@ export default {
|
||||||
this.id = this.editId
|
this.id = this.editId
|
||||||
this.getTaskInfo()
|
this.getTaskInfo()
|
||||||
}
|
}
|
||||||
// this.getUserList()
|
|
||||||
// this.getList();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 税率
|
||||||
taxRateChange(val){
|
taxRateChange(val){
|
||||||
this.maForm.taxRate = val.replace(/[^\d.]/g,'')
|
this.maForm.taxRate = val.replace(/[^\d.]/g,'')
|
||||||
this.equipmentList.forEach(item=>{
|
this.equipmentList.forEach(item=>{
|
||||||
item.purchaseTaxPrice = item.purchasePrice*(1 + val/100)
|
item.purchaseTaxPrice = item.purchasePrice*(1 + val/100)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 含税单价
|
||||||
purchaseTaxPriceChange(row,val){
|
purchaseTaxPriceChange(row,val){
|
||||||
// this.equipmentList[val].purchasePrice = (row.purchaseTaxPrice/(1 + this.maForm.taxRate/100)).toFixed(2)
|
// this.equipmentList[val].purchasePrice = (row.purchaseTaxPrice/(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||||
row.purchasePrice = (row.purchaseTaxPrice/(1 + this.maForm.taxRate/100)).toFixed(2)
|
row.purchasePrice = (row.purchaseTaxPrice/(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||||
},
|
},
|
||||||
|
// 不含税单价
|
||||||
purchasePriceChange(row,val){
|
purchasePriceChange(row,val){
|
||||||
// this.equipmentList[val].purchaseTaxPrice = (row.purchasePrice*(1 + this.maForm.taxRate/100)).toFixed(2)
|
// this.equipmentList[val].purchaseTaxPrice = (row.purchasePrice*(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||||
row.purchaseTaxPrice = (row.purchasePrice*(1 + this.maForm.taxRate/100)).toFixed(2)
|
row.purchaseTaxPrice = (row.purchasePrice*(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||||
},
|
},
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 查询用户列表--采购员 */
|
|
||||||
getUserList() {
|
|
||||||
getUserByRoleList({ roleIds: [152] }).then((response) => {
|
|
||||||
this.userList = response.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
/** 物资厂家 */
|
/** 物资厂家 */
|
||||||
supplierInfoList() {
|
supplierInfoList() {
|
||||||
let param = {
|
let param = {
|
||||||
|
|
@ -540,6 +478,12 @@ export default {
|
||||||
this.supplierList = response.rows
|
this.supplierList = response.rows
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//选择物资厂家
|
||||||
|
changeSupplier(supplierId) {
|
||||||
|
this.equipmentList.forEach((item) => {
|
||||||
|
this.$set(item, 'supplierId', supplierId)
|
||||||
|
})
|
||||||
|
},
|
||||||
/** 机具类型 */
|
/** 机具类型 */
|
||||||
equipmentType() {
|
equipmentType() {
|
||||||
equipmentTypeTree().then((response) => {
|
equipmentTypeTree().then((response) => {
|
||||||
|
|
@ -577,7 +521,6 @@ export default {
|
||||||
this.deviceType = selectList
|
this.deviceType = selectList
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//添加机具类型
|
//添加机具类型
|
||||||
select(row) {
|
select(row) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
|
|
@ -604,20 +547,58 @@ export default {
|
||||||
this.equipmentList.unshift(row)
|
this.equipmentList.unshift(row)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//选择物资厂家
|
//添加机具类型
|
||||||
changeSupplier(supplierId) {
|
deviceTypeChange(val) {
|
||||||
this.equipmentList.forEach((item) => {
|
const deviceTypeList =
|
||||||
this.$set(item, 'supplierId', supplierId)
|
this.$refs.deviceTypeCascader.getCheckedNodes()
|
||||||
})
|
let tempList = []
|
||||||
|
if (val.length > 0) {
|
||||||
|
const items = val.map((e) => {
|
||||||
|
return e[3]
|
||||||
|
})
|
||||||
|
for (let i of items) {
|
||||||
|
for (let z of deviceTypeList) {
|
||||||
|
if (z.data.typeId === i) {
|
||||||
|
const obj = JSON.parse(JSON.stringify(z.data))
|
||||||
|
obj.supplierId = ''
|
||||||
|
obj.createTime = null
|
||||||
|
obj.productionTime = ''
|
||||||
|
obj.purchaseTaxPrice = 0
|
||||||
|
obj.purchaseTaxPrice = 0
|
||||||
|
obj.purchaseNum = 1
|
||||||
|
tempList.push(obj)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const newDataListNew = [...this.equipmentList, ...tempList]
|
||||||
|
const map = new Map()
|
||||||
|
for (let item of newDataListNew) {
|
||||||
|
if (!map.has(item.typeId)) {
|
||||||
|
map.set(item.typeId, item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const newArray = [...map.values()]
|
||||||
|
let newArray_array = []
|
||||||
|
items.forEach((e) => {
|
||||||
|
newArray.forEach((j) => {
|
||||||
|
if (e == j.typeId) {
|
||||||
|
newArray_array.push(j)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.equipmentList = newArray_array
|
||||||
|
} else {
|
||||||
|
this.equipmentList = []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//选择出厂日期
|
//选择出厂日期
|
||||||
changeTime(time) {
|
productionTimeChange(val){
|
||||||
console.log(time)
|
this.equipmentList.forEach(item=>{
|
||||||
this.equipmentList.forEach((item) => {
|
item.productionTime=val
|
||||||
this.$set(item, 'productionTime', time)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取任务详情--- 编辑回显数据
|
//获取任务详情--- 编辑回显数据
|
||||||
getTaskInfo() {
|
getTaskInfo() {
|
||||||
// this.loading = true;
|
// this.loading = true;
|
||||||
|
|
@ -635,94 +616,12 @@ export default {
|
||||||
// this.loading = false;
|
// 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) {
|
|
||||||
//查询到就返回该数组对象的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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/** 查询右侧列表 */
|
|
||||||
getList() {
|
|
||||||
// this.loading = true;
|
|
||||||
// listRole().then(response => {
|
|
||||||
// this.equipmentList = response.rows;
|
|
||||||
// this.total = response.total;
|
|
||||||
// this.loading = false;
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false
|
|
||||||
this.reset()
|
|
||||||
},
|
|
||||||
// 取消按钮(数据权限)
|
|
||||||
cancelDataScope() {
|
|
||||||
this.openDataScope = false
|
|
||||||
this.reset()
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
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) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map((item) => item.roleId)
|
this.ids = selection.map((item) => item.roleId)
|
||||||
this.single = selection.length != 1
|
this.single = selection.length != 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleSave() {
|
handleSave() {
|
||||||
console.log(this.equipmentList)
|
console.log(this.equipmentList)
|
||||||
|
|
@ -786,105 +685,77 @@ export default {
|
||||||
this.$modal.msgError('请先添加机具类型')
|
this.$modal.msgError('请先添加机具类型')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//文件管理
|
||||||
/** 修改按钮操作 */
|
openFileDialog(row){
|
||||||
handleUpdate(row) {
|
this.rowData=row;
|
||||||
// this.reset();
|
// this.getFileData()
|
||||||
// this.form = response.data;
|
this.open=true
|
||||||
// this.open = true;
|
|
||||||
},
|
},
|
||||||
/** 明细按钮操作 */
|
// getFileData(){
|
||||||
handleDetail(row) {
|
// let param = {
|
||||||
this.holdingpoleData = row
|
// typeId:this.rowData.typeId,
|
||||||
this.showDialog = true
|
// taskId:this.rowData.taskId
|
||||||
|
// }
|
||||||
|
// this.dialogLoading=true
|
||||||
|
// getPurchaseFileList(param).then((response) => {
|
||||||
|
// this.fileDataList=response.data
|
||||||
|
// this.dialogLoading = false;
|
||||||
|
// }).catch(() => {this.dialogLoading = false;})
|
||||||
|
// },
|
||||||
|
beforeFileUpload(row){
|
||||||
|
this.rowData.dictCode=row.dictCode;
|
||||||
|
this.rowData.dictLabel=row.dictLabel;
|
||||||
},
|
},
|
||||||
onDialogClose() {
|
// 文件上传成功处理
|
||||||
console.log('弹窗已关闭')
|
handleFileSuccess(response, file, fileList) {
|
||||||
this.showDialog = false
|
if(response.code==200){
|
||||||
// 在这里执行关闭后的相关操作
|
let param = {
|
||||||
},
|
"id": this.Id,
|
||||||
/** 删除按钮操作 */
|
"taskId": this.taskId,
|
||||||
handleDelete(row) {
|
"fileName": response.data.name,
|
||||||
// console.log(row.id)
|
"fileUrl": response.data.url,
|
||||||
this.$modal
|
"typeId": this.rowData.typeId,
|
||||||
.confirm('是否确认删除所选择的数据项?')
|
"dictCode": this.rowData.dictCode,
|
||||||
.then(() => {
|
"dictLabel": this.rowData.dictLabel,
|
||||||
this.deviceType.forEach((e, index) => {
|
"modelId": this.rowData.typeId,
|
||||||
if (e[3] === row.typeId) {
|
"createBy": ""
|
||||||
this.deviceType.splice(index, 1)
|
}
|
||||||
this.propsKey++
|
console.log(param)
|
||||||
}
|
uploadPurchaseFile(param).then((response) => {
|
||||||
})
|
this.$modal.msgSuccess('上传成功')
|
||||||
this.equipmentList.forEach((item, index) => {
|
this.getFileData()
|
||||||
if (item.id == row.id) {
|
}).catch(() => {
|
||||||
this.equipmentList.splice(index, 1)
|
this.$modal.msgError('上传失败')
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.catch(() => {})
|
|
||||||
|
|
||||||
// const roleIds = row.roleId || this.ids;
|
|
||||||
// this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
|
|
||||||
// return delRole(roleIds);
|
|
||||||
// }).then(() => {
|
|
||||||
// this.getList();
|
|
||||||
// this.$modal.msgSuccess("删除成功");
|
|
||||||
// }).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
// this.download('system/role/export', {
|
|
||||||
// ...this.queryParams
|
|
||||||
// }, `role_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
|
||||||
productionTimeChange(val){
|
|
||||||
this.equipmentList.forEach(item=>{
|
|
||||||
item.productionTime=val
|
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deviceTypeChange(val) {
|
//图片查看
|
||||||
const deviceTypeList =
|
picturePreview(file) {
|
||||||
this.$refs.deviceTypeCascader.getCheckedNodes()
|
this.dialogImageUrl = file.fileUrl;
|
||||||
let tempList = []
|
const parts = file.fileName.split('.');
|
||||||
if (val.length > 0) {
|
const extension = parts.pop();
|
||||||
const items = val.map((e) => {
|
if(extension === 'doc'||extension === 'docx'||extension === 'pdf'){
|
||||||
return e[3]
|
const windowName = file.fileName;
|
||||||
})
|
window.open(file.fileUrl,windowName)
|
||||||
for (let i of items) {
|
}else{
|
||||||
for (let z of deviceTypeList) {
|
this.dialogVisible = true
|
||||||
if (z.data.typeId === i) {
|
}
|
||||||
const obj = JSON.parse(JSON.stringify(z.data))
|
},
|
||||||
obj.supplierId = ''
|
//树结构数据获取父
|
||||||
obj.createTime = null
|
getParentsById(list, id) {
|
||||||
obj.productionTime = ''
|
for (let i in list) {
|
||||||
obj.purchaseTaxPrice = 0
|
if (list[i].typeId == id) {
|
||||||
obj.purchaseTaxPrice = 0
|
//查询到就返回该数组对象的value
|
||||||
obj.purchaseNum = 1
|
return [list[i].typeId]
|
||||||
tempList.push(obj)
|
}
|
||||||
break
|
if (list[i].children) {
|
||||||
}
|
let node = this.getParentsById(list[i].children, id)
|
||||||
|
if (node !== undefined) {
|
||||||
|
//查询到把父节把父节点加到数组前面
|
||||||
|
node.unshift(list[i].typeId)
|
||||||
|
return node
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const newDataListNew = [...this.equipmentList, ...tempList]
|
|
||||||
const map = new Map()
|
|
||||||
for (let item of newDataListNew) {
|
|
||||||
if (!map.has(item.typeId)) {
|
|
||||||
map.set(item.typeId, item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const newArray = [...map.values()]
|
|
||||||
let newArray_array = []
|
|
||||||
items.forEach((e) => {
|
|
||||||
newArray.forEach((j) => {
|
|
||||||
if (e == j.typeId) {
|
|
||||||
newArray_array.push(j)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.equipmentList = newArray_array
|
|
||||||
} else {
|
|
||||||
this.equipmentList = []
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
<el-table-column label="规格型号" align="center" prop="typeName" />
|
<el-table-column label="规格型号" align="center" prop="typeName" />
|
||||||
<el-table-column label="单位" align="center" prop="unitName"/>
|
<el-table-column label="单位" align="center" prop="unitName"/>
|
||||||
<el-table-column label="采购数量" align="center" prop="purchaseNum" />
|
<el-table-column label="采购数量" align="center" prop="purchaseNum" />
|
||||||
<el-table-column label="购置单价(元含税)" align="center" prop="purchasePrice" />
|
<el-table-column label="购置单价(元含税)" align="center" prop="purchaseTaxPrice" />
|
||||||
<el-table-column label="购置单价(元不含税)" align="center" prop="purchasePrice" />
|
<el-table-column label="购置单价(元不含税)" align="center" prop="purchasePrice" />
|
||||||
<el-table-column label="供应商" align="center" prop="supplierName" />
|
<el-table-column label="供应商" align="center" prop="supplierName" />
|
||||||
<el-table-column label="出厂日期" align="center" prop="productionTime" />
|
<el-table-column label="出厂日期" align="center" prop="productionTime" />
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@
|
||||||
<el-table-column label="采购物资" align="center" prop="purchaseMaTypeName" />
|
<el-table-column label="采购物资" align="center" prop="purchaseMaTypeName" />
|
||||||
<el-table-column label="采购数量" align="center" prop="purchaseMaNumber" />
|
<el-table-column label="采购数量" align="center" prop="purchaseMaNumber" />
|
||||||
<el-table-column label="采购价格(元含税)" align="center" prop="purchaseTaxPrice" width="80"/>
|
<el-table-column label="采购价格(元含税)" align="center" prop="purchaseTaxPrice" width="80"/>
|
||||||
<el-table-column label="采购价格(元不含税)" align="center" prop="purchaseNoTaxPrice" width="98"/>
|
<el-table-column label="采购价格(元不含税)" align="center" prop="purchasePrice" width="98"/>
|
||||||
<el-table-column label="税率" align="center" prop="taxRate" />
|
<el-table-column label="税率" align="center" prop="taxRate" />
|
||||||
<el-table-column label="创建人" align="center" prop="createUserName" />
|
<el-table-column label="创建人" align="center" prop="createUserName" />
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue