This commit is contained in:
parent
fa474c8a07
commit
6a07f5e5ac
File diff suppressed because it is too large
Load Diff
|
|
@ -179,7 +179,7 @@
|
|||
prop=""
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<div style="color: #02A7F0;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==0">报告管理</div>
|
||||
<div style="color: red;cursor: pointer;" @click="openFileDialog(scope.row)" v-if="scope.row.isExitFile==1">报告管理</div>
|
||||
</template>
|
||||
|
|
@ -279,7 +279,7 @@
|
|||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
|
||||
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url" style="margin-left: 10px;">
|
||||
查看
|
||||
</el-button>
|
||||
|
|
@ -312,8 +312,8 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDeviceType } from "@/api/ma/device";
|
||||
import { getManufacturerSelect } from "@/api/ma/supplier";
|
||||
|
|
@ -446,7 +446,7 @@ export default {
|
|||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.id = this.Id;
|
||||
this.queryParams.taskId = this.taskId;
|
||||
this.queryParams.taskId = this.taskId;
|
||||
this.queryParams.taskStage = 2;
|
||||
this.queryParams.statusList = [2, 12];
|
||||
getPurchaseDetailsList(this.queryParams).then((response) => {
|
||||
|
|
@ -551,7 +551,7 @@ export default {
|
|||
let param = {
|
||||
purchaseCheckDetailsList:this.checkList,
|
||||
verifyPass:this.verifyPass
|
||||
}
|
||||
}
|
||||
console.log(param);
|
||||
acceptInnerVerifyer(param).then((response) => {
|
||||
if (response.code == 200) {
|
||||
|
|
@ -668,4 +668,4 @@ export default {
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
<template>
|
||||
<!-- 新增工机具 -->
|
||||
<div>
|
||||
<el-form :model="maForm" ref="maForm" size="small" :rules="rules" :inline="true" label-width="120px">
|
||||
<el-form
|
||||
:model="maForm"
|
||||
ref="maForm"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
:inline="true"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item label="到货日期" prop="arrivalTime">
|
||||
<el-date-picker
|
||||
v-model="maForm.arrivalTime"
|
||||
|
|
@ -12,7 +19,13 @@
|
|||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="物资厂家" prop="supplierId">
|
||||
<el-select v-model="maForm.supplierId" placeholder="物资厂家" clearable filterable style="width: 240px">
|
||||
<el-select
|
||||
v-model="maForm.supplierId"
|
||||
placeholder="物资厂家"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierList"
|
||||
:key="item.supplierId"
|
||||
|
|
@ -28,7 +41,7 @@
|
|||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="请选择出厂日期"
|
||||
@change="productionTimeChange"
|
||||
@change="productionTimeChange"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="税率" prop="taxRate">
|
||||
|
|
@ -125,29 +138,44 @@
|
|||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleSave">保存</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleSave" >保存</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-if="isEdit">
|
||||
导出
|
||||
</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-if="isEdit">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="equipmentList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column align="center" label="序号" type="index" width="55" />
|
||||
<el-table-column align="center" label="物资名称" prop="maTypeName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" label="规格型号" prop="typeName" show-overflow-tooltip />
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="55"
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="物资名称"
|
||||
prop="maTypeName"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="规格型号"
|
||||
prop="typeName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column align="center" label="单位" prop="unitName" />
|
||||
<el-table-column label="采购数量" prop="purchaseNum" align="center">
|
||||
<template v-slot="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.purchaseNum"
|
||||
controls-position="right"
|
||||
type="number"
|
||||
style="width: 100%"
|
||||
:disabled="scope.row.status != 1 && scope.row.status != 12"
|
||||
controls-position="right" type="number"
|
||||
style="width: 100%" :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||
:min="0"
|
||||
@input="
|
||||
v =>
|
||||
|
|
@ -158,81 +186,91 @@
|
|||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="购置单价(元含税)" prop="purchaseTaxPrice" align="center" width="200">
|
||||
<el-table-column
|
||||
label="购置单价(元含税)"
|
||||
prop="purchaseTaxPrice"
|
||||
align="center" width="200"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.purchaseTaxPrice"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
@blur="
|
||||
scope.row.purchaseTaxPrice = scope.row.purchaseTaxPrice > 0 ? scope.row.purchaseTaxPrice : 0
|
||||
"
|
||||
:min="0"
|
||||
:step="1"
|
||||
:disabled="scope.row.status != 1 && scope.row.status != 12"
|
||||
@change="purchaseTaxPriceChange(scope.row, scope.$index)"
|
||||
style="width: 100%" @blur="scope.row.purchaseTaxPrice = scope.row.purchaseTaxPrice>0? scope.row.purchaseTaxPrice:0"
|
||||
:min="0" :step="1" :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||
@change="purchaseTaxPriceChange(scope.row,scope.$index)"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="购置单价(元不含税)" prop="purchasePrice" align="center" width="200">
|
||||
<el-table-column
|
||||
label="购置单价(元不含税)"
|
||||
prop="purchasePrice"
|
||||
align="center" width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.purchasePrice"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
:min="0"
|
||||
:step="1"
|
||||
disabled
|
||||
@input="purchasePriceChange(scope.row, scope.$index)"
|
||||
:min="0" :step="1" disabled
|
||||
@input="purchasePriceChange(scope.row,scope.$index)"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="租赁价(元/天)" prop="rentPrice" align="center" width="200">
|
||||
<el-table-column label="租赁价(元/天)" prop="rentPrice"
|
||||
align="center" width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.rentPrice"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
@blur="
|
||||
scope.row.rentPrice = scope.row.rentPrice > 0 ? Number(scope.row.rentPrice.toFixed(2)) : 0
|
||||
"
|
||||
:min="0"
|
||||
:step="1"
|
||||
:disabled="(scope.row.status != 1 && scope.row.status != 12) || scope.row.rentPriceDisabled"
|
||||
style="width: 100%" @blur="scope.row.rentPrice = scope.row.rentPrice>0? Number(scope.row.rentPrice.toFixed(2)) :0"
|
||||
:min="0" :step="1" :disabled="(scope.row.status!=1&&scope.row.status!=12)||scope.row.rentPriceDisabled"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否为固定资产" prop="fixCode" align="center" width="120">
|
||||
<el-table-column
|
||||
label="是否为固定资产"
|
||||
prop="fixCode"
|
||||
align="center"
|
||||
width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.fixCode"
|
||||
placeholder="固定资产"
|
||||
filterable
|
||||
:disabled="scope.row.status != 1 && scope.row.status != 12"
|
||||
filterable :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||
clearable
|
||||
>
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="0"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="出厂日期" align="center" prop="productionTime" width="200">
|
||||
<el-table-column
|
||||
label="出厂日期"
|
||||
align="center"
|
||||
prop="productionTime"
|
||||
width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.productionTime"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
:disabled="scope.row.status != 1 && scope.row.status != 12"
|
||||
type="date" :disabled="scope.row.status!=1&&scope.row.status!=12"
|
||||
placeholder="出厂日期"
|
||||
clearable
|
||||
></el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="相关配套资料" align="center" width="120" prop="bmFileInfos">
|
||||
<template slot-scope="scope">
|
||||
<el-table-column
|
||||
label="相关配套资料"
|
||||
align="center" width="120"
|
||||
prop="bmFileInfos"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
style="color: #02a7f0; cursor: pointer"
|
||||
@click="openFileDialog(scope.row)"
|
||||
|
|
@ -247,11 +285,11 @@
|
|||
>
|
||||
报告管理
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.purchase_task_status" :value="scope.row.status" />
|
||||
<dict-tag :options="dict.type.purchase_task_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
|
@ -265,8 +303,7 @@
|
|||
<template slot-scope="scope" v-if="scope.row.roleId !== 1">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == 1 || scope.row.status == 12"
|
||||
type="text" v-if="scope.row.status==1||scope.row.status==12"
|
||||
icon="el-icon-delete"
|
||||
style="color: red"
|
||||
@click="handleDelete(scope.row)"
|
||||
|
|
@ -277,38 +314,37 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-table :data="fileDataList" width="100%" height="350px">
|
||||
<el-table-column label="序号" type="index" width="55" align="center" />
|
||||
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="序号" type="index" width="55" align="center"/>
|
||||
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="文件名称" align="center" prop="name" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="类型名称" align="center" :show-overflow-tooltip="true">
|
||||
<template>
|
||||
<div>{{ this.rowData.maTypeName }}</div>
|
||||
</template>
|
||||
<template>
|
||||
<div>{{this.rowData.maTypeName}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" align="center" :show-overflow-tooltip="true">
|
||||
<template>
|
||||
<div>{{ this.rowData.typeName }}</div>
|
||||
</template>
|
||||
<template>
|
||||
<div>{{this.rowData.typeName}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="报告日期" align="center" prop="orgName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="截止有效期" align="center" prop="orgName" :show-overflow-tooltip="true"/> -->
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between">
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="3"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url"
|
||||
:show-file-list="false"
|
||||
accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="true"
|
||||
>
|
||||
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">上传</el-button>
|
||||
</el-upload>
|
||||
<el-upload ref="upload" :limit="3" :headers="upload.headers"
|
||||
:action="upload.url" :show-file-list="false" accept=".png, .jpg, .jpeg, .pdf, .doc, .docx"
|
||||
:on-success="handleFileSuccess" :auto-upload="true"
|
||||
>
|
||||
<el-button size="mini" type="text" @click="beforeFileUpload(scope.row)">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
@ -317,19 +353,23 @@
|
|||
v-if="scope.row.url"
|
||||
style="margin-left: 20px"
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
查看
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 图片查看弹窗 -->
|
||||
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px">
|
||||
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px" >
|
||||
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
@ -398,7 +438,7 @@ export default {
|
|||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData: {},
|
||||
rowData:{},
|
||||
fileDataList: [
|
||||
{ dictLabel: '合格证', fileType: '0', name: '', url: '' },
|
||||
{ dictLabel: '型式试验报告', fileType: '1', name: '', url: '' },
|
||||
|
|
@ -422,7 +462,7 @@ export default {
|
|||
productionTime: ''
|
||||
},
|
||||
maForm: {
|
||||
taxRate: 13,
|
||||
taxRate:13,
|
||||
arrivalTime: '',
|
||||
purchaser: '',
|
||||
remark: '',
|
||||
|
|
@ -498,7 +538,7 @@ export default {
|
|||
watch: {},
|
||||
mounted() {
|
||||
if (this.isEdit) {
|
||||
console.log('isEdit', this.isEdit)
|
||||
console.log('isEdit',this.isEdit)
|
||||
this.taskId = this.editTaskId
|
||||
this.id = this.editId
|
||||
this.getTaskInfo()
|
||||
|
|
@ -508,23 +548,21 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
// 税率
|
||||
taxRateChange(val) {
|
||||
this.maForm.taxRate = val.replace(/[^\d.]/g, '')
|
||||
this.equipmentList.forEach(item => {
|
||||
if (item.status == 1 || item.status == 12) {
|
||||
item.purchasePrice = ((item.purchaseTaxPrice / (100 + Number(this.maForm.taxRate))) * 100).toFixed(
|
||||
10
|
||||
)
|
||||
taxRateChange(val){
|
||||
this.maForm.taxRate = val.replace(/[^\d.]/g,'')
|
||||
this.equipmentList.forEach(item=>{
|
||||
if(item.status==1||item.status==12){
|
||||
item.purchasePrice = ((item.purchaseTaxPrice/(100 + Number(this.maForm.taxRate)))*100).toFixed(10)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 含税单价
|
||||
purchaseTaxPriceChange(row, val) {
|
||||
purchaseTaxPriceChange(row,val){
|
||||
row.purchaseTaxPrice = row.purchaseTaxPrice.toFixed(2)
|
||||
row.purchasePrice = ((row.purchaseTaxPrice / (100 + Number(this.maForm.taxRate))) * 100).toFixed(10)
|
||||
row.purchasePrice = ((row.purchaseTaxPrice/(100 + Number(this.maForm.taxRate)))*100).toFixed(10)
|
||||
},
|
||||
// 不含税单价
|
||||
purchasePriceChange(row, val) {
|
||||
purchasePriceChange(row,val){
|
||||
// row.purchaseTaxPrice = ((row.purchasePrice*(100 + this.maForm.taxRate))/100).toFixed(2)
|
||||
},
|
||||
/** 物资厂家-下拉选 */
|
||||
|
|
@ -532,7 +570,7 @@ export default {
|
|||
let param = {
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
keyWord: undefined
|
||||
keyWord:undefined
|
||||
}
|
||||
getListFacturer(param).then(response => {
|
||||
this.supplierList = response.rows
|
||||
|
|
@ -667,8 +705,8 @@ export default {
|
|||
if (list[i].typeId == id) {
|
||||
console.log(id)
|
||||
console.log(status)
|
||||
if (status != 1 && status != 12) {
|
||||
list[i].disabled = true
|
||||
if(status!=1&&status!=12){
|
||||
list[i].disabled=true
|
||||
}
|
||||
//查询到就返回该数组对象的value
|
||||
return [list[i].typeId]
|
||||
|
|
@ -685,7 +723,8 @@ export default {
|
|||
},
|
||||
//添加机具类型
|
||||
deviceTypeChange(val) {
|
||||
const deviceTypeList = this.$refs.deviceTypeCascader.getCheckedNodes()
|
||||
const deviceTypeList =
|
||||
this.$refs.deviceTypeCascader.getCheckedNodes()
|
||||
let tempList = []
|
||||
if (val.length > 0) {
|
||||
const items = val.map(e => {
|
||||
|
|
@ -703,13 +742,12 @@ export default {
|
|||
obj.purchaseTaxPrice = 0
|
||||
obj.purchaseNum = 1
|
||||
obj.fixCode = '0'
|
||||
obj.status = 1
|
||||
obj.bmFileInfos = []
|
||||
if (obj.rentPrice > 0) {
|
||||
//判断是否有租赁价格:有禁用;无修改;
|
||||
obj.rentPriceDisabled = true
|
||||
} else {
|
||||
obj.rentPriceDisabled = false
|
||||
obj.status=1
|
||||
obj.bmFileInfos=[]
|
||||
if(obj.rentPrice>0){//判断是否有租赁价格:有禁用;无修改;
|
||||
obj.rentPriceDisabled=true
|
||||
}else{
|
||||
obj.rentPriceDisabled=false
|
||||
}
|
||||
tempList.push(obj)
|
||||
break
|
||||
|
|
@ -739,10 +777,10 @@ export default {
|
|||
}
|
||||
},
|
||||
//选择出厂日期
|
||||
productionTimeChange(val) {
|
||||
this.equipmentList.forEach(item => {
|
||||
if (item.status == 1 || item.status == 12) {
|
||||
item.productionTime = val
|
||||
productionTimeChange(val){
|
||||
this.equipmentList.forEach(item=>{
|
||||
if(item.status==1||item.status==12){
|
||||
item.productionTime=val
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
@ -751,23 +789,22 @@ export default {
|
|||
// this.loading = true;
|
||||
await getPurchaseCheckInfo({ taskId: this.taskId, id: this.id, statusList: [1], taskStage: 1 }).then(
|
||||
response => {
|
||||
this.maForm = response.data.purchaseCheckInfo
|
||||
this.maForm.id = response.data.purchaseCheckInfo.id
|
||||
this.maForm.taskId = response.data.purchaseCheckInfo.taskId
|
||||
this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime
|
||||
this.maForm.supplierId = response.data.purchaseCheckInfo.supplierId
|
||||
this.maForm.remark = response.data.purchaseCheckInfo.remark
|
||||
this.maForm.taxRate = response.data.purchaseCheckInfo.taxRate
|
||||
// this.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
// this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
|
||||
this.maForm = response.data.purchaseCheckInfo
|
||||
this.maForm.id = response.data.purchaseCheckInfo.id
|
||||
this.maForm.taskId = response.data.purchaseCheckInfo.taskId
|
||||
this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime
|
||||
this.maForm.supplierId = response.data.purchaseCheckInfo.supplierId
|
||||
this.maForm.remark = response.data.purchaseCheckInfo.remark
|
||||
this.maForm.taxRate = response.data.purchaseCheckInfo.taxRate
|
||||
// this.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
// this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList
|
||||
this.equipmentList.forEach(item => {
|
||||
item.rentPriceDisabled = true
|
||||
})
|
||||
console.log(this.equipmentList)
|
||||
// this.loading = false;
|
||||
}
|
||||
)
|
||||
this.equipmentList.forEach(item=>{
|
||||
item.rentPriceDisabled=true
|
||||
})
|
||||
console.log(this.equipmentList)
|
||||
// this.loading = false;
|
||||
})
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
|
|
@ -781,49 +818,47 @@ export default {
|
|||
this.$refs['maForm'].validate(valid => {
|
||||
if (valid) {
|
||||
this.maForm.taskId = this.taskId
|
||||
let index = this.equipmentList.findIndex(item => item.purchaseNum == 0)
|
||||
let index1 = this.equipmentList.findIndex(item => item.rentPrice == 0)
|
||||
let index2 = this.equipmentList.findIndex(item => item.purchaseTaxPrice == 0)
|
||||
if (index > -1) {
|
||||
let index =this.equipmentList.findIndex(item=>item.purchaseNum==0)
|
||||
let index1 =this.equipmentList.findIndex(item=>item.rentPrice==0)
|
||||
let index2 =this.equipmentList.findIndex(item=>item.purchaseTaxPrice==0)
|
||||
if(index>-1){
|
||||
this.$modal.msgError('采购数量不能为0!')
|
||||
} else if (index1 > -1) {
|
||||
}else if(index1>-1){
|
||||
this.$modal.msgError('租赁价格不能为0!')
|
||||
} else {
|
||||
this.$modal
|
||||
.confirm('是否确认保存当前页面')
|
||||
.then(function () {})
|
||||
.then(() => {
|
||||
if (this.isEdit) {
|
||||
console.log('编辑')
|
||||
this.loading = true
|
||||
}else{
|
||||
this.$modal.confirm('是否确认保存当前页面').then(function () {})
|
||||
.then(() => {
|
||||
if (this.isEdit) {
|
||||
console.log('编辑')
|
||||
this.loading = true
|
||||
updatePurchaseCheckInfo({
|
||||
purchaseCheckDetailsList: this.equipmentList,
|
||||
purchaseCheckInfo: this.maForm
|
||||
}).then(response => {
|
||||
if (response.code == 200) {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('编辑成功')
|
||||
this.$emit('addToolsSuccess')
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
} else if (!this.isEdit) {
|
||||
console.log('新增')
|
||||
// console.log(this.equipmentList)
|
||||
this.loading = true
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
} else if (!this.isEdit) {
|
||||
console.log('新增')
|
||||
// console.log(this.equipmentList)
|
||||
this.loading = true
|
||||
addPurchaseCheckInfo({
|
||||
purchaseCheckDetailsList: this.equipmentList,
|
||||
purchaseCheckInfo: this.maForm
|
||||
}).then(response => {
|
||||
if (response.code == 200) {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.$emit('addToolsSuccess')
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}).catch(() => {})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
|
@ -831,7 +866,7 @@ export default {
|
|||
}
|
||||
},
|
||||
//文件管理
|
||||
openFileDialog(row) {
|
||||
openFileDialog(row){
|
||||
this.rowData = row
|
||||
this.fileDataList = [
|
||||
{ dictLabel: '合格证', fileType: '0', name: '', url: '' },
|
||||
|
|
@ -841,108 +876,105 @@ export default {
|
|||
{ dictLabel: '其他', fileType: '4', name: '', url: '' }
|
||||
]
|
||||
if (this.taskId == '') {
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
if (this.rowData.bmFileInfos.length > 0) {
|
||||
this.rowData.bmFileInfos.forEach(item => {
|
||||
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
|
||||
this.fileDataList[index].name = item.name
|
||||
this.fileDataList[index].url = item.url
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.getFileData()
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
if(this.rowData.bmFileInfos.length>0){
|
||||
this.rowData.bmFileInfos.forEach(item=>{
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType)
|
||||
this.fileDataList[index].name = item.name
|
||||
this.fileDataList[index].url = item.url
|
||||
})
|
||||
}
|
||||
this.open = true
|
||||
}else{
|
||||
this.getFileData()
|
||||
}
|
||||
this.open=true
|
||||
},
|
||||
getFileData() {
|
||||
let param = {
|
||||
modelId: this.rowData.typeId,
|
||||
taskType: 0,
|
||||
taskId: this.rowData.taskId
|
||||
}
|
||||
getFileData(){
|
||||
let param = {
|
||||
modelId:this.rowData.typeId,
|
||||
taskType:0,
|
||||
taskId:this.rowData.taskId
|
||||
}
|
||||
getPurchaseFileList(param)
|
||||
.then(response => {
|
||||
if (response.rows.length > 0) {
|
||||
response.rows.forEach(item => {
|
||||
let index = this.fileDataList.findIndex(v => v.fileType == item.fileType)
|
||||
this.fileDataList[index].name = item.name
|
||||
this.fileDataList[index].url = item.url
|
||||
})
|
||||
}
|
||||
if(response.rows.length>0){
|
||||
response.rows.forEach(item=>{
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==item.fileType)
|
||||
this.fileDataList[index].name = item.name
|
||||
this.fileDataList[index].url = item.url
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
beforeFileUpload(row) {
|
||||
beforeFileUpload(row){
|
||||
this.rowData.fileType = row.fileType
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if (response.code == 200) {
|
||||
if(response.code==200){
|
||||
if (this.taskId == '') {
|
||||
//新增逻辑
|
||||
// console.log(response)
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
let obj = {
|
||||
// console.log(response)
|
||||
// console.log(this.rowData)
|
||||
// console.log(this.rowData.bmFileInfos)
|
||||
let obj = {
|
||||
taskId: this.taskId,
|
||||
taskType: '0',
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(v => v.fileType == this.rowData.fileType)
|
||||
this.fileDataList[index].name = response.data.name
|
||||
this.fileDataList[index].url = response.data.url
|
||||
//判断当前上传的文件是否已上传过-再往机具类型数据中插入
|
||||
if (this.rowData.bmFileInfos.length > 0) {
|
||||
let index2 = this.rowData.bmFileInfos.findIndex(v => v.fileType == this.rowData.fileType)
|
||||
if (index2 > -1) {
|
||||
//相同类型文件重复上传-替换
|
||||
this.rowData.bmFileInfos.splice(index2, 0, obj)
|
||||
} else {
|
||||
//不存在相同类型文件-添加
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
} else {
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==this.rowData.fileType)
|
||||
this.fileDataList[index].name = response.data.name
|
||||
this.fileDataList[index].url = response.data.url
|
||||
//判断当前上传的文件是否已上传过-再往机具类型数据中插入
|
||||
if(this.rowData.bmFileInfos.length>0){
|
||||
let index2 = this.rowData.bmFileInfos.findIndex(v=>v.fileType==this.rowData.fileType)
|
||||
if(index2>-1){//相同类型文件重复上传-替换
|
||||
this.rowData.bmFileInfos.splice(index2,0,obj)
|
||||
}else{//不存在相同类型文件-添加
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
}else{
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
} else {
|
||||
//编辑逻辑
|
||||
let param = {
|
||||
let param = {
|
||||
taskId: this.taskId,
|
||||
taskType: '0',
|
||||
name: response.data.name,
|
||||
url: response.data.url,
|
||||
modelId: this.rowData.typeId,
|
||||
fileType: this.rowData.fileType
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
uploadPurchaseFile(param)
|
||||
.then(response => {
|
||||
this.$modal.msgSuccess('上传成功')
|
||||
this.getFileData()
|
||||
})
|
||||
.catch(() => {
|
||||
this.$modal.msgError('上传失败')
|
||||
})
|
||||
}
|
||||
this.$modal.msgSuccess('上传成功')
|
||||
this.getFileData()
|
||||
}).catch(() => {
|
||||
this.$modal.msgError('上传失败')
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
//图片查看
|
||||
picturePreview(file) {
|
||||
this.dialogImageUrl = file.url
|
||||
const parts = file.name.split('.')
|
||||
const extension = parts.pop()
|
||||
if (extension === 'doc' || extension === 'docx' || extension === 'pdf') {
|
||||
if(extension === 'doc'||extension === 'docx'||extension === 'pdf'){
|
||||
const windowName = file.name
|
||||
window.open(file.url, windowName)
|
||||
} else {
|
||||
this.dialogVisible = true
|
||||
}
|
||||
window.open(file.url,windowName)
|
||||
}else{
|
||||
this.dialogVisible = true
|
||||
}
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
|
|
@ -1038,7 +1070,7 @@ export default {
|
|||
this.scrollToMatch()
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
// 滚动到匹配项
|
||||
scrollToMatch() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
|
||||
<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>
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<el-table
|
||||
v-loading="loading"
|
||||
:data="equipmentList"
|
||||
>
|
||||
>
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column
|
||||
label="物资名称"
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
</el-table>
|
||||
|
||||
|
||||
<el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-table :data="fileDataList" width="100%" height="350px">
|
||||
<el-table-column label="序号" type="index" width="55" align="center"/>
|
||||
<el-table-column label="报告类型" align="center" prop="dictLabel" :show-overflow-tooltip="true"/>
|
||||
|
|
@ -113,13 +113,13 @@
|
|||
上传
|
||||
</el-button>
|
||||
</el-upload> -->
|
||||
|
||||
|
||||
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url">
|
||||
查看
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -129,11 +129,11 @@
|
|||
<el-dialog :visible.sync="dialogVisible" width="500px" height="500px" >
|
||||
<img width="100%" height="500px" :src="dialogImageUrl" />
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
<script>
|
||||
import {
|
||||
getPurchaseCheckInfo
|
||||
} from '@/api/purchase/goodsArrived'
|
||||
|
|
@ -171,11 +171,11 @@ export default {
|
|||
//任务ID
|
||||
taskId: '',
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
loading: true,
|
||||
//任务数据
|
||||
taskInfo: {},
|
||||
// 表格数据
|
||||
equipmentList: [],
|
||||
equipmentList: [],
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
rowData:{},
|
||||
|
|
@ -199,7 +199,7 @@ export default {
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.taskId = this.queryTaskId
|
||||
|
|
@ -226,8 +226,8 @@ export default {
|
|||
{dictLabel:"型式试验报告",fileType:"1",name:"",url:""},
|
||||
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:""},
|
||||
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:""},
|
||||
{dictLabel:"其他",fileType:"4",name:"",url:""}]
|
||||
this.getFileData()
|
||||
{dictLabel:"其他",fileType:"4",name:"",url:""}]
|
||||
this.getFileData()
|
||||
this.open=true
|
||||
},
|
||||
getFileData(){
|
||||
|
|
@ -248,11 +248,11 @@ export default {
|
|||
})
|
||||
},
|
||||
beforeFileUpload(row){
|
||||
this.rowData.fileType=row.fileType;
|
||||
this.rowData.fileType=row.fileType;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if(response.code==200){
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
if(response.code==200){
|
||||
if(this.taskId==""){//新增逻辑
|
||||
// console.log(response)
|
||||
// console.log(this.rowData)
|
||||
|
|
@ -264,7 +264,7 @@ export default {
|
|||
"url": response.data.url,
|
||||
"modelId": this.rowData.typeId,
|
||||
"fileType": this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
//根据文件上传返回更新文件管理弹窗内容
|
||||
let index = this.fileDataList.findIndex(v=>v.fileType==this.rowData.fileType)
|
||||
|
|
@ -281,7 +281,7 @@ export default {
|
|||
}else{
|
||||
this.rowData.bmFileInfos.push(obj)
|
||||
}
|
||||
|
||||
|
||||
}else{//编辑逻辑
|
||||
let param = {
|
||||
"taskId": this.taskId,
|
||||
|
|
@ -290,7 +290,7 @@ export default {
|
|||
"url": response.data.url,
|
||||
"modelId": this.rowData.typeId,
|
||||
"fileType": this.rowData.fileType,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
// "dictLabel": this.rowData.dictLabel,
|
||||
}
|
||||
uploadPurchaseFile(param).then((response) => {
|
||||
this.$modal.msgSuccess('上传成功')
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@
|
|||
<el-table-column align="center" label="设备编码" prop="maCode" />
|
||||
<el-table-column align="center" label="绑定人员" prop="createBy" />
|
||||
<el-table-column align="center" label="绑定时间" prop="createTime" />
|
||||
<el-table-column align="center" label="出厂编号" prop="outFacCode" />
|
||||
<el-table-column align="center" label="出厂编号" prop="outFacCode" />
|
||||
<el-table-column align="center" label="状态" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status==0">未入库</span>
|
||||
|
|
@ -459,7 +459,7 @@ export default {
|
|||
codeList: [], // 列表
|
||||
selectList: [], // 列表复选框选中数据
|
||||
viewCodeList: [], // 查看编码列表
|
||||
codeForm:{},
|
||||
codeForm:{},
|
||||
unbindIds:[],
|
||||
codeTableList: [], // 填充列表
|
||||
// 编码绑定表单数据源
|
||||
|
|
@ -581,12 +581,12 @@ export default {
|
|||
getMaCodeInfo({ taskId: row.taskId, typeId: row.typeId, keyWord:this.codeForm.keyWord }).then(
|
||||
(response) => {
|
||||
this.viewCodeList = response.rows;
|
||||
this.titleBind = "查看";
|
||||
this.titleBind = "查看";
|
||||
}
|
||||
);
|
||||
},
|
||||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
selectable(row) {
|
||||
if (row.status == 0) {
|
||||
return true
|
||||
} else {
|
||||
|
|
@ -601,17 +601,17 @@ export default {
|
|||
codeUnBind(){
|
||||
console.log(this.unbindIds)
|
||||
let param = {
|
||||
|
||||
|
||||
}
|
||||
unBindCodeApi(this.unbindIds).then((response) => {
|
||||
this.codeQuery()
|
||||
});
|
||||
},
|
||||
// 查询编码
|
||||
codeQuery() {
|
||||
codeQuery() {
|
||||
getMaCodeInfo({ taskId: this.codeForm.taskId, typeId: this.codeForm.typeId, keyWord:this.codeForm.keyWord }).then(
|
||||
(response) => {
|
||||
this.viewCodeList = response.rows;
|
||||
this.viewCodeList = response.rows;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
|
@ -628,7 +628,7 @@ export default {
|
|||
this.$modal
|
||||
.confirm("是否确定驳回?")
|
||||
.then(function () {
|
||||
return rejectBind({"purchaseId":row.id})
|
||||
return rejectBind({"purchaseId":row.id})
|
||||
})
|
||||
.then(() => {
|
||||
this.getCodeList();
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
<el-table-column label="验收数量" align="center" prop="checkNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="已入库数量" align="center" prop="inputNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="待入库" align="center" prop="inputNum" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.checkNum-scope.row.inputNum }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
|||
Loading…
Reference in New Issue