出门证加单号, 新购到货验收加删除

This commit is contained in:
bb_pan 2025-10-28 16:11:19 +08:00
parent 3190439d88
commit 6e1e1c0971
3 changed files with 84 additions and 3 deletions

View File

@ -131,3 +131,12 @@ export const addExitPermit = (data) => {
data:data,
})
}
// 单号下拉
export function getCodeListApi(data = {}) {
return request({
url: '/material/back_apply_info/getCodeList',
method: 'get',
params: data
})
}

View File

@ -43,7 +43,7 @@
</el-table-column>
<el-table-column label="物资" align="center" prop="material" show-overflow-tooltip />
<el-table-column label="车牌号" align="center" width="300" prop="carCode" show-overflow-tooltip />
<!-- <el-table-column label="姓名" align="center" width="200" prop="name" show-overflow-tooltip />-->
<el-table-column label="单号" align="center" width="200" prop="code" show-overflow-tooltip />
<el-table-column label="日期" align="center" width="300" prop="addDate" show-overflow-tooltip />
<el-table-column label="操作" align="center" width="280">
<template slot-scope="{ row }">
@ -144,6 +144,18 @@
style="width: 100%"
/>
</el-form-item>
<el-form-item label="领料单号" prop="code">
<el-select
v-model="form.code"
placeholder="请选择领料单号"
style="width: 100%"
clearable
filterable
:filter-method="filterCodeList"
>
<el-option v-for="(item, index) in codeList" :key="index" :label="item.code" :value="item.code" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
@ -158,7 +170,7 @@
</template>
<script>
import {getExitPermitList, addExitPermit} from '@/api/materialsStation/auth'
import {getExitPermitList, addExitPermit, getCodeListApi} from '@/api/materialsStation/auth'
import chapter from "@/utils/chapter";
import vueEasyPrint from 'vue-easy-print'
import printJS from 'print-js'
@ -204,7 +216,8 @@ export default {
name: '',
material: '',
carCode: '',
addDate: ''
addDate: '',
code: ''
},
//
rules: {
@ -216,8 +229,14 @@ export default {
],
addDate: [
{ required: true, message: "日期不能为空", trigger: "change" }
],
code: [
{ required: true, message: "领料单号不能为空", trigger: "change" }
]
},
codeList: [],
fullCodeList: [],
filterTimer: null,
isLoading: false,
title: '新增装货单',
exitPermitDialogVisible: false,
@ -244,6 +263,7 @@ export default {
handleAdd() {
this.resetForm();
this.open = true;
this.getCodeList()
},
//
@ -367,6 +387,41 @@ export default {
this.showPass = false
this.exitForm = {}
},
async getCodeList() {
try {
const res = await getCodeListApi()
const fullList = res.data || []
//
this.fullCodeList = fullList
// 200
this.codeList = fullList.slice(0, 200)
} catch (error) {
console.log('🚀 ~ error:', error)
}
},
filterCodeList(value) {
clearTimeout(this.filterTimer)
this.filterTimer = setTimeout(() => {
if (!value) {
this.codeList = this.fullCodeList.slice(0, 200)
return
}
const v = value.toString().toLowerCase()
this.codeList = this.fullCodeList
.filter(item => {
const codeStr = (item.code || '').toString().toLowerCase()
return codeStr.includes(v)
})
.slice(0, 200)
}, 500)
}
}
}
</script>

View File

@ -108,6 +108,14 @@
>
编辑
</el-button>
<el-button
v-if="scope.row.taskStatusName == '未完成'"
size="mini"
type="danger"
@click="handleDelete(scope.row)"
>
删除
</el-button>
<el-button
size="mini"
type="primary" v-if="scope.row.taskStatusName == '未完成' && deptName.includes(signLevelDeptMap[scope.row.signLevel])"
@ -254,6 +262,7 @@
<script>
import { getPurchaseList,acceptOuterVerify,getPurchaseCheckFormByTaskId } from "@/api/purchase/goodsAccept";
import { purchaseCheckInfoRemove } from "@/api/purchase/goodsArrived"
import { downloadFile } from '@/utils/download'
import { getToken } from '@/utils/auth'
import vueEasyPrint from "vue-easy-print";
@ -381,6 +390,14 @@
query: { taskId: row.taskId, id: row.id }
})
},
//
handleDelete(row) {
this.$modal.confirm('是否确认删除?').then(async () => {
await purchaseCheckInfoRemove(row.id)
this.getList()
this.$modal.msgSuccess('删除成功')
})
},
//
acceptancePurchase(){
let param={