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

This commit is contained in:
jjLv 2024-11-19 10:42:55 +08:00
commit 8c5cf9aac4
10 changed files with 159 additions and 38 deletions

View File

@ -17,4 +17,14 @@ export function purchaseWarehouse(data) {
method: 'post', method: 'post',
data: data data: data
}) })
} }
// 查询入库编码列表
export function getMachineById(data) {
return request({
url: '/material/purchase/storage/getMachineById',
method: 'post',
data: data
})
}

View File

@ -124,13 +124,13 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" plain size="mini" @click="handleAdd">退料接收</el-button> <el-button type="primary" icon="el-icon-plus" plain size="mini" @click="handleAdd">退料接收</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain icon="el-icon-refresh" plain icon="el-icon-refresh"
size="mini" size="mini"
>提交</el-button> >提交</el-button>
</el-col> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
icon="el-icon-download" icon="el-icon-download"

View File

@ -307,7 +307,7 @@
<!-- 验收弹窗 --> <!-- 验收弹窗 -->
<el-dialog title="验收" :visible.sync="confirmShow" width="600px" height="300px"> <el-dialog title="验收" :visible.sync="confirmShow" width="600px" height="300px">
<div style="width: 100%; height: 80%; display: flex;margin-bottom: 10px;"> <div style="width: 100%; height: 80%; display: flex;margin-bottom: 10px;">
<div style="width:12%;">验收结论</div> <div style="width:15%;">验收结论</div>
<el-input <el-input
type="textarea" type="textarea"
:rows="3" style="width:80%;" :rows="3" style="width:80%;"

View File

@ -343,8 +343,8 @@
// this.queryParams.taskStatus="2" // this.queryParams.taskStatus="2"
this.queryParams.statusList=[2,12] this.queryParams.statusList=[2,12]
getPurchaseList(this.queryParams).then(response => { getPurchaseList(this.queryParams).then(response => {
this.tableList = response.rows; this.tableList = response.data.rows;
this.total = response.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
}, },

View File

@ -794,7 +794,7 @@ export default {
} }
}) })
this.equipmentList.forEach((item, index) => { this.equipmentList.forEach((item, index) => {
if (item.id == row.id) { if (item.typeId == row.typeId) {
this.equipmentList.splice(index, 1) this.equipmentList.splice(index, 1)
} }
}) })

View File

@ -187,7 +187,12 @@
<span v-if="scope.row.taskStatus==10">未完成</span> <span v-if="scope.row.taskStatus==10">未完成</span>
</template> --> </template> -->
</el-table-column> </el-table-column>
<el-table-column
label="备注"
align="center"
prop="remark"
show-overflow-tooltip
/>
<el-table-column label="操作" align="center" width="250"> <el-table-column label="操作" align="center" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -655,8 +660,8 @@ export default {
statusList: [1], statusList: [1],
}; };
getListNewBuy(this.addDateRange(params)).then((response) => { getListNewBuy(this.addDateRange(params)).then((response) => {
this.typeList = response.rows; this.typeList = response.data.rows;
this.total = response.total; this.total = response.data.total;
this.loading = false; this.loading = false;
}); });
}, },

View File

@ -240,8 +240,8 @@ export default {
this.loading = true this.loading = true
this.queryParams.statusList=[3,13] this.queryParams.statusList=[3,13]
const res = await getNewBuyBindListApi(this.queryParams) const res = await getNewBuyBindListApi(this.queryParams)
this.bindList = res.rows this.bindList = res.data.rows
this.total = res.total this.total = res.data.total
this.loading = false this.loading = false
}, },
// //

View File

@ -65,7 +65,7 @@
</el-col> --> </el-col> -->
</el-row> </el-row>
<el-table v-loading="loading" :data="tableList" ref="multipleTable" row-key="teamId" @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">
@ -79,15 +79,30 @@
<!-- <el-table-column label="供应商" align="center" prop="supplierName" /> --> <!-- <el-table-column label="供应商" align="center" prop="supplierName" /> -->
<el-table-column label="是否未固定资产" align="center" prop="fixCodeStr" :show-overflow-tooltip="true"/> <el-table-column label="是否未固定资产" align="center" prop="fixCodeStr" :show-overflow-tooltip="true"/>
<el-table-column label="出厂日期" align="center" prop="productionTime" :show-overflow-tooltip="true"/> <el-table-column label="出厂日期" align="center" prop="productionTime" :show-overflow-tooltip="true"/>
<el-table-column label="管理模式" align="center" prop="manageType">
<template slot-scope="scope">
<!-- 0编码1数量 -->
<div v-if="scope.row.manageType==0">编码管理</div>
<div v-if="scope.row.manageType==1">数量管理</div>
</template>
</el-table-column>
<el-table-column label="相关配套资料" align="center" prop="" :show-overflow-tooltip="true"> <el-table-column label="相关配套资料" align="center" prop="" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="color: rgb(2, 167, 240);cursor: pointer;" @click="openFileDialog(scope.row)">报告管理</div> <div style="color: rgb(2, 167, 240);cursor: pointer;" @click="openFileDialog(scope.row)">报告管理</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="验收结论" align="center" prop="checkResult" :show-overflow-tooltip="true"/> <el-table-column label="验收结论" align="center" prop="checkResult" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" width="180"> <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"
/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="180" v-if="!isView">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="success" @click="pass(scope.row)"> <el-button size="mini" type="success" @click="pass(scope.row)" v-if="(scope.row.status!=19&&scope.row.manageType==1)||scope.row.manageType==0">
入库 入库
</el-button> </el-button>
<!-- <el-button size="mini" type="danger" @click="reject(scope.row)"> <!-- <el-button size="mini" type="danger" @click="reject(scope.row)">
@ -150,7 +165,39 @@
<img width="100%" height="500px" :src="dialogImageUrl" /> <img width="100%" height="500px" :src="dialogImageUrl" />
</el-dialog> </el-dialog>
<!-- 编码入库 -->
<el-dialog title="编码入库" :visible.sync="openCode" width="1000px" append-to-body>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="codeWarehouse">入库</el-button>
</el-col>
</el-row>
<el-table :data="codeTableData" width="100%" height="450px" row-key="id" @selection-change="codeSelection">
<el-table-column type="selection" width="55" align="center" v-if="!isView"/>
<el-table-column label="序号" type="index" width="55" align="center"/>
<el-table-column label="类型名称" prop="typeName" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ codeRowData.maTypeName }}</span>
</template>
</el-table-column>
<el-table-column label="规格型号" prop="type" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ codeRowData.typeName }}</span>
</template>
</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">
<template slot-scope="scope">
<el-button size="mini" type="warning" @click="openInnerDialog(scope.row)">内部维修</el-button>
<el-button size="mini" type="danger" @click="openScrapDialog(scope.row)">待报废</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div style="width: 100%;height: 50px;display: flex;justify-content: flex-end;align-items: center;">
<el-button type="primary" size="mini" >保存</el-button>
<el-button type="normal" size="mini" @click="openCode=false">取消</el-button>
</div> -->
</el-dialog>
</div> </div>
</template> </template>
@ -158,11 +205,12 @@
import { getDeviceType} from "@/api/ma/device"; import { getDeviceType} from "@/api/ma/device";
import { getManufacturerSelect} from "@/api/ma/supplier"; import { getManufacturerSelect} from "@/api/ma/supplier";
import { getPurchaseDetailsList,getPurchaseFileList,uploadPurchaseFile } from "@/api/purchase/goodsAccept"; import { getPurchaseDetailsList,getPurchaseFileList,uploadPurchaseFile } from "@/api/purchase/goodsAccept";
import { purchaseWarehouse } from "@/api/purchase/goodsEntry"; import { purchaseWarehouse,getMachineById } from "@/api/purchase/goodsEntry";
import { downloadFile } from '@/utils/download' import { downloadFile } from '@/utils/download'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
export default { export default {
name: "GoodsAcceptDetail", name: "GoodsAcceptDetail",
dicts: ["purchase_task_status"],
data() { data() {
return { return {
Id:'', Id:'',
@ -216,6 +264,11 @@ export default {
// //
url: process.env.VUE_APP_BASE_API + '/file/upload' url: process.env.VUE_APP_BASE_API + '/file/upload'
}, },
//
openCode:false,
codeRowData:{},
codeTableData:[],
inPutList:[],
}; };
}, },
mounted() { mounted() {
@ -269,12 +322,13 @@ export default {
this.loading = true; this.loading = true;
this.queryParams.id=this.Id this.queryParams.id=this.Id
this.queryParams.taskId=this.taskId this.queryParams.taskId=this.taskId
this.queryParams.statusList=[4,14,19] this.queryParams.statusList=[3,13,4,14,19]
getPurchaseDetailsList(this.queryParams).then(response => { getPurchaseDetailsList(this.queryParams).then(response => {
this.tableList = response.data.purchaseCheckDetailsList; this.tableList = response.data.purchaseCheckDetailsList;
this.tableList.forEach((item) => { this.tableList.forEach((item) => {
item.fixCodeStr = this.fixCodeList[Number(item.fixCode)] item.fixCodeStr = this.fixCodeList[Number(item.fixCode)]
}) })
console.log(this.tableList)
// this.total = response.total; // this.total = response.total;
this.loading = false; this.loading = false;
}); });
@ -297,25 +351,73 @@ export default {
this.multiple = !selection.length this.multiple = !selection.length
}, },
// //
pass(row) { pass(row) {
let obj = { if(row.manageType==0){//
// taskId: this.taskId, this.codeRowData=row
purchaseId: row.id let param={
}; taskId:this.taskId,
console.log(obj) typeId:this.codeRowData.typeId
purchaseWarehouse(obj).then((res)=>{ }
console.log(res) getMachineById(param).then((res)=>{
if(res.code==200){ this.codeTableData=res.data
this.$modal.msgSuccess('操作成功') this.inPutList=[]
this.getList() this.openCode=true
} })
}) }else{
let obj = {
taskId: this.taskId,
typeId:row.typeId,
purchaseId: row.id
};
this.$modal.confirm('是否确认新购入库该物资类型?')
.then(function() {
console.log(obj)
return purchaseWarehouse(obj)
}).then(() => {
this.$modal.msgSuccess('入库成功')
this.getList()
}).catch(() => {});
}
},
//
codeSelection(selection){
console.log(selection)
this.inPutList = selection.map(item => {return {'maCode':item.maCode}})
},
//
codeWarehouse(){
if(this.inPutList.length>0){
let obj = {
taskId: this.taskId,
typeId:this.codeRowData.typeId,
purchaseId: this.codeRowData.id,
inPutList: this.inPutList
};
console.log(obj)
this.$modal.confirm('是否确认新购入库勾选的编码?')
.then(function() {
return purchaseWarehouse(obj)
}).then(() => {
// let param={
// taskId:this.taskId,
// typeId:this.codeRowData.typeId
// }
// getMachineById(param).then((res)=>{
// this.codeTableData=res.data
// })
this.openCode=false
this.getList()
this.$modal.msgSuccess('入库成功')
}).catch(() => {});
}else{
this.$modal.msgError('请先勾选入库编码!')
}
}, },
// //
reject(row) { reject(row) {
}, },
// //
openFileDialog(row){ openFileDialog(row){
this.rowData=row; this.rowData=row;

View File

@ -60,7 +60,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
@ -70,7 +70,7 @@
> >
入库 入库
</el-button> </el-button>
</el-col> </el-col> -->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -390,11 +390,11 @@ export default {
this.queryParams.startTime = undefined this.queryParams.startTime = undefined
this.queryParams.endTime = undefined this.queryParams.endTime = undefined
} }
this.queryParams.statusList=[4,14,19] this.queryParams.statusList=[3,13,4,14,19]
// this.queryParams.modelName="" // this.queryParams.modelName=""
getPurchaseList(this.queryParams).then((response) => { getPurchaseList(this.queryParams).then((response) => {
this.tableList = response.rows this.tableList = response.data.rows
this.total = response.total this.total = response.data.total
this.loading = false this.loading = false
}) })
}, },

View File

@ -35,7 +35,11 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://192.168.2.72:18080`, // target: `http://localhost:18080`,
target: `http://192.168.2.246:18080`,//马
// target: `http://192.168.0.110:18080`,//洪
// target: `http://192.168.0.234:18080`,//阮
// target: `http://192.168.137.1:18080`,//
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "", ["^" + process.env.VUE_APP_BASE_API]: "",