add:入库新增导出功能

This commit is contained in:
2025-12-01 14:39:09 +08:00
parent 38862db0fb
commit 2424829edb
14 changed files with 281 additions and 31 deletions

View File

@@ -24,4 +24,12 @@ export function edit(data) {
})
}
export default { add, edit, del }
export function getcust(data) {
return request({
url: 'api/customerbase/getcust',
method: 'post',
data
})
}
export default { add, edit, del, getcust }

View File

@@ -139,6 +139,17 @@
>
强制确认
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
:loading="showDtlLoading"
@click="downdtl"
>
导出Excel
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
@@ -221,6 +232,8 @@ import ViewDialog from '@/views/wms/st/inbill/ViewDialog'
// import TaskDialog from '@/views/wms/st/inbill/TaskDialog'
import { mapGetters } from 'vuex'
import crudBsrealstorattr from '@/views/wms/basedata/bsrealstorattr/bsrealstorattr'
import {download} from "@/api/data";
import {downloadFile} from "@/utils";
export default {
name: 'Rawassist',
@@ -246,6 +259,7 @@ export default {
edit: ['admin', 'inbill:edit'],
del: ['admin', 'inbill:del']
},
showDtlLoading: false,
audit_flag: true,
dis_flag: true,
task_flag: true,
@@ -387,6 +401,19 @@ export default {
querytable() {
this.onSelectAll()
this.crud.toQuery()
},
downdtl() {
this.showDtlLoading = true
if (this.crud.query.createTime !== undefined) {
this.query.begin_time = this.crud.query.createTime[0]
this.query.end_time = this.crud.query.createTime[1]
}
download('/api/in/rawAssist/download', this.crud.query).then(result => {
downloadFile(result, '入库单', 'xlsx')
this.showDtlLoading = false
}).catch(() => {
this.showDtlLoading = false
})
}
}
}

View File

@@ -135,9 +135,9 @@
>
<el-option
v-for="item in suppList"
:key="item.supp_code"
:label="item.supp_name"
:value="item.supp_code"
:key="item.cust_code"
:label="item.cust_name"
:value="item.cust_code"
/>
</el-select>
</el-form-item>
@@ -198,7 +198,7 @@
<script>
import crudSaleorder from '@/views/wms/st/saleorder/saleorder'
import crudSupplierbase from '@/views/wms/basedata/supp/supplierbase'
import customerbase, {getcust} from '@/views/wms/basedata/customer/customerbase'
import CRUD, { crud, form, header, presenter } from '@crud/crud'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
@@ -275,7 +275,7 @@ export default {
}
},
created() {
crudSupplierbase.getSupp({}).then(res => {
customerbase.getcust({}).then(res => {
this.suppList = res
})
this.initQuery()
@@ -351,6 +351,10 @@ export default {
},
downdtl() {
this.showDtlLoading = true
if (this.crud.query.createTime !== undefined) {
this.query.begin_time = this.crud.query.createTime[0]
this.query.end_time = this.crud.query.createTime[1]
}
download('/api/salesorder/download', this.crud.query).then(result => {
downloadFile(result, '销售单', 'xlsx')
this.showDtlLoading = false