新购绑定驳回逻辑
This commit is contained in:
parent
d60535be2f
commit
8bbe2ed185
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -193,13 +193,24 @@
|
|||
/>
|
||||
|
||||
<!-- 编码查看弹框-->
|
||||
<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" />
|
||||
|
|
@ -207,11 +218,12 @@
|
|||
<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="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.loadingTwo = true
|
||||
// getListDetailById({ taskId: row.taskId, typeId: row.typeId }).then(
|
||||
// (response) => {
|
||||
// this.getListBind = response.rows
|
||||
// this.showBind = true
|
||||
// this.titleBind = '查看'
|
||||
// this.loadingTwo = false
|
||||
// },
|
||||
// )
|
||||
},
|
||||
//是否可用勾选框
|
||||
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;
|
||||
}
|
||||
);
|
||||
},
|
||||
// 绑定
|
||||
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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue