领料出库细节优化
This commit is contained in:
parent
ad1108ae23
commit
8e2381ce29
|
|
@ -374,7 +374,7 @@
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="待出库数量"
|
label="待出库数量"
|
||||||
align="center"
|
align="center"
|
||||||
prop="roleName"
|
prop="outNum"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
@ -383,37 +383,14 @@
|
||||||
prop="alNum"
|
prop="alNum"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
|
||||||
label="操作"
|
|
||||||
align="center"
|
|
||||||
class-name="small-padding fixed-width"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
@click="codeOut(scope.row)"
|
|
||||||
v-if="scope.row.manageType == 0"
|
|
||||||
>
|
|
||||||
编码出库
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
size="mini"
|
|
||||||
type="primary"
|
|
||||||
v-if="scope.row.manageType == 1"
|
|
||||||
@click="numOut(scope.row)"
|
|
||||||
>
|
|
||||||
数量出库
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- <pagination
|
<pagination
|
||||||
v-show="ViewTotal > 0"
|
v-show="ViewTotal > 0"
|
||||||
:total="ViewTotal"
|
:total="ViewTotal"
|
||||||
:page.sync="queryOutView.pageNum"
|
:page.sync="queryOutView.pageNum"
|
||||||
:limit.sync="queryOutView.pageSize"
|
:limit.sync="queryOutView.pageSize"
|
||||||
@pagination="getListView"
|
@pagination="getListView"
|
||||||
/> -->
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 编码出库 -->
|
<!-- 编码出库 -->
|
||||||
|
|
@ -931,6 +908,14 @@ export default {
|
||||||
this.getDialogList();
|
this.getDialogList();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getListView() {
|
||||||
|
outInfoList(this.queryOutView.id).then((response) => {
|
||||||
|
this.getListOutInfo = response.data.leaseApplyDetailsList;
|
||||||
|
// this.dialogTotal = response.
|
||||||
|
// this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/** 出库查询列表 */
|
/** 出库查询列表 */
|
||||||
getDialogList() {
|
getDialogList() {
|
||||||
outInfoList(this.queryOutInfo.id).then((response) => {
|
outInfoList(this.queryOutInfo.id).then((response) => {
|
||||||
|
|
@ -945,6 +930,11 @@ export default {
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
this.title = "查看";
|
this.title = "查看";
|
||||||
this.showOutView = true;
|
this.showOutView = true;
|
||||||
|
this.queryOutView.id = row.id;
|
||||||
|
outInfoList(row.id).then((response) => {
|
||||||
|
this.getListOutInfo = response.data.leaseApplyDetailsList;
|
||||||
|
// this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 出库按钮操作 */
|
/** 出库按钮操作 */
|
||||||
handleOut(row) {
|
handleOut(row) {
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,7 @@
|
||||||
>
|
>
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button size="mini" icon="el-icon-refresh" @click="resetQuery">
|
||||||
size="mini"
|
|
||||||
icon="el-icon-refresh"
|
|
||||||
@click="resetQuery"
|
|
||||||
>
|
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -81,12 +77,7 @@
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column
|
<el-table-column align="center" label="序号" type="index" width="55" />
|
||||||
align="center"
|
|
||||||
label="序号"
|
|
||||||
type="index"
|
|
||||||
width="55"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
align="center"
|
align="center"
|
||||||
label="物资名称"
|
label="物资名称"
|
||||||
|
|
@ -119,11 +110,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column label="相关配套资料" align="center" prop="checkUrlName">
|
||||||
label="相关配套资料"
|
|
||||||
align="center"
|
|
||||||
prop="checkUrlName"
|
|
||||||
>
|
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
<div @click="openGt(scope.row)" style="color: #02a7f0; cursor: pointer">
|
<div @click="openGt(scope.row)" style="color: #02a7f0; cursor: pointer">
|
||||||
{{ '报告管理' }}
|
{{ '报告管理' }}
|
||||||
|
|
@ -150,12 +137,7 @@
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button plain size="mini" type="warning" @click="handleBind(row)">
|
||||||
plain
|
|
||||||
size="mini"
|
|
||||||
type="warning"
|
|
||||||
@click="handleBind(row)"
|
|
||||||
>
|
|
||||||
<svg-icon icon-class="bind-icon" />
|
<svg-icon icon-class="bind-icon" />
|
||||||
绑定
|
绑定
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -199,41 +181,13 @@
|
||||||
>
|
>
|
||||||
<el-table border max-height="600px" :data="viewCodeList">
|
<el-table border max-height="600px" :data="viewCodeList">
|
||||||
<el-table-column label="序号" align="center" type="index" />
|
<el-table-column label="序号" align="center" type="index" />
|
||||||
<el-table-column
|
<el-table-column align="center" label="类型名称" prop="materialName" />
|
||||||
align="center"
|
<el-table-column align="center" label="规格型号" prop="materialModel" />
|
||||||
label="类型名称"
|
<el-table-column align="center" prop="maCode" label="设备编码" />
|
||||||
prop="materialName"
|
<el-table-column align="center" label="绑定人员" prop="createBy" />
|
||||||
/>
|
<el-table-column align="center" label="绑定时间" prop="createTime" />
|
||||||
<el-table-column
|
<el-table-column align="center" label="出厂编号" prop="outFacCode" />
|
||||||
align="center"
|
<el-table-column align="center" label="出厂时间" prop="productDate" />
|
||||||
label="规格型号"
|
|
||||||
prop="materialModel"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
prop="maCode"
|
|
||||||
label="设备编码"
|
|
||||||
/>
|
|
||||||
<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="productDate"
|
|
||||||
/>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
@ -278,10 +232,7 @@
|
||||||
<el-button type="primary" size="mini" @click="handleAdd"
|
<el-button type="primary" size="mini" @click="handleAdd"
|
||||||
>填充</el-button
|
>填充</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button type="primary" size="mini" @click="handleCodeBinding"
|
||||||
type="primary"
|
|
||||||
size="mini"
|
|
||||||
@click="handleCodeBinding"
|
|
||||||
>绑定</el-button
|
>绑定</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -296,23 +247,11 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table border max-height="600px" :data="codeTableList">
|
<el-table border max-height="600px" :data="codeTableList">
|
||||||
<el-table-column align="center" label="序号" type="index" />
|
<el-table-column align="center" label="序号" type="index" />
|
||||||
<el-table-column
|
<el-table-column align="center" label="设备名称" prop="materialName" />
|
||||||
align="center"
|
<el-table-column align="center" label="规格型号" prop="materialModel" />
|
||||||
label="设备名称"
|
|
||||||
prop="materialName"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
label="规格型号"
|
|
||||||
prop="materialModel"
|
|
||||||
/>
|
|
||||||
<el-table-column align="center" label="设备编码">
|
<el-table-column align="center" label="设备编码">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-input
|
<el-input clearable v-model="row.maCode" placeholder="请填写编码" />
|
||||||
clearable
|
|
||||||
v-model="row.maCode"
|
|
||||||
placeholder="请填写编码"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="出厂编号">
|
<el-table-column align="center" label="出厂编号">
|
||||||
|
|
@ -355,21 +294,21 @@ import {
|
||||||
bindAllData,
|
bindAllData,
|
||||||
getListDetailById,
|
getListDetailById,
|
||||||
getNewBuyBindListDetailsApi,
|
getNewBuyBindListDetailsApi,
|
||||||
} from '@/api/purchase/goodsBind'
|
} from "@/api/purchase/goodsBind";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'BindTools',
|
name: "BindTools",
|
||||||
dicts: ['purchase_task_status'],
|
dicts: ["purchase_task_status"],
|
||||||
props: {
|
props: {
|
||||||
// 查询参数 taskId
|
// 查询参数 taskId
|
||||||
queryTaskId: {
|
queryTaskId: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: () => '',
|
default: () => "",
|
||||||
},
|
},
|
||||||
// 查询参数 id
|
// 查询参数 id
|
||||||
queryId: {
|
queryId: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: () => '',
|
default: () => "",
|
||||||
},
|
},
|
||||||
// 页面展示类型 1. 查看 2. 编码
|
// 页面展示类型 1. 查看 2. 编码
|
||||||
queryType: {
|
queryType: {
|
||||||
|
|
@ -385,46 +324,46 @@ export default {
|
||||||
showSearch: true, // 显示搜索条件
|
showSearch: true, // 显示搜索条件
|
||||||
viewCodeVisible: false, // 查看弹框
|
viewCodeVisible: false, // 查看弹框
|
||||||
bindCodeVisible: false, // 绑定弹框
|
bindCodeVisible: false, // 绑定弹框
|
||||||
millList: [{ label: '测试公司', value: 1 }], // 厂家列表
|
millList: [{ label: "测试公司", value: 1 }], // 厂家列表
|
||||||
codeList: [], // 列表
|
codeList: [], // 列表
|
||||||
selectList: [], // 列表复选框选中数据
|
selectList: [], // 列表复选框选中数据
|
||||||
viewCodeList: [], // 查看列表
|
viewCodeList: [], // 查看列表
|
||||||
codeTableList: [], // 填充列表
|
codeTableList: [], // 填充列表
|
||||||
// 编码绑定表单数据源
|
// 编码绑定表单数据源
|
||||||
queryBindForm: {
|
queryBindForm: {
|
||||||
typeId: '', // 物资typeId
|
typeId: "", // 物资typeId
|
||||||
typeName: '', // 规格型号
|
typeName: "", // 规格型号
|
||||||
codePrefix: '', // 编码前缀
|
codePrefix: "", // 编码前缀
|
||||||
maTypeName: '', // 物资名称
|
maTypeName: "", // 物资名称
|
||||||
codeSuffixEnd: '', // 后缀结束
|
codeSuffixEnd: "", // 后缀结束
|
||||||
codeSuffixStart: '', // 后缀开始
|
codeSuffixStart: "", // 后缀开始
|
||||||
},
|
},
|
||||||
// 编码校验规则
|
// 编码校验规则
|
||||||
queryBindFormRules: {
|
queryBindFormRules: {
|
||||||
codePrefix: [
|
codePrefix: [
|
||||||
{ required: true, message: '请输入前缀', trigger: 'blur' },
|
{ required: true, message: "请输入前缀", trigger: "blur" },
|
||||||
],
|
],
|
||||||
codeSuffixStart: [
|
codeSuffixStart: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
trigger: 'blur',
|
trigger: "blur",
|
||||||
message: '请输入前缀',
|
message: "请输入前缀",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pattern: /^[1-9][0-9]*$/,
|
pattern: /^[1-9][0-9]*$/,
|
||||||
message: '请输入大于0且不能以0开头的正整数',
|
message: "请输入大于0且不能以0开头的正整数",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
codeSuffixEnd: [
|
codeSuffixEnd: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
trigger: 'blur',
|
trigger: "blur",
|
||||||
message: '请输入后缀',
|
message: "请输入后缀",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
pattern: /^[1-9][0-9]*$/,
|
pattern: /^[1-9][0-9]*$/,
|
||||||
message: '请输入大于0且不能以0开头的正整数',
|
message: "请输入大于0且不能以0开头的正整数",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -432,56 +371,56 @@ export default {
|
||||||
maForm: {
|
maForm: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
taskId: '',
|
taskId: "",
|
||||||
keyWord: '',
|
keyWord: "",
|
||||||
productDate: '',
|
productDate: "",
|
||||||
taskStatus: 3,
|
taskStatus: 3,
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// 绑定按钮事件添加防抖 防止重复编码
|
// 绑定按钮事件添加防抖 防止重复编码
|
||||||
this.handleCodeBinding = this.debounce(this.handleCodeBinding, 1000)
|
this.handleCodeBinding = this.debounce(this.handleCodeBinding, 1000);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getCodeList()
|
this.getCodeList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
async getCodeList() {
|
async getCodeList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
this.maForm.taskId = this.queryTaskId
|
this.maForm.taskId = this.queryTaskId;
|
||||||
this.maForm.id = this.queryId
|
this.maForm.id = this.queryId;
|
||||||
this.maForm.statusList=[3,13]
|
this.maForm.statusList = [3, 13];
|
||||||
const { data: res } = await getNewBuyBindListDetailsApi(this.maForm)
|
const { data: res } = await getNewBuyBindListDetailsApi(this.maForm);
|
||||||
this.loading = false
|
this.loading = false;
|
||||||
// this.total = res.total
|
// this.total = res.total
|
||||||
this.codeList = res.purchaseCheckDetailsList
|
this.codeList = res.purchaseCheckDetailsList;
|
||||||
this.total = res.purchaseCheckDetailsList.length || 0
|
this.total = res.purchaseCheckDetailsList.length || 0;
|
||||||
},
|
},
|
||||||
// 搜索
|
// 搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.getCodeList()
|
this.getCodeList();
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm('maFormRef')
|
this.resetForm("maFormRef");
|
||||||
this.getCodeList()
|
this.getCodeList();
|
||||||
},
|
},
|
||||||
// 驳回 (批量)
|
// 驳回 (批量)
|
||||||
handleBackAll() {
|
handleBackAll() {
|
||||||
if (this.selectList.length < 1) {
|
if (this.selectList.length < 1) {
|
||||||
this.$modal.msgError('请勾选数据!')
|
this.$modal.msgError("请勾选数据!");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 列表复选框事件
|
// 列表复选框事件
|
||||||
handleSelectionChange(list) {
|
handleSelectionChange(list) {
|
||||||
this.selectList = list
|
this.selectList = list;
|
||||||
},
|
},
|
||||||
// 查看
|
// 查看
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
this.viewCodeVisible = true
|
this.viewCodeVisible = true;
|
||||||
// this.loadingTwo = true
|
// this.loadingTwo = true
|
||||||
// getListDetailById({ taskId: row.taskId, typeId: row.typeId }).then(
|
// getListDetailById({ taskId: row.taskId, typeId: row.typeId }).then(
|
||||||
// (response) => {
|
// (response) => {
|
||||||
|
|
@ -494,11 +433,11 @@ export default {
|
||||||
},
|
},
|
||||||
// 绑定
|
// 绑定
|
||||||
handleBind(row) {
|
handleBind(row) {
|
||||||
this.bindCodeVisible = true
|
this.bindCodeVisible = true;
|
||||||
this.waitBindNum = row.purchaseNum
|
this.waitBindNum = row.purchaseNum;
|
||||||
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.queryBindTwo = {}
|
||||||
// this.resetForm('queryFormBind')
|
// this.resetForm('queryFormBind')
|
||||||
// this.titleTwo = '绑定'
|
// this.titleTwo = '绑定'
|
||||||
|
|
@ -512,17 +451,17 @@ export default {
|
||||||
},
|
},
|
||||||
// 驳回
|
// 驳回
|
||||||
handleReject(row) {
|
handleReject(row) {
|
||||||
this.$confirm('是否确定驳回', '提示', {
|
this.$confirm("是否确定驳回", "提示", {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: "取消",
|
||||||
type: 'warning',
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {})
|
.then(() => {})
|
||||||
.catch(() => {})
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
onDownloadQr() {
|
onDownloadQr() {
|
||||||
console.log('二维码下载')
|
console.log("二维码下载");
|
||||||
},
|
},
|
||||||
// 填充
|
// 填充
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
|
@ -536,84 +475,80 @@ export default {
|
||||||
maTypeName,
|
maTypeName,
|
||||||
codeSuffixEnd,
|
codeSuffixEnd,
|
||||||
codeSuffixStart,
|
codeSuffixStart,
|
||||||
} = this.queryBindForm
|
} = this.queryBindForm;
|
||||||
if (parseInt(codeSuffixEnd) < parseInt(codeSuffixStart)) {
|
if (parseInt(codeSuffixEnd) < parseInt(codeSuffixStart)) {
|
||||||
this.$modal.msgError('结束值不可小于开始值')
|
this.$modal.msgError("结束值不可小于开始值");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
// 1.2 判断可编码数量
|
// 1.2 判断可编码数量
|
||||||
let waitCodeNum = this.waitBindNum // 待编码数量
|
let waitCodeNum = this.waitBindNum; // 待编码数量
|
||||||
// 可编码数量 如相减大于代编码数量 则取待编码数量 如小于待编码数量 则取相减后值
|
// 可编码数量 如相减大于代编码数量 则取待编码数量 如小于待编码数量 则取相减后值
|
||||||
let passCodeNUm =
|
let passCodeNUm =
|
||||||
codeSuffixEnd - codeSuffixStart > waitCodeNum
|
codeSuffixEnd - codeSuffixStart + 1 > waitCodeNum
|
||||||
? waitCodeNum
|
? waitCodeNum
|
||||||
: codeSuffixEnd - codeSuffixStart
|
: codeSuffixEnd - codeSuffixStart + 1;
|
||||||
|
|
||||||
this.codeTableList = []
|
this.codeTableList = [];
|
||||||
// 1.3 循环生成编码
|
// 1.3 循环生成编码
|
||||||
for (let i = 0; i < passCodeNUm; i++) {
|
for (let i = 0; i < passCodeNUm; i++) {
|
||||||
const codeItem = {
|
const codeItem = {
|
||||||
typeName,
|
typeName,
|
||||||
maTypeName,
|
maTypeName,
|
||||||
outFacCode: '',
|
outFacCode: "",
|
||||||
productDate: '',
|
productDate: "",
|
||||||
maCode: `${codePrefix}${
|
maCode: `${codePrefix}${parseInt(codeSuffixStart) + i}`,
|
||||||
parseInt(codeSuffixStart) + i
|
};
|
||||||
}`,
|
this.codeTableList.push(codeItem);
|
||||||
}
|
|
||||||
this.codeTableList.push(codeItem)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 绑定
|
// 绑定
|
||||||
async handleCodeBinding() {
|
async handleCodeBinding() {
|
||||||
if (this.codeTableList.length < 1) {
|
if (this.codeTableList.length < 1) {
|
||||||
this.$modal.msgError('请填充编码')
|
this.$modal.msgError("请填充编码");
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let isCodePass = false
|
let isCodePass = false;
|
||||||
try {
|
try {
|
||||||
this.codeTableList.forEach((e, index) => {
|
this.codeTableList.forEach((e, index) => {
|
||||||
if (!e.maCode) {
|
if (!e.maCode) {
|
||||||
this.$modal.msgError(
|
this.$modal.msgError(`序号为${index + 1}的编码为空,请填写`);
|
||||||
`序号为${index + 1}的编码为空,请填写`,
|
isCodePass = true;
|
||||||
)
|
throw new Error();
|
||||||
isCodePass = true
|
|
||||||
throw new Error()
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
|
|
||||||
if (isCodePass) return
|
if (isCodePass) return;
|
||||||
// 调后台接口
|
// 调后台接口
|
||||||
const res = await bindAllData({
|
const res = await bindAllData({
|
||||||
taskId: this.queryTaskId,
|
taskId: this.queryTaskId,
|
||||||
dtoList: this.codeTableList,
|
dtoList: this.codeTableList,
|
||||||
typeId: this.queryBindForm.typeId,
|
typeId: this.queryBindForm.typeId,
|
||||||
})
|
});
|
||||||
|
|
||||||
console.log(res, '编码结果--')
|
console.log(res, "编码结果--");
|
||||||
},
|
},
|
||||||
// 移除
|
// 移除
|
||||||
handleRemove(index) {
|
handleRemove(index) {
|
||||||
this.codeTableList.splice(index, 1)
|
this.codeTableList.splice(index, 1);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 防抖函数
|
// 防抖函数
|
||||||
debounce(fn, delay) {
|
debounce(fn, delay) {
|
||||||
let timer = null
|
let timer = null;
|
||||||
return (...args) => {
|
return (...args) => {
|
||||||
if (timer) {
|
if (timer) {
|
||||||
clearTimeout(timer)
|
clearTimeout(timer);
|
||||||
}
|
}
|
||||||
// 设置新的定时器,延迟执行函数
|
// 设置新的定时器,延迟执行函数
|
||||||
timer = setTimeout(() => {
|
timer = setTimeout(() => {
|
||||||
fn.apply(...args)
|
fn.apply(...args);
|
||||||
}, delay)
|
}, delay);
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue