新购绑定驳回逻辑

This commit is contained in:
zzyuan 2024-12-24 19:31:05 +08:00
parent d60535be2f
commit 8bbe2ed185
2 changed files with 73 additions and 38 deletions

View File

@ -47,6 +47,15 @@ export function rejectBind(data) {
})
}
//编码解绑
export function unBindCodeApi(data) {
return request({
url: '/material/purchase_macode_info/un_bind',
method: 'post',
data: data,
})
}
//二级页面 详情
export function getListDetailById(query) {
return request({

View File

@ -193,25 +193,37 @@
/>
<!-- 编码查看弹框-->
<el-dialog
width="70%"
append-to-body
title="查看编码"
:visible.sync="viewCodeVisible"
>
<el-table border max-height="600px" :data="viewCodeList">
<el-dialog width="70%" append-to-body title="查看编码" :visible.sync="viewCodeVisible">
<el-row :gutter="12" class="mb8">
<el-col :span="8">
<el-form size="small" :model="codeForm" :inline="true" label-width="80px" >
<el-form-item label="关键字" prop="keyWord">
<el-input clearable maxlength="50" style="width: 100%" v-model="codeForm.keyWord" placeholder="请输入关键字" />
</el-form-item>
</el-form>
</el-col>
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="codeQuery">查询</el-button>
</el-col>
<el-col :span="1.5" v-if="!isView">
<el-button type="danger" size="mini" @click="codeUnBind">解绑</el-button>
</el-col>
</el-row>
<el-table border max-height="600px" :data="viewCodeList" row-key="id" @selection-change="codeSelection">
<el-table-column type="selection" width="55" align="center" v-if="!isView" :selectable="selectable"/>
<el-table-column label="序号" align="center" type="index" />
<el-table-column align="center" label="类型名称" prop="maTypeName" />
<el-table-column align="center" label="规格型号" prop="typeName" />
<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="productionTime"
/> -->
<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>
<span v-if="scope.row.status==1">已入库</span>
</template>
</el-table-column>
</el-table>
</el-dialog>
@ -402,7 +414,8 @@ import {
getNewBuyBindListDetailsApi,
getMaCodeInfo,
exportNewBuy,
rejectBind
rejectBind,
unBindCodeApi
} from "@/api/purchase/goodsBind";
import { downloadFile } from '@/utils/download'
import { getToken } from "@/utils/auth";
@ -449,7 +462,9 @@ export default {
millList: [{ label: "测试公司", value: 1 }], //
codeList: [], //
selectList: [], //
viewCodeList: [], //
viewCodeList: [], //
codeForm:{},
unbindIds:[],
codeTableList: [], //
//
queryBindForm: {
@ -563,25 +578,46 @@ export default {
handleSelectionChange(list) {
this.selectList = list;
},
//
//
handleView(row) {
this.codeForm=row
this.viewCodeVisible = true;
getMaCodeInfo({ taskId: row.taskId, typeId: row.typeId }).then(
getMaCodeInfo({ taskId: row.taskId, typeId: row.typeId, keyWord:this.codeForm.keyWord }).then(
(response) => {
this.viewCodeList = response.rows;
this.titleBind = "查看";
this.loadingTwo = false;
this.titleBind = "查看";
}
);
},
//
selectable(row) {
if (row.status == 0) {
return true
} else {
return false
}
},
//
codeSelection(selection){
console.log(selection)
this.unbindIds = selection.map(item => {return item.id})
},
codeUnBind(){
console.log(this.unbindIds)
let param = {
}
unBindCodeApi(this.unbindIds).then((response) => {
this.codeQuery()
});
},
//
codeQuery() {
getMaCodeInfo({ taskId: this.codeForm.taskId, typeId: this.codeForm.typeId, keyWord:this.codeForm.keyWord }).then(
(response) => {
this.viewCodeList = response.rows;
}
);
// 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) {
@ -590,16 +626,6 @@ export default {
this.queryBindForm.typeId = row.typeId;
this.queryBindForm.typeName = row.typeName;
this.queryBindForm.maTypeName = row.maTypeName;
// this.queryBindTwo = {}
// this.resetForm('queryFormBind')
// this.titleTwo = ''
// this.showTwo = true
// this.num = row.checkNum
// this.materialName = row.materialName
// this.materialModel = row.materialModel
// this.productDate = row.productDate
// this.taskIdTemp = row.taskId
// this.typeIdTemp = row.typeId
},
//
handleReject(row) {