新购绑定驳回逻辑

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) { export function getListDetailById(query) {
return request({ return request({

View File

@ -193,13 +193,24 @@
/> />
<!-- 编码查看弹框--> <!-- 编码查看弹框-->
<el-dialog <el-dialog width="70%" append-to-body title="查看编码" :visible.sync="viewCodeVisible">
width="70%" <el-row :gutter="12" class="mb8">
append-to-body <el-col :span="8">
title="查看编码" <el-form size="small" :model="codeForm" :inline="true" label-width="80px" >
:visible.sync="viewCodeVisible" <el-form-item label="关键字" prop="keyWord">
> <el-input clearable maxlength="50" style="width: 100%" v-model="codeForm.keyWord" placeholder="请输入关键字" />
<el-table border max-height="600px" :data="viewCodeList"> </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 label="序号" align="center" type="index" />
<el-table-column align="center" label="类型名称" prop="maTypeName" /> <el-table-column align="center" label="类型名称" prop="maTypeName" />
<el-table-column align="center" label="规格型号" prop="typeName" /> <el-table-column align="center" label="规格型号" prop="typeName" />
@ -207,11 +218,12 @@
<el-table-column align="center" label="绑定人员" prop="createBy" /> <el-table-column align="center" label="绑定人员" prop="createBy" />
<el-table-column align="center" label="绑定时间" prop="createTime" /> <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 <el-table-column align="center" label="状态" prop="status">
align="center" <template slot-scope="scope">
label="出厂时间" <span v-if="scope.row.status==0">未入库</span>
prop="productionTime" <span v-if="scope.row.status==1">已入库</span>
/> --> </template>
</el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
@ -402,7 +414,8 @@ import {
getNewBuyBindListDetailsApi, getNewBuyBindListDetailsApi,
getMaCodeInfo, getMaCodeInfo,
exportNewBuy, exportNewBuy,
rejectBind rejectBind,
unBindCodeApi
} from "@/api/purchase/goodsBind"; } from "@/api/purchase/goodsBind";
import { downloadFile } from '@/utils/download' import { downloadFile } from '@/utils/download'
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
@ -449,7 +462,9 @@ export default {
millList: [{ label: "测试公司", value: 1 }], // millList: [{ label: "测试公司", value: 1 }], //
codeList: [], // codeList: [], //
selectList: [], // selectList: [], //
viewCodeList: [], // viewCodeList: [], //
codeForm:{},
unbindIds:[],
codeTableList: [], // codeTableList: [], //
// //
queryBindForm: { queryBindForm: {
@ -563,25 +578,46 @@ export default {
handleSelectionChange(list) { handleSelectionChange(list) {
this.selectList = list; this.selectList = list;
}, },
// //
handleView(row) { handleView(row) {
this.codeForm=row
this.viewCodeVisible = true; this.viewCodeVisible = true;
getMaCodeInfo({ taskId: row.taskId, typeId: row.typeId }).then( getMaCodeInfo({ taskId: row.taskId, typeId: row.typeId, keyWord:this.codeForm.keyWord }).then(
(response) => { (response) => {
this.viewCodeList = response.rows; this.viewCodeList = response.rows;
this.titleBind = "查看"; this.titleBind = "查看";
this.loadingTwo = false;
} }
); );
// this.loadingTwo = true },
// getListDetailById({ taskId: row.taskId, typeId: row.typeId }).then( //
// (response) => { selectable(row) {
// this.getListBind = response.rows if (row.status == 0) {
// this.showBind = true return true
// this.titleBind = '' } else {
// this.loadingTwo = false 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;
}
);
}, },
// //
handleBind(row) { handleBind(row) {
@ -590,16 +626,6 @@ export default {
this.queryBindForm.typeId = row.typeId; this.queryBindForm.typeId = row.typeId;
this.queryBindForm.typeName = row.typeName; this.queryBindForm.typeName = row.typeName;
this.queryBindForm.maTypeName = row.maTypeName; 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) { handleReject(row) {