Merge branch 'material-ui' of http://192.168.0.56:3000/bonus/bonus-ui into material-ui

This commit is contained in:
zzyuan 2024-12-12 11:09:55 +08:00
commit 5dc0ce1e7e
1 changed files with 49 additions and 43 deletions

View File

@ -21,16 +21,16 @@
/> />
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<el-form-item label="出厂日期:" prop="productionTime"> <el-form-item label="出厂日期:" prop="productionTime">
<el-date-picker <el-date-picker
v-model="queryParams.productionTime" v-model="queryParams.productionTime"
placeholder="请选择出厂日期" placeholder="请选择出厂日期"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"> type="datetime">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -59,7 +59,7 @@
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
icon="el-icon-check" v-show="!isView" icon="el-icon-check" v-show="!isView"
size="mini" :disabled="multiple" size="mini" :disabled="multiple"
>入库</el-button> >入库</el-button>
@ -67,7 +67,7 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" type="danger"
icon="el-icon-close" v-show="!isView" icon="el-icon-close" v-show="!isView"
size="mini" :disabled="multiple" size="mini" :disabled="multiple"
>驳回</el-button> >驳回</el-button>
@ -77,7 +77,7 @@
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="typeId" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="typeId" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" :reserve-selection="true" v-if="!isView"/> --> <!-- <el-table-column type="selection" width="55" align="center" :reserve-selection="true" v-if="!isView"/> -->
<el-table-column label="序号" align="center" width="80" type="index"> <el-table-column label="序号" align="center" width="80" type="index">
</el-table-column> </el-table-column>
<el-table-column label="物资名称" align="center" prop="maTypeName" :show-overflow-tooltip="true"/> <el-table-column label="物资名称" align="center" prop="maTypeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true"/> <el-table-column label="规格型号" align="center" prop="typeName" :show-overflow-tooltip="true"/>
@ -129,7 +129,7 @@
@pagination="getList" @pagination="getList"
/> --> /> -->
<el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body> <el-dialog title="报告管理" :visible.sync="open" width="900px" append-to-body>
<el-table v-loading="dialogLoading" :data="fileDataList" width="100%" height="350px"> <el-table v-loading="dialogLoading" :data="fileDataList" width="100%" height="350px">
<el-table-column label="序号" type="index" width="55" align="center"/> <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="dictLabel" :show-overflow-tooltip="true"/>
@ -157,13 +157,13 @@
上传 上传
</el-button> </el-button>
</el-upload> </el-upload>
<el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url" style="margin-left: 10px;"> <el-button size="mini" type="text" @click="picturePreview(scope.row)" v-if="scope.row.url" style="margin-left: 10px;">
查看 查看
</el-button> </el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -175,7 +175,7 @@
</el-dialog> </el-dialog>
<!-- 编码入库 --> <!-- 编码入库 -->
<el-dialog title="编码入库" :visible.sync="openCode" width="1000px" append-to-body> <el-dialog title="编码入库" :visible.sync="openCode" width="1000px" append-to-body>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" size="mini" @click="codeWarehouse">入库</el-button> <el-button type="primary" size="mini" @click="codeWarehouse">入库</el-button>
@ -193,11 +193,11 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ codeRowData.typeName }}</span> <span>{{ codeRowData.typeName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备编码" prop="maCode" align="center" :show-overflow-tooltip="true"></el-table-column> <el-table-column label="设备编码" prop="maCode" align="center" :show-overflow-tooltip="true"></el-table-column>
<!-- <el-table-column label="操作" align="center" width="300px"> <!-- <el-table-column label="操作" align="center" width="300px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="warning" @click="openInnerDialog(scope.row)">内部维修</el-button> <el-button size="mini" type="warning" @click="openInnerDialog(scope.row)">内部维修</el-button>
<el-button size="mini" type="danger" @click="openScrapDialog(scope.row)">待报废</el-button> <el-button size="mini" type="danger" @click="openScrapDialog(scope.row)">待报废</el-button>
</template> </template>
</el-table-column> --> </el-table-column> -->
@ -208,7 +208,7 @@
</div> --> </div> -->
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getDeviceType} from "@/api/ma/device"; import { getDeviceType} from "@/api/ma/device";
@ -225,23 +225,23 @@ export default {
Id:'', Id:'',
taskId:'', taskId:'',
// //
loading: false, loading: false,
dialogLoading: false, dialogLoading: false,
isView: false, isView: false,
// //
single: true, single: true,
// //
multiple: true, multiple: true,
// //
showSearch: true, showSearch: true,
showHouse: false, showHouse: false,
materialModelList:[],// materialModelList:[],//
supplierList:[],// supplierList:[],//
ids:[], ids:[],
// //
total: 0, total: 0,
// //
tableList: [], tableList: [],
fixCodeList:["否","是"], fixCodeList:["否","是"],
// //
title: "", title: "",
@ -254,7 +254,7 @@ export default {
{dictLabel:"出厂检测报告",fileType:"2",name:"",url:""}, {dictLabel:"出厂检测报告",fileType:"2",name:"",url:""},
{dictLabel:"第三方监测报告",fileType:"3",name:"",url:""}, {dictLabel:"第三方监测报告",fileType:"3",name:"",url:""},
{dictLabel:"其他报告",fileType:"4",name:"",url:""}, {dictLabel:"其他报告",fileType:"4",name:"",url:""},
], ],
// //
queryParams: { queryParams: {
// pageNum: 1, // pageNum: 1,
@ -281,7 +281,7 @@ export default {
}; };
}, },
mounted() { mounted() {
const taskId = this.$route.query && this.$route.query.taskId const taskId = this.$route.query && this.$route.query.taskId
const Id = this.$route.query && this.$route.query.Id const Id = this.$route.query && this.$route.query.Id
const isView = this.$route.query && this.$route.query.isView const isView = this.$route.query && this.$route.query.isView
@ -294,7 +294,7 @@ export default {
} }
this.getDeviceType() this.getDeviceType()
this.getSupplierList() this.getSupplierList()
console.log(this.isView) console.log(this.isView)
this.getList() this.getList()
}, },
@ -304,7 +304,7 @@ export default {
const obj = { path: '/purchase/goodsEntry' } const obj = { path: '/purchase/goodsEntry' }
this.$tab.closeOpenPage(obj) this.$tab.closeOpenPage(obj)
}, },
getDeviceType(){ getDeviceType(){
getDeviceType({level:4,skipPermission:1}).then(response => { getDeviceType({level:4,skipPermission:1}).then(response => {
let matModelRes = response.data; let matModelRes = response.data;
this.materialModelList = matModelRes.map((item) => { this.materialModelList = matModelRes.map((item) => {
@ -315,7 +315,7 @@ export default {
}); });
}); });
}, },
getSupplierList(){ getSupplierList(){
getManufacturerSelect().then(response => { getManufacturerSelect().then(response => {
let arrRes = response.rows; let arrRes = response.rows;
this.supplierList = arrRes.map((item) => { this.supplierList = arrRes.map((item) => {
@ -352,7 +352,7 @@ export default {
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
@ -372,19 +372,22 @@ export default {
this.inPutList=[] this.inPutList=[]
this.openCode=true this.openCode=true
}) })
}else{ }else{
let obj = { let obj = {
taskId: this.taskId, taskId: this.taskId,
typeId:row.typeId, typeId:row.typeId,
purchaseId: row.id purchaseId: row.id,
typeName: row.maTypeName,
typeModelName: row.typeName,
manageType: row.manageType
}; };
this.$modal.confirm('是否确认新购入库该物资类型?') this.$modal.confirm('是否确认新购入库该物资类型?')
.then(function() { .then(function() {
console.log(obj) console.log(obj)
return purchaseWarehouse(obj) return purchaseWarehouse(obj)
}).then(() => { }).then(() => {
this.$modal.msgSuccess('入库成功') this.$modal.msgSuccess('入库成功')
this.getList() this.getList()
}).catch(() => {}); }).catch(() => {});
} }
}, },
@ -400,13 +403,16 @@ export default {
taskId: this.taskId, taskId: this.taskId,
typeId:this.codeRowData.typeId, typeId:this.codeRowData.typeId,
purchaseId: this.codeRowData.id, purchaseId: this.codeRowData.id,
inPutList: this.inPutList inPutList: this.inPutList,
typeName: this.codeRowData.maTypeName,
typeModelName: this.codeRowData.typeName,
manageType: this.codeRowData.manageType
}; };
console.log(obj) console.log(obj)
this.$modal.confirm('是否确认新购入库勾选的编码?') this.$modal.confirm('是否确认新购入库勾选的编码?')
.then(function() { .then(function() {
return purchaseWarehouse(obj) return purchaseWarehouse(obj)
}).then(() => { }).then(() => {
// let param={ // let param={
// taskId:this.taskId, // taskId:this.taskId,
// typeId:this.codeRowData.typeId // typeId:this.codeRowData.typeId
@ -415,13 +421,13 @@ export default {
// this.codeTableData=res.data // this.codeTableData=res.data
// }) // })
this.openCode=false this.openCode=false
this.getList() this.getList()
this.$modal.msgSuccess('入库成功') this.$modal.msgSuccess('入库成功')
}).catch(() => {}); }).catch(() => {});
}else{ }else{
this.$modal.msgError('请先勾选入库编码!') this.$modal.msgError('请先勾选入库编码!')
} }
}, },
// //
reject(row) { reject(row) {
@ -434,9 +440,9 @@ export default {
.then(function() { .then(function() {
console.log(obj) console.log(obj)
return rejectPurchaseWarehouse(obj) return rejectPurchaseWarehouse(obj)
}).then(() => { }).then(() => {
this.$modal.msgSuccess('驳回成功') this.$modal.msgSuccess('驳回成功')
this.getList() this.getList()
}).catch(() => {}); }).catch(() => {});
}, },
// //
@ -472,8 +478,8 @@ export default {
// this.rowData.dictLabel=row.dictLabel; // this.rowData.dictLabel=row.dictLabel;
}, },
// //
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
if(response.code==200){ if(response.code==200){
let param = { let param = {
"taskId": this.taskId, "taskId": this.taskId,
"taskType": "0", "taskType": "0",
@ -482,7 +488,7 @@ export default {
"modelId": this.rowData.typeId, "modelId": this.rowData.typeId,
"fileType": this.rowData.fileType, "fileType": this.rowData.fileType,
} }
console.log(param) console.log(param)
uploadPurchaseFile(param).then((response) => { uploadPurchaseFile(param).then((response) => {
this.$modal.msgSuccess('上传成功') this.$modal.msgSuccess('上传成功')
this.getFileData() this.getFileData()
@ -537,4 +543,4 @@ export default {
display: none; display: none;
} }
} }
</style> </style>