fix:配件新购入库bug修改

This commit is contained in:
jackal 2024-04-20 13:41:35 +08:00
parent 66f8df4fba
commit 5a88bafd89
3 changed files with 939 additions and 1041 deletions

View File

@ -216,6 +216,13 @@
v-if="!isCheck && scope.row.status==0"
@click="handleDelete(scope.row)"
>删除</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
v-if="isShow"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
@ -343,6 +350,7 @@ export default {
},
taskId: '',
isView: false,
isShow: false,
isEdit: false,
isCheck: false,
addForm: {
@ -397,6 +405,12 @@ export default {
},
},
created() {
const isShow = this.$route.query && this.$route.query.isShow
if (isShow && isShow == 'true') {
this.isShow = true
} else {
this.isShow = false
}
const taskId = this.$route.query && this.$route.query.taskId
this.taskId = taskId
if (this.taskId == '' || !this.taskId) {
@ -406,14 +420,12 @@ export default {
this.getTaskInfo()
}
const isView = this.$route.query && this.$route.query.isView
console.log(this.isView, 'isView')
if (isView && isView == 'true') {
this.isView = true
} else {
this.isView = false
}
const isCheck = this.$route.query && this.$route.query.isCheck
console.log(this.isCheck, 'isCheck')
if (isCheck && isCheck == 'true') {
this.isCheck = true
} else {

View File

@ -1,11 +1,19 @@
<template>
<div class="app-container" id="newAccessoryList">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="80px"
>
<el-form-item label="关键字" prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键字"
clearable maxlength="50"
clearable
maxlength="50"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
@ -19,13 +27,7 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAccept"
>新增</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAccept">新增</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
@ -35,15 +37,9 @@
size="mini"
@click="handleAdd"
>发布入库</el-button>
</el-col> -->
</el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -52,11 +48,36 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" type="index" width="55px" />
<el-table-column label="采购单号" align="center" prop="code" :show-overflow-tooltip="true" />
<el-table-column label="采购日期" align="center" prop="purchaseTime" :show-overflow-tooltip="true" />
<el-table-column label="到货日期" align="center" prop="arrivalTime" :show-overflow-tooltip="true" />
<el-table-column label="采购配件" align="center" prop="purchasingTypeName" :show-overflow-tooltip="true" />
<el-table-column label="采购员" align="center" prop="purchaserName" :show-overflow-tooltip="true" />
<el-table-column label="采购状态" align="center" prop="purchasingStatus" :show-overflow-tooltip="true" />
<el-table-column
label="采购日期"
align="center"
prop="purchaseTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="到货日期"
align="center"
prop="arrivalTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="采购配件"
align="center"
prop="purchasingTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="采购员"
align="center"
prop="purchaserName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="采购状态"
align="center"
prop="purchasingStatus"
:show-overflow-tooltip="true"
/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<!-- <el-table-column label="状态" align="center" prop="createTime" width="180">-->
<!-- <template slot-scope="scope">-->
@ -67,13 +88,8 @@
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
<template slot-scope="scope">
<el-button
size="mini"
icon="el-icon-zoom-in"
@click="handleView(scope.row)"
>查看</el-button>
<el-button size="mini" icon="el-icon-zoom-in" @click="handleView(scope.row)">查看</el-button>
<el-button
size="mini"
type="primary"
@ -118,15 +134,14 @@
<el-dialog :title="title" :visible.sync="openPrint" width="1100px" append-to-body>
<div style="height: 400px;overflow-y: scroll;">
<vue-easy-print tableShow ref="remarksPrintRef" class="print">
<div class="title" style="text-align: center;font-weight: 600;font-size: 16px;">
到货验收单
</div>
<div class="title" style="text-align: center;font-weight: 600;font-size: 16px;">到货验收单</div>
<div class="info" style="margin-top: 10px;display: flex;flex-wrap: wrap;">
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<span>工程名称</span>
</div>
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<span>验收单编号</span>{{ printData.code }}
<span>验收单编号</span>
{{ printData.code }}
</div>
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<span>合同名称</span>
@ -138,10 +153,16 @@
<span>验收地点</span>
</div>
<div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<span>供应商</span><span v-if="printTableData.length>0">{{ printTableData[0].supplier }}</span>
<span>供应商</span>
<span v-if="printTableData.length>0">{{ printTableData[0].supplier }}</span>
</div>
</div>
<el-table :data="printTableData" class="table" style="margin-top: 20px;width: 1000px;padding-bottom: 1px;" border>
<el-table
:data="printTableData"
class="table"
style="margin-top: 20px;width: 1000px;padding-bottom: 1px;"
border
>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="machineTypeName" />
@ -149,16 +170,18 @@
<el-table-column label="计量单位" align="center" prop="unitName" />
<el-table-column label="采购数量" align="center" prop="purchaseNum" />
<el-table-column label="已验收数量" align="center" prop="" />
<el-table-column label="已验收数量" align="center" prop />
<el-table-column label="本次验收数量" align="center" prop="checkNum" />
<el-table-column label="累积验收数量" align="center" prop="" />
<el-table-column label="验收日期" align="center" prop="" />
<el-table-column label="合格证及技术资料" align="center" prop="" />
<el-table-column label="包装" align="center" prop="" />
<el-table-column label="累积验收数量" align="center" prop />
<el-table-column label="验收日期" align="center" prop />
<el-table-column label="合格证及技术资料" align="center" prop />
<el-table-column label="包装" align="center" prop />
</el-table>
<div class="fillIn" style="margin-top: 20px;display: flex;justify-content: space-between;">
<div
class="fillIn"
style="margin-top: 20px;display: flex;justify-content: space-between;"
>
<div class="item" style="width: 50%;">
<div>
<span>接收单位验收意见</span>
@ -187,9 +210,8 @@
</div>
<!-- <div class="item" style="width: 25%;">
<span>经办人</span>
</div> -->
</div>-->
</div>
</vue-easy-print>
</div>
@ -198,19 +220,22 @@
<el-button @click="openPrint = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { listPurchaseAccessory,getPurchaseCheckInfo,delPurchaseAccessory,getAccessoryAcceptanceForm } from "@/api/store/newBuy";
import vueEasyPrint from 'vue-easy-print';
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'
import {
listPurchaseAccessory,
getPurchaseCheckInfo,
delPurchaseAccessory,
getAccessoryAcceptanceForm,
} from '@/api/store/newBuy'
import vueEasyPrint from 'vue-easy-print'
export default {
// name: "NewAccessoryList",
dicts: ['sys_normal_disable'],
components:{vueEasyPrint},
components: { vueEasyPrint },
data() {
return {
//
@ -228,7 +253,7 @@ export default {
//
accessoryList: [],
//
title: "",
title: '',
//
open: false,
//
@ -239,42 +264,37 @@ export default {
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined
status: undefined,
},
//
form: {},
openPrint: false,
printData:{},
printTableData:[],
printData: {},
printTableData: [],
//
rules: {
dictName: [
{ required: true, message: "字典名称不能为空", trigger: "blur" }
],
dictType: [
{ required: true, message: "字典类型不能为空", trigger: "blur" }
]
dictName: [{ required: true, message: '字典名称不能为空', trigger: 'blur' }],
dictType: [{ required: true, message: '字典类型不能为空', trigger: 'blur' }],
},
}
};
},
created() {
this.getList();
this.getList()
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
this.loading = true
listPurchaseAccessory(this.queryParams).then(response => {
this.accessoryList = response.rows;
this.total = response.total;
this.loading = false;
}
);
this.accessoryList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false;
this.reset();
this.open = false
this.reset()
},
//
reset() {
@ -282,53 +302,53 @@ export default {
taskId: undefined,
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
};
this.resetForm("form");
status: '0',
remark: undefined,
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
this.dateRange = []
this.resetForm('queryForm')
this.handleQuery()
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加字典类型";
this.reset()
this.open = true
this.title = '添加字典类型'
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.taskId)
this.single = selection.length!=1
this.single = selection.length != 1
this.multiple = !selection.length
},
/** 编辑按钮操作 */
handleUpdate(row) {
let query = { taskId:row.taskId }
this.$tab.closeOpenPage({ path: "/store/newBuy/newAccessoryAccept", query });
let query = { taskId: row.taskId }
this.$tab.closeOpenPage({ path: '/store/newBuy/newAccessoryAccept', query })
},
/** 查看按钮操作 */
handleView(row) {
let query = { taskId:row.taskId,isView:true }
this.$tab.closeOpenPage({ path: "/store/newBuy/newAccessoryAccept", query });
let query = { taskId: row.taskId, isView: true }
this.$tab.closeOpenPage({ path: '/store/newBuy/newAccessoryAccept', query })
},
/** 验收按钮操作 */
handleCheck(row) {
let query = { taskId:row.taskId,isCheck:true}
this.$tab.closeOpenPage({ path: "/store/newBuy/newAccessoryAccept", query });
let query = { taskId: row.taskId, isCheck: true }
this.$tab.closeOpenPage({ path: '/store/newBuy/newAccessoryAccept', query })
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
this.$refs['form'].validate(valid => {
if (valid) {
// if (this.form.taskId != undefined) {
// updateType(this.form).then(response => {
@ -344,56 +364,64 @@ export default {
// });
// }
}
});
})
},
//
getPrintTable(taskId){
getAccessoryAcceptanceForm({taskId:taskId}).then(response => {
this.printData = response.data;
this.printTableData = response.data.partDetailsList;
}
);
getPrintTable(taskId) {
getAccessoryAcceptanceForm({ taskId: taskId }).then(response => {
this.printData = response.data
this.printTableData = response.data.partDetailsList
})
},
//
handleBuy(row) {
// this.query.taskId = row.taskId
this.getPrintTable(row.taskId)
this.openPrint = true
this.title = "新购工机具验收单";
this.title = '新购工机具验收单'
},
//
print(){
this.$refs.remarksPrintRef.print();
print() {
this.$refs.remarksPrintRef.print()
},
/** 新增 */
handleAccept() {
this.$tab.closeOpenPage("/store/newBuy/newAccessoryAccept");
let query = { isShow: true }
this.$tab.closeOpenPage({ path: '/store/newBuy/newAccessoryAccept', query })
},
/** 删除按钮操作 */
handleDelete(row) {
const taskId = row.taskId || this.ids;
this.$modal.confirm('是否确认删除该数据项?').then(function() {
return delPurchaseAccessory(taskId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
const taskId = row.taskId || this.ids
this.$modal
.confirm('是否确认删除该数据项?')
.then(function() {
return delPurchaseAccessory(taskId)
})
.then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
})
.catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('material/purchaseAccessory/export', {
...this.queryParams
}, `新购配件_${new Date().getTime()}.xlsx`)
this.download(
'material/purchaseAccessory/export',
{
...this.queryParams,
},
`新购配件_${new Date().getTime()}.xlsx`
)
},
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess("刷新成功");
this.$store.dispatch('dict/cleanDict');
});
}
}
};
this.$modal.msgSuccess('刷新成功')
this.$store.dispatch('dict/cleanDict')
})
},
},
}
</script>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {

View File

@ -58,22 +58,11 @@
:value="model.partId"
/>
</el-select>
</el-form-item> -->
</el-form-item>-->
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
@ -88,7 +77,7 @@
@click="handleAdd"
v-hasPermi="['system:dict:add']"
>入库审核</el-button>
</el-col> -->
</el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
@ -112,23 +101,13 @@
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button
>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableList"
>code
<el-table v-loading="loading" :data="tableList">
code
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="采购单号" align="center" prop="code" />
<el-table-column
@ -148,8 +127,7 @@
align="center"
prop="purchasingTypeName"
:show-overflow-tooltip="true"
>
</el-table-column>
></el-table-column>
<el-table-column
label="采购员"
align="center"
@ -157,58 +135,37 @@
:show-overflow-tooltip="true"
/>
<el-table-column
label="提交入库人员"
align="center"
prop="createBy"
:show-overflow-tooltip="true"
/>
<el-table-column label="提交入库人员" align="center" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column
label="提交入库时间"
align="center"
prop="createTime"
:show-overflow-tooltip="true"
/>
<el-table-column
label="不通过原因"
align="center"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column
label="状态"
align="center"
prop="taskStatusResult"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
icon="el-icon-zoom-in"
@click="handleView(scope.row)"
>查看</el-button
>
<el-button size="mini" icon="el-icon-zoom-in" @click="handleView(scope.row)">查看</el-button>
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="scope.row.taskStatus == 69"
>审核</el-button
>
>审核</el-button>
<el-button
size="mini"
type="info"
icon="el-icon-edit"
v-if="scope.row.taskStatus == 70"
@click="handlePrint(scope.row)"
>入库单</el-button
>
>入库单</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
@ -298,7 +255,7 @@
:value="model.partId"
/>
</el-select>
</el-form-item> -->
</el-form-item>-->
<el-form-item label="机具类型" prop="typeId">
<treeselect
@ -314,36 +271,16 @@
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleDialogQuery"
>查询</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8" v-if="showHandle">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
:disabled="multiple"
@click="passAll"
>批量通过</el-button
>
<el-button type="primary" plain size="mini" :disabled="multiple" @click="passAll">批量通过</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
size="mini"
@click="refusedAll"
:disabled="multiple"
>批量不通过</el-button
>
<el-button type="danger" plain size="mini" @click="refusedAll" :disabled="multiple">批量不通过</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
@ -362,47 +299,23 @@
@selection-change="handleSelectionChange"
height="400"
>
<el-table-column
type="selection"
width="55"
align="center"
:selectable="selectable"
/>
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
<el-table-column label="序号" align="center" type="index" />
<el-table-column
label="配件类型"
align="center"
prop="typeName"
:show-overflow-tooltip="true"
/>
<el-table-column label="配件类型" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column
label="规格型号"
align="center"
prop="specificationType"
:show-overflow-tooltip="true"
/>
<el-table-column
label="数量"
align="center"
prop="checkNum"
:show-overflow-tooltip="true"
/>
<el-table-column
label="不通过原因"
align="center"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column
label="状态"
align="center"
prop="statusResult"
>
<el-table-column label="数量" align="center" prop="checkNum" :show-overflow-tooltip="true" />
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="状态" align="center" prop="statusResult">
<!-- <template slot-scope="scope">
<span v-if="scope.row.status=='0'">未审核</span>
<span v-if="scope.row.status=='1'">已入库</span>
<span v-if="scope.row.status=='2'">驳回 </span>
</template> -->
</template>-->
</el-table-column>
<el-table-column
@ -418,15 +331,13 @@
type="text"
@click="pass(scope.row)"
v-if="scope.row.status == 1"
>通过</el-button
>
>通过</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status == 1"
@click="refused(scope.row)"
>不通过</el-button
>
>不通过</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
@ -458,13 +369,8 @@
font-weight: 600;
font-size: 16px;
"
>
入库单
</div>
<div
class="info"
style="margin-top: 10px; display: flex; flex-wrap: wrap"
>
>入库单</div>
<div class="info" style="margin-top: 10px; display: flex; flex-wrap: wrap">
<div
class="item"
style="
@ -521,36 +427,12 @@
border
>
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column
label="序号"
align="center"
type="index"
/>
<el-table-column
label="类型名称"
align="center"
prop="typeName"
/>
<el-table-column
label="规格型号"
align="center"
prop="specificationType"
/>
<el-table-column
label="计量单位"
align="center"
prop="unitName"
/>
<el-table-column
label="数量"
align="center"
prop="checkNum"
/>
<el-table-column
label="备注"
align="center"
prop="remark"
/>
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="类型名称" align="center" prop="typeName" />
<el-table-column label="规格型号" align="center" prop="specificationType" />
<el-table-column label="计量单位" align="center" prop="unitName" />
<el-table-column label="数量" align="center" prop="checkNum" />
<el-table-column label="备注" align="center" prop="remark" />
<!-- <el-table-column label="出库方式" align="center" prop="manageTypeName" /> -->
</el-table>
@ -588,34 +470,22 @@
</template>
<script>
import {
listType,
getType,
delType,
addType,
updateType,
refreshCache,
} from '@/api/system/dict/type'
import {
getRepairedList,
getRepairedDetailList,
inputByType,
getTypeList,
} from '@/api/store/warehousing'
import {
import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'
import { getRepairedList, getRepairedDetailList, inputByType, getTypeList } from '@/api/store/warehousing'
import {
getPurchaseAccessoryPutInList,
getPartList,
getAccessoryPutInDetailList,
checkInputAccessory,
accessoryWarehousingEntry,
} from '@/api/store/newBuy'
import { equipmentTypeTree } from '@/api/store/tools'
import vueEasyPrint from 'vue-easy-print'
} from '@/api/store/newBuy'
import { equipmentTypeTree } from '@/api/store/tools'
import vueEasyPrint from 'vue-easy-print'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default {
export default {
// name: "AccessoryWarehousing",
dicts: ['sys_normal_disable'],
components: { vueEasyPrint, Treeselect },
@ -695,27 +565,25 @@
},
methods: {
getTypeList() {
getPartList({ level: '2' }).then((response) => {
getPartList({ level: '2' }).then(response => {
this.typeList = response.data
})
getPartList({ level: '3' }).then((response) => {
getPartList({ level: '3' }).then(response => {
this.modelList = response.data
})
},
/** 查询字典类型列表 */
getList() {
this.loading = true
getPurchaseAccessoryPutInList(this.queryParams).then(
(response) => {
getPurchaseAccessoryPutInList(this.queryParams).then(response => {
this.tableList = response.rows
this.total = response.total
this.loading = false
},
)
})
},
getDialogTable() {
getAccessoryPutInDetailList(this.query).then((response) => {
getAccessoryPutInDetailList(this.query).then(response => {
this.detailTableList = response.rows
this.dialogTotal = response.total
})
@ -760,7 +628,7 @@
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item)
this.ids = selection.map(item => item)
this.single = selection.length != 1
this.multiple = !selection.length
},
@ -801,7 +669,7 @@
remark: row.remark,
checkNum: row.checkNum,
}
checkInputAccessory([obj]).then((response) => {
checkInputAccessory([obj]).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
@ -814,14 +682,14 @@
passAll() {
console.log(this.query.taskId)
console.log(this.ids)
this.ids.forEach((item) => {
this.ids.forEach(item => {
item.taskId = this.query.taskId
item.checkResult = '1'
})
// let param = {
// params:JSON.stringify(this.ids)
// }
checkInputAccessory(this.ids).then((response) => {
checkInputAccessory(this.ids).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
@ -848,7 +716,7 @@
// let param = {
// params:JSON.stringify([obj])
// }
checkInputAccessory([obj]).then((response) => {
checkInputAccessory([obj]).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
@ -861,14 +729,14 @@
refusedAll() {
console.log(this.query.taskId)
console.log(this.ids)
this.ids.forEach((item) => {
this.ids.forEach(item => {
item.taskId = this.query.taskId
item.checkResult = '2'
})
// let param = {
// params:JSON.stringify(this.ids)
// }
checkInputAccessory(this.ids).then((response) => {
checkInputAccessory(this.ids).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
@ -880,17 +748,17 @@
},
/** 提交按钮 */
submitForm: function () {
this.$refs['form'].validate((valid) => {
submitForm: function() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {
updateType(this.form).then((response) => {
updateType(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addType(this.form).then((response) => {
addType(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
@ -902,12 +770,10 @@
//
getPrintTable(taskId) {
accessoryWarehousingEntry({ taskId: taskId }).then(
(response) => {
accessoryWarehousingEntry({ taskId: taskId }).then(response => {
this.printTableData = response.data
// this.dialogTotal = response.total;
},
)
})
},
//
handlePrint(row) {
@ -937,7 +803,7 @@
{
...this.queryParams,
},
`配件入库_${new Date().getTime()}.xlsx`,
`配件入库_${new Date().getTime()}.xlsx`
)
},
/** 刷新缓存按钮操作 */
@ -949,25 +815,17 @@
},
//
equipmentType() {
equipmentTypeTree().then((response) => {
equipmentTypeTree().then(response => {
this.equipmentTypeList = response.data
this.equipmentTypeList.forEach((item, index) => {
if (item.children && item.children.length > 0) {
item.children.forEach((item2, index2) => {
if (
item2.children &&
item2.children.length > 0
) {
item2.children.forEach((item3) => {
if (
item3.children &&
item3.children.length > 0
) {
item3.children.forEach((item4) => {
item4.machineTypeName =
item3.typeName
item4.specificationType =
item4.typeName
if (item2.children && item2.children.length > 0) {
item2.children.forEach(item3 => {
if (item3.children && item3.children.length > 0) {
item3.children.forEach(item4 => {
item4.machineTypeName = item3.typeName
item4.specificationType = item4.typeName
// this.$set(item4, 'purchasePrice', 0);
// this.$set(item4, 'purchaseNum', 1);
})
@ -980,11 +838,11 @@
})
},
},
}
}
</script>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
}
</style>