fix:新购工机具入库bug修改

This commit is contained in:
jackal 2024-04-20 13:00:37 +08:00
parent bbc9032b70
commit b8ff950a16
3 changed files with 654 additions and 712 deletions

View File

@ -459,6 +459,23 @@ export default {
if (this.codeList.length == 0) {
this.$modal.msgError('无新增编码绑定')
} else {
const maCodeSet = new Set()
let hasDuplicates = false
for (const item of this.codeList) {
const maCode = item.maCode
if (maCodeSet.has(maCode)) {
hasDuplicates = true
break
}
maCodeSet.add(maCode)
}
console.log('codeList:', this.codeList)
if (hasDuplicates) {
this.$modal.msgError('编码绑定失败,存在重复编码,请重新输入')
return //
}
editPurchaseMacode(this.codeList).then(response => {
console.log(this.codeList)
if (response.data && response.data.length > 0) {

View File

@ -35,19 +35,8 @@
</el-select>
</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>
@ -60,23 +49,14 @@
size="mini"
@click="handleExport"
v-hasPermi="['system:dict:export']"
>导出</el-button
>
>导出</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">
<!-- <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" type="index" width="55px" />
<el-table-column
label="采购单号"
align="center"
@ -133,12 +113,7 @@
:show-overflow-tooltip="true"
width="150"
/>
<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="taskStatus">
<template slot-scope="scope">
<span v-if="scope.row.taskStatus == '26'">已验收合格</span>
@ -148,19 +123,9 @@
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<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"
@ -171,16 +136,14 @@
scope.row.taskStatus == '105'
"
@click="handleUpdate(scope.row)"
>审核</el-button
>
>审核</el-button>
<el-button
size="mini"
type="info"
icon="el-icon-edit"
v-if="scope.row.taskStatus == '28'"
@click="handlePrint(scope.row)"
>入库单</el-button
>
>入库单</el-button>
</template>
</el-table-column>
</el-table>
@ -194,12 +157,7 @@
/>
<!--审批对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="1000px"
append-to-body
>
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form
:model="query"
ref="query"
@ -226,22 +184,10 @@
</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-->
@ -254,13 +200,29 @@
<!-- >导出</el-button>-->
<!-- </el-col>-->
</el-row>
<el-table v-loading="loading" :data="detailTableList" @selection-change="handleSelectionChange" height="400">
<el-table
v-loading="loading"
:data="detailTableList"
@selection-change="handleSelectionChange"
height="400"
>
<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="specificationType" :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="maCode" :show-overflow-tooltip="true" width="200"/>
<el-table-column
label="编号"
align="center"
prop="maCode"
:show-overflow-tooltip="true"
width="200"
/>
<el-table-column label="管理模式" align="center" prop="manageType">
<template slot-scope="scope">
<span v-if="scope.row.manageType=='0'">编码管理</span>
@ -295,15 +257,13 @@
type="text"
v-if="scope.row.status == '0'"
@click="pass(scope.row)"
>通过</el-button
>
>通过</el-button>
<el-button
size="mini"
type="text"
v-if="scope.row.status == '0'"
@click="refused(scope.row)"
>不通过</el-button
>
>不通过</el-button>
</template>
</el-table-column>
</el-table>
@ -328,13 +288,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="
@ -391,36 +346,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>
@ -459,12 +390,7 @@
<script>
import { getTypeList } from '@/api/store/warehousing'
import {
getPutInList,
getPutinDetailsList,
changePutinStatus,
warehousingEntry,
} from '@/api/store/newBuy'
import { getPutInList, getPutinDetailsList, changePutinStatus, warehousingEntry } from '@/api/store/newBuy'
import vueEasyPrint from 'vue-easy-print'
export default {
// name: "NewDevicesWarehousing",
@ -515,6 +441,7 @@
query: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
},
//
form: {},
@ -543,14 +470,14 @@
},
methods: {
getTypeList() {
getTypeList({ level: '3' }).then((response) => {
getTypeList({ level: '3' }).then(response => {
this.typesList = response.data
})
},
/** 查询字典类型列表 */
getList() {
this.loading = true
getPutInList(this.queryParams).then((response) => {
getPutInList(this.queryParams).then(response => {
this.tableList = response.rows
this.total = response.total
this.loading = false
@ -559,7 +486,7 @@
getDialogTable() {
this.loading = true
getPutinDetailsList(this.query).then((response) => {
getPutinDetailsList(this.query).then(response => {
this.detailTableList = response.rows
this.dialogTotal = response.total
this.loading = false
@ -601,10 +528,7 @@
selectable(row) {
console.log(row)
if (row.status == '0') {
if (
(row.manageType == '0' && row.maCode) ||
row.manageType == '1'
) {
if ((row.manageType == '0' && row.maCode) || row.manageType == '1') {
return true
} else {
return false
@ -615,7 +539,7 @@
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item)
this.ids = selection.map(item => item)
this.single = selection.length != 1
this.multiple = !selection.length
},
@ -623,6 +547,7 @@
handleUpdate(row) {
// this.reset();
this.query.taskId = row.taskId
this.query.dictName = undefined
this.getDialogTable()
this.open = true
this.showHandle = true
@ -647,7 +572,7 @@
checkResult: '1',
inputRecordList: [obj],
}
changePutinStatus(param).then((response) => {
changePutinStatus(param).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
@ -660,7 +585,7 @@
passAll() {
console.log(this.query.taskId)
console.log(this.ids)
this.ids.forEach((item) => {
this.ids.forEach(item => {
item.taskId = this.query.taskId
item.typeId = item.typeId
item.maId = item.maId
@ -672,7 +597,7 @@
checkResult: '1',
inputRecordList: this.ids,
}
changePutinStatus(param).then((response) => {
changePutinStatus(param).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
@ -700,7 +625,7 @@
checkResult: '2',
inputRecordList: [obj],
}
changePutinStatus(param).then((response) => {
changePutinStatus(param).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
@ -713,7 +638,7 @@
refusedAll() {
console.log(this.query.taskId)
console.log(this.ids)
this.ids.forEach((item) => {
this.ids.forEach(item => {
item.taskId = this.query.taskId
item.typeId = item.typeId
item.maId = item.maId
@ -726,7 +651,7 @@
inputRecordList: this.ids,
}
changePutinStatus(param).then((response) => {
changePutinStatus(param).then(response => {
if (response.code == 200) {
this.$modal.msgSuccess('审批成功')
this.getDialogTable()
@ -746,7 +671,7 @@
},
//
getPrintTable(taskId) {
warehousingEntry({ taskId: taskId }).then((response) => {
warehousingEntry({ taskId: taskId }).then(response => {
this.printTableData = response.data
// this.dialogTotal = response.total;
})
@ -769,7 +694,7 @@
{
...this.queryParams,
},
`新购工机具入库_${new Date().getTime()}.xlsx`,
`新购工机具入库_${new Date().getTime()}.xlsx`
)
},
},

View File

@ -43,9 +43,9 @@ module.exports = {
// target: `https://z.csgmall.com.cn`,
// target: `http://10.40.92.8:8080`, //超
// target: `http://10.40.92.253:8080`,//韩
target: `http://10.40.92.81:8080`, //韩
// target: `http://10.40.92.209:8080`,//川/
target: `http://10.40.92.153:8080`, //帅
// target: `http://10.40.92.153:8080`, //帅
// target: `http://10.40.92.14:8080`, //福
//******** 注意事项 ********* */