Compare commits
86 Commits
Author | SHA1 | Date |
---|---|---|
|
4da4cc0ed4 | 2 years ago |
|
e0d1fd6925 | 2 years ago |
|
967fe4cf5e | 2 years ago |
|
34b60e8c58 | 2 years ago |
|
c2beaf4df2 | 2 years ago |
|
a943125672 | 2 years ago |
|
5b3f089402 | 2 years ago |
|
210793bcb7 | 2 years ago |
|
16cb7c7dae | 2 years ago |
|
efb6b0055d | 2 years ago |
|
aab4e5701f | 2 years ago |
|
037695dfc0 | 2 years ago |
|
d6a57e79ca | 2 years ago |
|
04cc06340c | 2 years ago |
|
193ab67756 | 2 years ago |
|
ca96a3f746 | 2 years ago |
|
c11f8e4b3a | 2 years ago |
|
0474f4323b | 2 years ago |
|
ca7d0b41b2 | 2 years ago |
|
fc6e17a699 | 2 years ago |
|
4904f8109e | 2 years ago |
|
4d0902c7c2 | 2 years ago |
|
880500b80c | 2 years ago |
|
d92920ecf1 | 2 years ago |
|
15d9403e3f | 2 years ago |
|
97de905cc9 | 2 years ago |
|
3831410f89 | 2 years ago |
|
c4d96e8115 | 2 years ago |
|
f3a8cf2334 | 2 years ago |
|
b4cf299f8c | 2 years ago |
|
48641e24e2 | 2 years ago |
|
5c24e08b50 | 2 years ago |
|
91fd4e92ea | 2 years ago |
|
065b4b6b08 | 2 years ago |
|
88cdf06f9e | 2 years ago |
|
70acc94de7 | 2 years ago |
|
35403f6fab | 2 years ago |
|
4158871127 | 2 years ago |
|
c3f3d1d48f | 2 years ago |
|
2e40d4ed7b | 2 years ago |
|
e0c3c48e80 | 2 years ago |
|
cb60883b26 | 2 years ago |
|
960f1585fb | 2 years ago |
|
831e94f55d | 2 years ago |
|
0c9a7b5c82 | 2 years ago |
|
2bd79939e8 | 2 years ago |
|
9324c084c0 | 2 years ago |
|
b84e3dc1a6 | 2 years ago |
|
833647368c | 2 years ago |
|
b29628d15b | 2 years ago |
|
357e151e37 | 2 years ago |
|
48280be827 | 2 years ago |
|
58eb5b87fa | 2 years ago |
|
1c760ada1d | 2 years ago |
|
fde9342a9c | 2 years ago |
|
73afe6f896 | 2 years ago |
|
201375c6d5 | 2 years ago |
|
5f0c1a8997 | 2 years ago |
|
367e61bddf | 2 years ago |
|
23deacf583 | 2 years ago |
|
e8155ce822 | 2 years ago |
|
c7005c89c1 | 2 years ago |
|
10ffb1988f | 2 years ago |
|
0039e3e2b5 | 2 years ago |
|
13cdca66e0 | 2 years ago |
|
b6f905bf79 | 2 years ago |
|
c3dc2e4b5f | 2 years ago |
|
b7e1e1bcab | 2 years ago |
|
e827ef144f | 2 years ago |
|
f18fabe8ef | 2 years ago |
|
189fab8d15 | 2 years ago |
|
c85e708b1a | 2 years ago |
|
89e17081ba | 2 years ago |
|
bf40ef85d9 | 2 years ago |
|
af714e956b | 2 years ago |
|
f0df88f77a | 2 years ago |
|
0960540330 | 2 years ago |
|
383af71fd3 | 2 years ago |
|
adc4ec982d | 2 years ago |
|
8b42ade3bb | 2 years ago |
|
9988521e9f | 2 years ago |
|
636aaae031 | 2 years ago |
|
eb60ee606c | 2 years ago |
|
f9a08d6f62 | 2 years ago |
|
7efceb8be1 | 2 years ago |
|
219cd80363 | 2 years ago |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 509 KiB |
Before Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,18 @@
|
||||
import MsgBox from '@/views/components/MsgBox'
|
||||
let ConfirmConstructor, instance
|
||||
|
||||
const showMsgBox = {
|
||||
install(Vue) {
|
||||
ConfirmConstructor = Vue.extend(MsgBox)
|
||||
instance = new ConfirmConstructor().$mount()
|
||||
document.body.appendChild(instance.$el)
|
||||
|
||||
Vue.prototype.$showMsgBox = options => {
|
||||
Object.assign(instance, options)
|
||||
instance.init()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default showMsgBox
|
@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="show" class="cancelTips" >
|
||||
<div class="cancelBox">
|
||||
<p class="tips">{{ caption }}</p>
|
||||
<p class="title">{{ msg }}</p>
|
||||
<div class="selectBtn">
|
||||
<el-button size="small" type="primary" @click="cancelClick">取消</el-button>
|
||||
<el-button ref="uRef" size="small" type="primary" @click="confirmClick">确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "MsgBox",
|
||||
props: {
|
||||
caption: {},
|
||||
show: {},
|
||||
msg: {},
|
||||
callback: {}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: null,
|
||||
keyCode: '',
|
||||
lastTime: '',
|
||||
nextTime: '',// 上次时间、最新时间
|
||||
lastCode: '',
|
||||
nextCode: '',// 上次按键、最新按键
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
// 销毁enter事件
|
||||
this.enterKeyupDestroyed();
|
||||
},
|
||||
methods: {
|
||||
enterKey(event) {
|
||||
this.nextCode = event.keyCode
|
||||
// 如果触发了回车事件(扫码结束时间)
|
||||
if (this.nextCode == 13) {
|
||||
if (this.keyCode == 'true') {
|
||||
this.confirmClick();
|
||||
} else if (this.keyCode == 'false') {
|
||||
this.cancelClick(0);
|
||||
}
|
||||
this.keyCode = ''
|
||||
this.lastCode = ''
|
||||
this.lastTime = ''
|
||||
return
|
||||
}
|
||||
this.nextTime = new Date().getTime() // 记录最新时间
|
||||
if (!this.lastTime && !this.lastCode) { // 如果上次时间和上次按键为空
|
||||
this.keyCode += event.key // 执行叠加操作
|
||||
}
|
||||
// 如果有上次时间及上次按键
|
||||
if (this.lastCode && this.lastTime && this.nextTime - this.lastTime > 30) { // 当扫码前有keypress事件时,防止首字缺失
|
||||
this.keyCode = event.key
|
||||
} else if (this.lastCode && this.lastTime) {
|
||||
this.keyCode += event.key
|
||||
}
|
||||
this.lastCode = this.nextCode
|
||||
this.lastTime = this.nextTime
|
||||
},
|
||||
enterKeyupDestroyed() {
|
||||
document.removeEventListener("keyup", this.enterKey);
|
||||
},
|
||||
enterKeyup() {
|
||||
document.addEventListener("keyup", this.enterKey);
|
||||
},
|
||||
init() {
|
||||
this.show = true;
|
||||
this.enterKeyup();
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
this.callback("close")
|
||||
},
|
||||
confirmClick() {
|
||||
this.show = false;
|
||||
this.callback("yes")
|
||||
this.enterKeyupDestroyed();
|
||||
},
|
||||
cancelClick() {
|
||||
this.show = false;
|
||||
this.callback("no")
|
||||
this.enterKeyupDestroyed();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style type="text/scss" lang="scss" scoped>
|
||||
.cancelTips {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 9999999;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
|
||||
.cancelBox {
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
left: 40%;
|
||||
width: 20%;
|
||||
margin: auto;
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
text-align: center;
|
||||
|
||||
.tips {
|
||||
font-size: 16px;
|
||||
margin: 30px 0 15px;
|
||||
text-align: center;
|
||||
font-weight: bold;;
|
||||
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 16px;
|
||||
text-align: center;
|
||||
color: #767676;
|
||||
margin-bottom: 30px;
|
||||
|
||||
}
|
||||
|
||||
.selectBtn {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
border-top: 1px solid #ebebeb;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
@ -0,0 +1,688 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :model="filterQuery" class="query-form" size="mini" label-width="100px" v-show="showSearch">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="单号:">
|
||||
<el-input v-model="filterQuery.billNo" placeholder="单号"
|
||||
style="width: 90%"
|
||||
clearable="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="出入库类型:">
|
||||
<el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="入库" value="WareHouseIn"></el-option>
|
||||
<el-option label="出库" value="WareHouseOut"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="单据类型:">
|
||||
<el-select v-model="filterQuery.action" placeholder="请选择单据类型"
|
||||
style="width: 90%"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in busTypes"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.action">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="所属仓库:">
|
||||
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
|
||||
style="width: 90%"
|
||||
@change="invChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in invList"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="创建时间:">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="actDateRange"
|
||||
type="daterange"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 90%"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="top-right-btn">
|
||||
<el-button-group>
|
||||
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh"
|
||||
@click="onReset"
|
||||
>重置
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSubmit"
|
||||
>查询
|
||||
</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<el-divider style="margin: 15px"></el-divider>
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%"
|
||||
highlight-current-row
|
||||
@row-click="handleSelectionChange"
|
||||
border
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="180"></el-table-column>
|
||||
<el-table-column label="单据类型" prop="billTypeName" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="createTime" width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<i class="el-icon-time"></i>
|
||||
<span>{{ scope.row.createTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="往来单位" prop="fromName" width="220">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属部门" prop="deptName" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属仓库" prop="invName" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column label="来源单号" prop="corpOrderId" show-overflow-tooltip width="180"></el-table-column>
|
||||
<el-table-column label="来源" prop="fromType" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单据状态" prop="status" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusFilterType(scope.row.status)">{{
|
||||
checkStatus[scope.row.status]
|
||||
}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="addOrders(scope.row)"
|
||||
>编辑
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteDialog(scope.row.billNo)"
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="onUpload(scope.row.billNo)"
|
||||
>审核提交
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
title="编辑单据"
|
||||
:visible.sync="addOrderVisible"
|
||||
width="85%"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
v-if="addOrderVisible"
|
||||
@close='closeDialog'
|
||||
>
|
||||
<addOrder
|
||||
:closeDialog="closeDialog"
|
||||
:orderQuery="idQuery"
|
||||
:viewType="viewType"
|
||||
></addOrder>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="单号详情"
|
||||
:visible.sync="codeDetailVisible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
width="80%"
|
||||
v-if="codeDetailVisible"
|
||||
>
|
||||
<codeDetail
|
||||
:idQuery="idQuery"
|
||||
v-on:closeDetailDialog="closeDetailDialog"
|
||||
></codeDetail>
|
||||
</el-dialog>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="filterQuery.page"
|
||||
:limit.sync="filterQuery.limit"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-tabs type="border-card" style="margin: 15px">
|
||||
<!--单据业务详情-->
|
||||
<el-tab-pane>
|
||||
<span slot="label">单据 {{ currentRow == null ? '' : currentRow.billNo }}-业务扫码校验结果</span>
|
||||
<!--<el-form :inline="true" :model="bizQuery" class="query-form" size="mini">-->
|
||||
<!-- <el-form-item class="query-form-item" label="物资名称:">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="bizQuery.productName"-->
|
||||
<!-- placeholder="请输入物资名称"-->
|
||||
<!-- clearable-->
|
||||
<!-- >-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <el-button-group>-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="primary"-->
|
||||
<!-- icon="el-icon-refresh"-->
|
||||
<!-- @click="onBizReset"-->
|
||||
<!-- >重置-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button type="primary" @click="onBizSubmit"-->
|
||||
<!-- icon="el-icon-search"-->
|
||||
<!-- >查询-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-button-group>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!--</el-form>-->
|
||||
<el-table v-loading="bizDetailLoading" :data="bizDetailList" style="width: 100%" border
|
||||
:row-style="rowStyle"
|
||||
row-key="id"
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="物资名称" width="150"
|
||||
prop="coName"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="规格型号" width="150"
|
||||
prop="spec"
|
||||
></el-table-column>
|
||||
<el-table-column label="批次号" header-align="center">
|
||||
<el-table-column header-align="center"
|
||||
label="手录" width="100"
|
||||
prop="bbatchNo"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column header-align="center"
|
||||
label="扫码"
|
||||
prop="sbatchNo" width="100"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="生产日期" header-align="center">
|
||||
<el-table-column header-align="center"
|
||||
label="手录" width="100"
|
||||
prop="bproductDate"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column header-align="center"
|
||||
label="扫码" width="100"
|
||||
prop="sproductDate"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="失效日期" header-align="center">
|
||||
<el-table-column header-align="center"
|
||||
label="手录" width="100"
|
||||
prop="bexpireDate"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column header-align="center"
|
||||
label="扫码" width="100"
|
||||
prop="sexpireDate"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" header-align="center">
|
||||
<el-table-column
|
||||
header-align="center"
|
||||
label="单据数量" width="100"
|
||||
prop="count"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
header-align="center"
|
||||
label="扫码数量" width="100"
|
||||
prop="scanCount"
|
||||
></el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="价格"
|
||||
prop="price" width="100"
|
||||
></el-table-column>
|
||||
<el-table-column width="100" label="计量单位" prop="measname">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="生产企业"
|
||||
prop="manufacturer" width="160"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="注册/备案号" width="160"
|
||||
prop="certCode"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
deleteByOrderId,
|
||||
submitOrderWeb,
|
||||
getOrderList
|
||||
} from "../../api/inout/order";
|
||||
import addOrder from "./DialogCreateOrder";
|
||||
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||
import {getLocalJoinByUser} from "@/api/basic/busType";
|
||||
import {isBlank} from "@/utils/strUtil";
|
||||
import {getBizDetailList, getCheckDetailList} from "@/api/inout/orderDetailBiz";
|
||||
|
||||
|
||||
export default {
|
||||
name: "IoCheckAuditBusOrder",
|
||||
data() {
|
||||
return {
|
||||
showSearch: true,
|
||||
filterQuery: {
|
||||
id: "",
|
||||
billNo: null,
|
||||
mainAction: null,
|
||||
action: null,
|
||||
statusType: "unCheck",
|
||||
page: 1,
|
||||
limit: 10,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
invCode: this.$store.getters.locInvCode,
|
||||
},
|
||||
viewType: 3,
|
||||
checkStatus: {
|
||||
1: "草稿",
|
||||
2: "等待处理",
|
||||
3: "等待校验",
|
||||
4: "处理异常",
|
||||
5: "校验成功",
|
||||
6: "校验异常",
|
||||
7: "审核通过",
|
||||
8: "审核拒绝",
|
||||
9: "正在处理", 10: "待审核", 11: "待配货",
|
||||
},
|
||||
curIndex: "",
|
||||
idQuery: {},
|
||||
storageList: [],
|
||||
invList: [],
|
||||
list: [],
|
||||
codeDetailVisible: false,
|
||||
addOrderVisible: false,
|
||||
total: 0,
|
||||
loading: false,
|
||||
index: null,
|
||||
formName: null,
|
||||
errorDetail: "",
|
||||
formMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
},
|
||||
enableDept: false,
|
||||
fromTypeMap: {
|
||||
"1": "UDIMS平台",
|
||||
"2": "网页新增",
|
||||
"3": "pda即时校验",
|
||||
"4": "pda未校验",
|
||||
"5": "pc端扫码精灵",
|
||||
"6": "流转自动补单",
|
||||
"7": "UDI供应商平台",
|
||||
"8": "平衡补录单据",
|
||||
"10": "手动补单",
|
||||
"11": "仓库盘点",
|
||||
"12": "采购计划",
|
||||
"13": "领用单据",
|
||||
"14": "第三方系统单据",
|
||||
},
|
||||
deleteData: {
|
||||
billNo: "",
|
||||
status: 10,
|
||||
},
|
||||
dialogTableVisible: false,
|
||||
formLoading: false,
|
||||
deleteLoading: false,
|
||||
busTypes: [],
|
||||
actDateRange: [],
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "最近一周",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近一个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近三个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
currentRow: {
|
||||
billNo: ""
|
||||
},
|
||||
bizQuery: {
|
||||
productName: null,
|
||||
orderIdFk: null,
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
bizTotal: 0,
|
||||
bizDetailLoading: false,
|
||||
bizDetailList: [],
|
||||
|
||||
};
|
||||
},
|
||||
components: {
|
||||
addOrder,
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
id: "",
|
||||
billNo: null,
|
||||
mainAction: null,
|
||||
action: null,
|
||||
statusType: "unCheck",
|
||||
page: 1,
|
||||
limit: 10,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
invCode: this.$store.getters.locInvCode,
|
||||
};
|
||||
this.actDateRange = [];
|
||||
this.getList();
|
||||
},
|
||||
onSubmit() {
|
||||
if (this.actDateRange !== null) {
|
||||
this.filterQuery.startTime = this.actDateRange[0];
|
||||
this.filterQuery.endTime = this.actDateRange[1];
|
||||
} else {
|
||||
this.filterQuery.startTime = null;
|
||||
this.filterQuery.endTime = null;
|
||||
}
|
||||
this.filterQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
hideSearch() {
|
||||
this.showSearch = !this.showSearch;
|
||||
},
|
||||
|
||||
handleSizeChange(val) {
|
||||
this.filterQuery.limit = val;
|
||||
this.getList();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
closeDetailDialog(val) {
|
||||
this.codeDetailVisible = false;
|
||||
},
|
||||
getBusType() {
|
||||
let query = {
|
||||
code: this.filterQuery.invCode,
|
||||
enabled: true,
|
||||
vueType: "supDelivery",
|
||||
};
|
||||
getLocalJoinByUser(query)
|
||||
.then((response) => {
|
||||
this.busTypes = response.data.list || [];
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
addOrders(row) {
|
||||
this.currentRow = row;
|
||||
this.idQuery = {};
|
||||
this.idQuery = row;
|
||||
|
||||
this.addOrderVisible = true;
|
||||
},
|
||||
closeDialog() {
|
||||
this.addOrderVisible = false;
|
||||
this.addHosOrderVisible = false;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
//获取订单列表
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getOrderList(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code === 20000) {
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
if (this.list.length == 0) {
|
||||
this.bizDetailList = [];
|
||||
}
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message.error(error.message)
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
deleteOrders(data) {
|
||||
this.loading = true;
|
||||
this.deleteData.billNo = data;
|
||||
deleteByOrderId(this.deleteData)
|
||||
.then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else if (response.code == 520) {
|
||||
this.$message.error("新增扫码单据列表已不存在该扫码单据!");
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
this.getList();
|
||||
}
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.deleteOrders(rowId);
|
||||
this.currentRow = null;
|
||||
this.bizDetailList = [];
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
onUpload(data) {
|
||||
this.loading = true;
|
||||
var idQuery = {
|
||||
billNo: "",
|
||||
};
|
||||
idQuery.billNo = data;
|
||||
submitOrderWeb(idQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code === 20000) {
|
||||
this.$message.success("提交成功");
|
||||
this.getList();
|
||||
this.bizDetailList = [];
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getInvList() {
|
||||
getInvListByUser()
|
||||
.then((response) => {
|
||||
this.invList = response.data || [];
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
invChange() {
|
||||
this.filterQuery.action = null;
|
||||
this.getBusType();
|
||||
},
|
||||
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
2: "warning",
|
||||
1: "warning",
|
||||
4: "danger",
|
||||
3: "success",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
|
||||
rowStyle({row, rowIndex}) {
|
||||
let rowBackground = {};
|
||||
if (!this.$isNotBlank(row.supId) || !this.$isNotBlank(row.bindRlFk)) {
|
||||
rowBackground.color = '#f60303';
|
||||
return rowBackground;
|
||||
}
|
||||
if (!row.checkSuccess) {
|
||||
rowBackground.color = '#f60303';
|
||||
}
|
||||
return rowBackground;
|
||||
},
|
||||
|
||||
|
||||
onBizReset() {
|
||||
this.bizQuery = {
|
||||
productName: null,
|
||||
orderIdFk: null,
|
||||
page: 1,
|
||||
limit: 10
|
||||
};
|
||||
this.getBizDetailList();
|
||||
},
|
||||
onBizSubmit() {
|
||||
this.bizQuery.page = 1;
|
||||
this.getBizDetailList();
|
||||
},
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.currentRow = val;
|
||||
this.getBizDetailList();
|
||||
},
|
||||
getBizDetailList() {
|
||||
if (this.currentRow == null || isBlank(this.currentRow.billNo)) {
|
||||
this.$message.error("请先选择需要查询的单据!")
|
||||
return;
|
||||
}
|
||||
this.bizDetailLoading = true;
|
||||
this.bizQuery.orderIdFk = this.currentRow.billNo;
|
||||
getCheckDetailList(this.bizQuery).then((res) => {
|
||||
this.bizDetailLoading = false;
|
||||
if (res.code === 20000) {
|
||||
this.bizDetailList = res.data || [];
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
this.bizDetailList = [];
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.bizDetailLoading = false;
|
||||
this.$message.error(error.message);
|
||||
this.bizDetailList = [];
|
||||
this.bizTotal = 0;
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
document.body.ondrop = function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getInvList();
|
||||
this.getBusType();
|
||||
this.getList();
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style type="text/scss" lang="scss">
|
||||
</style>
|
||||
|
@ -0,0 +1,532 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :model="filterQuery"
|
||||
:rules="rules"
|
||||
ref="form"
|
||||
class="query-form" size="mini" label-width="100px" v-show="showSearch">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="单号:">
|
||||
<el-input v-model="filterQuery.billNo" placeholder="单号"
|
||||
style="width: 90%"
|
||||
clearable="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="出入库类型:" prop="mainAction">
|
||||
<el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="入库" value="WareHouseIn"></el-option>
|
||||
<el-option label="出库" value="WareHouseOut"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="单据类型:">
|
||||
<el-select v-model="filterQuery.action" placeholder="请选择单据类型"
|
||||
style="width: 90%"
|
||||
clearable>
|
||||
<el-option
|
||||
v-for="item in busTypes"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.action">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="所属仓库:">
|
||||
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
|
||||
style="width: 90%"
|
||||
@change="invChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in invList"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="query-form-item" label="创建时间:">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="actDateRange"
|
||||
type="daterange"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
style="width: 90%"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="top-right-btn">
|
||||
<el-button-group>
|
||||
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh"
|
||||
@click="onReset"
|
||||
>重置
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSubmit"
|
||||
>查询
|
||||
</el-button
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-bottom-left" @click="selectThrOrderFunction()"
|
||||
:loading="loading">选入第三方单据
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<el-divider style="margin: 15px"></el-divider>
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
|
||||
border
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="140"></el-table-column>
|
||||
<el-table-column label="单据类型" prop="billTypeName" width="160"></el-table-column>
|
||||
<el-table-column label="创建时间" prop="createTime" width="140" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="往来单位" prop="fromName" width="220">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属部门" prop="deptName" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column label=所属仓库 prop="invName" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column label="来源单据号" prop="corpOrderId" show-overflow-tooltip width="140"></el-table-column>
|
||||
<el-table-column label="来源" prop="fromType" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" prop="status" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="statusFilterType(scope.row.status)">{{
|
||||
checkStatus[scope.row.status]
|
||||
}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="editOrder(scope.row)"
|
||||
>编辑
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteDialog(scope.row.billNo)"
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
v-if="scope.row.status == 1"
|
||||
@click.native.stop="onUpload(scope.row.billNo)"
|
||||
>提交审核
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
:title="titleMap[title]"
|
||||
:visible.sync="addOrderVisible"
|
||||
width="85%"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
v-if="addOrderVisible"
|
||||
@close='closeDialog'
|
||||
>
|
||||
<addOrder
|
||||
:closeDialog="closeDialog"
|
||||
:orderQuery="idQuery"
|
||||
:viewType="viewType"
|
||||
></addOrder>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="选入第三方单据"
|
||||
:visible.sync="selectThrOrderVisible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
width="85%"
|
||||
v-if="selectThrOrderVisible"
|
||||
>
|
||||
<selectThrOrder
|
||||
:closeDialog="closeDialog"
|
||||
:data="thisData"
|
||||
></selectThrOrder>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="选入领用单据"
|
||||
:visible.sync="selectReceiveVisible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
width="85%"
|
||||
v-if="selectReceiveVisible"
|
||||
>
|
||||
<selectReceiveOrderDialog
|
||||
:closeDialog="closeDialog"
|
||||
:data="thisData"
|
||||
></selectReceiveOrderDialog>
|
||||
</el-dialog>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="filterQuery.page"
|
||||
:limit.sync="filterQuery.limit"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
deleteByOrderId,
|
||||
submitOrderWeb,
|
||||
getOrderList, submitBiz
|
||||
} from "../../api/inout/order";
|
||||
import addOrder from "./DialogCreateOrder";
|
||||
import {getInvListByUser} from "@/api/system/invWarehouse";
|
||||
import {getLocalJoinByUser} from "@/api/basic/busType";
|
||||
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
|
||||
|
||||
import selectThrOrder from "./DialogSelectThrOrder";
|
||||
import selectReceiveOrderDialog from "./DialogSelectReceiveOrder";
|
||||
|
||||
|
||||
export default {
|
||||
name: "IoCheckAuditNewOrder",
|
||||
data() {
|
||||
return {
|
||||
showSearch: true,
|
||||
titleMap: {
|
||||
add: "新增单据",
|
||||
edit: "编辑单据",
|
||||
},
|
||||
title: "add",
|
||||
|
||||
filterQuery: {
|
||||
id: "",
|
||||
billNo: null,
|
||||
mainAction: null,
|
||||
action: null,
|
||||
statusType: "new_biz",
|
||||
page: 1,
|
||||
limit: 10,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
invCode: this.$store.getters.locInvCode,
|
||||
},
|
||||
checkStatus: {
|
||||
1: "草稿",
|
||||
2: "等待处理",
|
||||
3: "等待校验",
|
||||
4: "处理异常",
|
||||
5: "校验成功",
|
||||
6: "校验异常",
|
||||
7: "已审核",
|
||||
8: "审核拒绝",
|
||||
9: "正在处理", 10: "待审核", 11: "待配货",
|
||||
},
|
||||
curIndex: "",
|
||||
idQuery: {},
|
||||
storageList: [],
|
||||
invList: [],
|
||||
list: [],
|
||||
addOrderVisible: false,
|
||||
total: 0,
|
||||
loading: false,
|
||||
index: null,
|
||||
formName: null,
|
||||
errorDetail: "",
|
||||
formMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
},
|
||||
enableDept: false,
|
||||
fromTypeMap: {
|
||||
"1": "UDIMS平台",
|
||||
"2": "网页新增",
|
||||
"3": "pda即时校验",
|
||||
"4": "pda未校验",
|
||||
"5": "pc端扫码精灵",
|
||||
"6": "流转自动补单",
|
||||
"7": "UDI供应商平台",
|
||||
"8": "平衡补录单据",
|
||||
"10": "手动补单",
|
||||
"11": "仓库盘点",
|
||||
"12": "采购计划",
|
||||
"13": "领用单据",
|
||||
"14": "第三方系统单据",
|
||||
},
|
||||
deleteData: {
|
||||
billNo: "",
|
||||
status: 10,
|
||||
},
|
||||
dialogTableVisible: false,
|
||||
formLoading: false,
|
||||
deleteLoading: false,
|
||||
busTypes: [],
|
||||
actDateRange: [],
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "最近一周",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近一个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近三个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
viewType: 5,
|
||||
thisData: {},
|
||||
selectThrOrderVisible: false,
|
||||
selectReceiveVisible: false,
|
||||
lotType: "LOT",//有无三期页面
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
addOrder, selectThrOrder, selectReceiveOrderDialog
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.filterQuery = {
|
||||
id: "",
|
||||
billNo: null,
|
||||
mainAction: null,
|
||||
action: null,
|
||||
statusType: "new_biz",
|
||||
page: 1,
|
||||
limit: 10,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
invCode: this.$store.getters.locInvCode,
|
||||
};
|
||||
this.actDateRange = [];
|
||||
this.getList();
|
||||
},
|
||||
onSubmit() {
|
||||
if (this.actDateRange !== null) {
|
||||
this.filterQuery.startTime = this.actDateRange[0];
|
||||
this.filterQuery.endTime = this.actDateRange[1];
|
||||
} else {
|
||||
this.filterQuery.startTime = null;
|
||||
this.filterQuery.endTime = null;
|
||||
}
|
||||
this.filterQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
hideSearch() {
|
||||
this.showSearch = !this.showSearch;
|
||||
},
|
||||
getBusType() {
|
||||
let query = {
|
||||
code: this.filterQuery.invCode,
|
||||
enabled: true,
|
||||
};
|
||||
getLocalJoinByUser(query)
|
||||
.then((response) => {
|
||||
this.busTypes = response.data.list || [];
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
addOrders() {
|
||||
this.idQuery = {};
|
||||
this.title = "add";
|
||||
this.addOrderVisible = true;
|
||||
},
|
||||
|
||||
editOrder(row) {
|
||||
this.idQuery = row;
|
||||
this.title = "edit";
|
||||
this.addOrderVisible = true;
|
||||
},
|
||||
|
||||
closeDialog() {
|
||||
this.addOrderVisible = false;
|
||||
this.addHosOrderVisible = false;
|
||||
this.selectReceiveVisible = false;
|
||||
this.selectThrOrderVisible = false;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
//获取订单列表
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getOrderList(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code === 20000) {
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message.error(error.message)
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
deleteOrders(data) {
|
||||
this.loading = true;
|
||||
this.deleteData.billNo = data;
|
||||
deleteByOrderId(this.deleteData)
|
||||
.then((response) => {
|
||||
|
||||
if (response.code == 20000) {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else if (response.code == 520) {
|
||||
this.$message.error("新增扫码单据列表已不存在该扫码单据!");
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
this.getList();
|
||||
}
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.deleteOrders(rowId);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
onUpload(data) {
|
||||
this.loading = true;
|
||||
var idQuery = {
|
||||
billNo: "",
|
||||
};
|
||||
idQuery.billNo = data;
|
||||
submitBiz(idQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code === 20000) {
|
||||
this.$message.success("提交成功");
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getInvList() {
|
||||
getInvListByUser()
|
||||
.then((response) => {
|
||||
this.invList = response.data || [];
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
invChange() {
|
||||
this.filterQuery.action = null;
|
||||
this.getBusType();
|
||||
},
|
||||
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
2: "warning",
|
||||
1: "warning",
|
||||
4: "danger",
|
||||
3: "success",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
|
||||
|
||||
selectThrOrderFunction() {
|
||||
this.selectThrOrderVisible = true;
|
||||
},
|
||||
|
||||
selectReceive() {
|
||||
this.selectReceiveVisible = true;
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
mounted() {
|
||||
document.body.ondrop = function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getInvList();
|
||||
this.getBusType();
|
||||
this.getList();
|
||||
this.lotType = this.$route.query.name;
|
||||
if (this.lotType == 'NO_LOT') {
|
||||
this.viewType = 5;
|
||||
} else {
|
||||
this.viewType = 6;
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style type="text/scss" lang="scss">
|
||||
</style>
|
||||
|
@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form>
|
||||
<el-card style="margin-top: -10px;padding-top:10px ">
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<!-- :disabled="true" 这个标识启用标识不能修改-->
|
||||
<el-form-item label="单据类型:" label-width="120px">
|
||||
<el-input
|
||||
size="mini"
|
||||
:disabled="true"
|
||||
splaceholder="请输入内容" style="width: 80%"
|
||||
v-model="inputQuery.name"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单据类型代码:" label-width="120px">
|
||||
<el-input
|
||||
size="mini"
|
||||
style="width: 80%"
|
||||
:disabled="true"
|
||||
splaceholder="请输入内容"
|
||||
v-model="inputQuery.action"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单据起始上传:" label-width="120px">
|
||||
<el-date-picker
|
||||
type="date"
|
||||
v-model="inputQuery.orderStartTime"
|
||||
format="yyyy-MM-dd"
|
||||
style="width: 80%"
|
||||
value-format="yyyy-MM-dd"
|
||||
:disabled="inputQuery.autoUpload"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单据状态:" label-width="120px">
|
||||
<el-radio-group v-model="inputQuery.orderStatus" :disabled="inputQuery.autoUpload">
|
||||
<el-radio :label="1" :value="1">待审核</el-radio>
|
||||
<el-radio :label="2" :value="2">已审核</el-radio>
|
||||
<el-radio :label="3" :value="3">已确认</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="单据来源:" label-width="120px">
|
||||
<el-select
|
||||
v-model="inputQuery.orderSource"
|
||||
multiple
|
||||
collapse-tags
|
||||
style="width: 80%"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option label="UDIMS平台" value="1"></el-option>
|
||||
<el-option label="网页新增" value="2"></el-option>
|
||||
<el-option label="pda即时校验" value="3"></el-option>
|
||||
<el-option label="pda未校验" value="4"></el-option>
|
||||
<el-option label="pc端扫码精灵" value="5"></el-option>
|
||||
<el-option label="流转自动补单" value="6"></el-option>
|
||||
<el-option label="UDI供应商平台" value="7"></el-option>
|
||||
<el-option label="平衡补录单据" value="8"></el-option>
|
||||
<el-option label="手动补单" value="10"></el-option>
|
||||
<el-option label="仓库盘点" value="11"></el-option>
|
||||
<el-option label="采购计划" value="12"></el-option>
|
||||
<el-option label="领用单据" value="13"></el-option>
|
||||
<el-option label="第三方系统单据" value="14"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
name: "inputQuery",
|
||||
props: {
|
||||
inputQuery: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
methods: {},
|
||||
data() {
|
||||
return {
|
||||
inputQuery: {
|
||||
orderSource: [], // 存储用户选择的单据来源
|
||||
orderStatus: 3,//单选框默认选择已确认单据选项
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 5px;
|
||||
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
|
||||
</style>
|
@ -1,498 +1,521 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申购单号">
|
||||
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
<el-form :model="filterQuery" class="query-form" label-width="100px" v-show="showSearch">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申购单号">
|
||||
<el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入单据号" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申购部门">
|
||||
<el-select v-model="filterQuery.targetDeptCode" placeholder="请选择申购部门" @change="getInvList" style="width: 90%">
|
||||
<el-option
|
||||
v-for="item in deptList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
>
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申购部门">
|
||||
<el-select v-model="filterQuery.targetDeptCode" placeholder="请选择申购部门" @change="getInvList"
|
||||
style="width: 90%">
|
||||
<el-option
|
||||
v-for="item in deptList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
>
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申购仓库">
|
||||
<el-select v-model="filterQuery.targetInvCode" style="width: 90%" clearable placeholder="请选择所属仓库">
|
||||
<el-option
|
||||
v-for="item in invList"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申购仓库">
|
||||
<el-select v-model="filterQuery.targetInvCode" style="width: 90%" clearable placeholder="请选择所属仓库">
|
||||
<el-option
|
||||
v-for="item in invList"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.code">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="紧急程度:" prop="emergency">
|
||||
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
|
||||
<el-option label="正常" :value=1></el-option>
|
||||
<el-option label="较急" :value=2></el-option>
|
||||
<el-option label="特急" :value=3></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="创建时间:">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="actDateRange"
|
||||
type="daterange"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
style="width: 90%"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="紧急程度:" prop="emergency">
|
||||
<el-select v-model="filterQuery.emergency" placeholder="请选择紧急程度" style="width: 90%" clearable>
|
||||
<el-option label="正常" :value=1></el-option>
|
||||
<el-option label="较急" :value=2></el-option>
|
||||
<el-option label="特急" :value=3></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="创建时间:">
|
||||
<el-date-picker
|
||||
:picker-options="pickerOptions"
|
||||
v-model="actDateRange"
|
||||
type="daterange"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
style="width: 90%"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
</el-form>
|
||||
|
||||
<div class="top-right-btn">
|
||||
<el-button-group style="display:flex;">
|
||||
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="newDistributionForm()" :loading="loading">新增单据</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<div class="top-right-btn">
|
||||
<el-button-group style="display:flex;">
|
||||
<el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
|
||||
<el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="onSubmitFind">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="newDistributionForm()" :loading="loading">新增单据
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
||||
<el-divider style="margin: 15px"></el-divider>
|
||||
<el-divider style="margin: 15px"></el-divider>
|
||||
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" border highlight-current-row>
|
||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||
<el-table-column label="申购单号" prop="billNo"></el-table-column>
|
||||
<el-table-column label="申购部门" prop="targetDeptName"></el-table-column>
|
||||
<el-table-column label="申购仓库" prop="targetInvName"></el-table-column>
|
||||
<el-table-column label="紧急程度" prop="emergency" >
|
||||
<template slot-scope="scope">
|
||||
{{ emergencyMap[scope.row.emergency] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货截止" prop="arrivalTime" ></el-table-column>
|
||||
<el-table-column label="单据状态" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="(scope.row.status) | statusFilterType">
|
||||
{{ statusMap[scope.row.status] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="createTime"></el-table-column>
|
||||
<el-table-column label="操作" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑</el-button>
|
||||
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%" @current-change="handleDetail" border
|
||||
highlight-current-row
|
||||
:default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||
<el-table-column label="申购单号" prop="billNo"></el-table-column>
|
||||
<el-table-column label="申购部门" prop="targetDeptName"></el-table-column>
|
||||
<el-table-column label="申购仓库" prop="targetInvName"></el-table-column>
|
||||
<el-table-column label="紧急程度" prop="emergency">
|
||||
<template slot-scope="scope">
|
||||
{{ emergencyMap[scope.row.emergency] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货截止" prop="arrivalTime"></el-table-column>
|
||||
<el-table-column label="单据状态" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="(scope.row.status) | statusFilterType">
|
||||
{{ statusMap[scope.row.status] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark"></el-table-column>
|
||||
<el-table-column label="创建时间" prop="createTime"
|
||||
sortable="custom" :sort-orders="['ascending', 'descending']"></el-table-column>
|
||||
<el-table-column label="操作" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">编辑
|
||||
</el-button>
|
||||
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="filterQuery.page"
|
||||
:limit.sync="filterQuery.limit"
|
||||
@pagination="handleCurrentChange"
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="filterQuery.page"
|
||||
:limit.sync="filterQuery.limit"
|
||||
@pagination="handleCurrentChange"
|
||||
|
||||
></pagination>
|
||||
</el-card>
|
||||
></pagination>
|
||||
</el-card>
|
||||
|
||||
<el-card class="el-card">
|
||||
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
|
||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
|
||||
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
|
||||
<el-table-column label="申购数量" prop="count"></el-table-column>
|
||||
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
|
||||
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
|
||||
<el-table-column label="供应商" prop="supName"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="el-card">
|
||||
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
|
||||
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||
<el-table-column label="DI/物资编码" prop="nameCode"></el-table-column>
|
||||
<el-table-column label="物资名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
|
||||
<el-table-column label="计量单位" prop="measname" show-overflow-tooltip="true" width="100"></el-table-column>
|
||||
<el-table-column label="申购数量" prop="count"></el-table-column>
|
||||
<el-table-column label="注册/备案号" prop="zczbhhzbapzbh"></el-table-column>
|
||||
<el-table-column label="生产厂家" prop="manufactory"></el-table-column>
|
||||
<el-table-column label="供应商" prop="supName"></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
:title="formMap[formName]"
|
||||
:visible.sync="newSpDistributionVisible"
|
||||
width="80%"
|
||||
v-if="newSpDistributionVisible"
|
||||
@close='closeDialog'
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:before-close ="handleClose"
|
||||
>
|
||||
<pureApplyEdit
|
||||
:closeDialog="closeDialog"
|
||||
:idQuery="idQuery"
|
||||
v-on:cancelDialog="getId"
|
||||
:isChang="isChang"
|
||||
></pureApplyEdit>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<el-dialog
|
||||
:title="formMap[formName]"
|
||||
:visible.sync="newSpDistributionVisible"
|
||||
width="80%"
|
||||
v-if="newSpDistributionVisible"
|
||||
@close='closeDialog'
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<pureApplyEdit
|
||||
:closeDialog="closeDialog"
|
||||
:idQuery="idQuery"
|
||||
v-on:cancelDialog="getId"
|
||||
:isChang="isChang"
|
||||
></pureApplyEdit>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import pureApplyEdit from "./purApplyEditDiaolog";
|
||||
import {delApply, delApplyDetailAll, inserThrOrderWeb, listApply, listApplyDetail} from "@/api/purchase/purApply";
|
||||
import { getInvListByUser } from '@/api/system/invWarehouse'
|
||||
import { getDeptListByUser } from '@/api/auth/authDept'
|
||||
import {filterSubAll} from "@/api/system/invSubWarehouse";
|
||||
import {getInvListByUser} from '@/api/system/invWarehouse'
|
||||
import {filterDepts, getDeptListByUser} from '@/api/auth/authDept'
|
||||
import {filterGroupBySpuse, filterSubAll} from "@/api/system/invSubWarehouse";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showSearch: true,
|
||||
pId:null,
|
||||
filterQuery: {
|
||||
billAction: null,
|
||||
billNo: "",
|
||||
originType: null,
|
||||
thirdSysFk: "",
|
||||
page: 1,
|
||||
limit: 10,
|
||||
corpName: null,
|
||||
type: 1,
|
||||
editStatus: 1,
|
||||
emergency:'',
|
||||
targetDeptCode:'',
|
||||
targetInvCode:null
|
||||
},
|
||||
isChang:false,
|
||||
formName: null,
|
||||
formMap: {
|
||||
add: "新增申购单据",
|
||||
update: "编辑申购单据",
|
||||
},
|
||||
statusMap: {
|
||||
1: "草稿",
|
||||
2: "未审核",
|
||||
3: "已审核",
|
||||
4: "已拒绝"
|
||||
data() {
|
||||
return {
|
||||
defaultSort: {prop: 'createTime', order: 'desc'},
|
||||
showSearch: true,
|
||||
pId: null,
|
||||
filterQuery: {
|
||||
billAction: null,
|
||||
billNo: "",
|
||||
originType: null,
|
||||
thirdSysFk: "",
|
||||
page: 1,
|
||||
limit: 10,
|
||||
corpName: null,
|
||||
type: 1,
|
||||
editStatus: 1,
|
||||
emergency: '',
|
||||
targetDeptCode: '',
|
||||
targetInvCode: null
|
||||
},
|
||||
isChang: false,
|
||||
formName: null,
|
||||
formMap: {
|
||||
add: "新增申购单据",
|
||||
update: "编辑申购单据",
|
||||
},
|
||||
statusMap: {
|
||||
1: "草稿",
|
||||
2: "未审核",
|
||||
3: "已审核",
|
||||
4: "已拒绝"
|
||||
},
|
||||
emergencyMap: {
|
||||
1: "正常",
|
||||
2: "较急",
|
||||
3: "特急",
|
||||
},
|
||||
idQuery: {},
|
||||
total: 0,
|
||||
thirdSys: [],
|
||||
invList: {},
|
||||
invCodebe: null,
|
||||
deptList: {},
|
||||
thirdSysDetail: null,
|
||||
busTypes: [],
|
||||
originTypes: [],
|
||||
list: [],
|
||||
createTimes: null,
|
||||
detailLoading: false,
|
||||
detailList: [],
|
||||
loading: false,
|
||||
actDateRange: [],
|
||||
newSpDistributionVisible: false,
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "最近一周",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
emergencyMap:{
|
||||
1: "正常",
|
||||
2: "较急",
|
||||
3: "特急",
|
||||
},
|
||||
{
|
||||
text: "最近一个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
idQuery: {},
|
||||
total: 0,
|
||||
thirdSys: [],
|
||||
invList:{},
|
||||
invCodebe:null,
|
||||
deptList:{},
|
||||
thirdSysDetail: null,
|
||||
busTypes: [],
|
||||
originTypes: [],
|
||||
list: [],
|
||||
createTimes:null,
|
||||
detailLoading: false,
|
||||
detailList: [],
|
||||
loading: false,
|
||||
actDateRange: [],
|
||||
newSpDistributionVisible: false,
|
||||
pickerOptions: {
|
||||
shortcuts: [
|
||||
{
|
||||
text: "最近一周",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近一个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: "最近三个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "最近三个月",
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||
picker.$emit("pick", [start, end]);
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
let deptCode = this.filterQuery.targetDeptCode
|
||||
this.filterQuery = {
|
||||
billNo: "",
|
||||
thirdSysFk: "",
|
||||
billFlag: null,
|
||||
billAction: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
corpName: null,
|
||||
type: 1,
|
||||
editStatus: 1,
|
||||
targetDeptCode: this.invCodebe,
|
||||
targetInvCode:null
|
||||
};
|
||||
this.initActDateRange()
|
||||
if(deptCode!=this.invCodebe){
|
||||
this.getInvList()
|
||||
}
|
||||
this.actDateRange = [];
|
||||
this.getList();
|
||||
},
|
||||
getId(id){
|
||||
if( this.formName=='add' && id!=null){
|
||||
var data={
|
||||
id:id
|
||||
}
|
||||
this.pId=id
|
||||
//当在新增时取消添加操作删除掉这次的数据
|
||||
delApplyDetailAll(data).then((response)=>{
|
||||
if(response.code==20000){
|
||||
this.newSpDistributionVisible=false
|
||||
}
|
||||
});
|
||||
}else{
|
||||
this.newSpDistributionVisible=false
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
let deptCode = this.filterQuery.targetDeptCode
|
||||
this.filterQuery = {
|
||||
billNo: "",
|
||||
thirdSysFk: "",
|
||||
billFlag: null,
|
||||
billAction: null,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
corpName: null,
|
||||
type: 1,
|
||||
editStatus: 1,
|
||||
targetDeptCode: this.invCodebe,
|
||||
targetInvCode: null
|
||||
};
|
||||
this.initActDateRange()
|
||||
if (deptCode != this.invCodebe) {
|
||||
this.getInvList()
|
||||
}
|
||||
this.actDateRange = [];
|
||||
this.getList();
|
||||
},
|
||||
getId(id) {
|
||||
if (this.formName == 'add' && id != null) {
|
||||
var data = {
|
||||
id: id
|
||||
}
|
||||
this.pId = id
|
||||
//当在新增时取消添加操作删除掉这次的数据
|
||||
delApplyDetailAll(data).then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.newSpDistributionVisible = false
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.newSpDistributionVisible = false
|
||||
}
|
||||
|
||||
},
|
||||
onSubmitFind() {
|
||||
this.filterQuery.page = 1;
|
||||
},
|
||||
onSubmitFind() {
|
||||
this.filterQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
hideSearch() {
|
||||
this.showSearch = !this.showSearch;
|
||||
},
|
||||
|
||||
handleSortChange(column, prop, order) {
|
||||
if (column.order === 'descending') {
|
||||
this.filterQuery.sort = 'desc'
|
||||
} else {
|
||||
this.filterQuery.sort = 'asc'
|
||||
}
|
||||
this.filterQuery.orderBy = column.prop;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
getList() {
|
||||
if (this.actDateRange != null) {
|
||||
this.filterQuery.startDate = this.actDateRange[0];
|
||||
this.filterQuery.endDate = this.actDateRange[1];
|
||||
} else {
|
||||
this.filterQuery.startDate = null;
|
||||
this.filterQuery.endDate = null;
|
||||
}
|
||||
this.loading = true;
|
||||
console.log(this.filterQuery)
|
||||
listApply(this.filterQuery)
|
||||
.then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
this.detailList = []
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
handleDetail(row) {
|
||||
let query = {orderIdFk: row.id};
|
||||
this.detailLoading = true;
|
||||
listApplyDetail(query) //查找该单号下的所有条码
|
||||
.then((response) => {
|
||||
this.detailList = response.data.list || [];
|
||||
this.detailLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.detailLoading = false;
|
||||
this.detailList = [];
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
if (this.formName == 'add') {
|
||||
this.isChang = !this.isChang
|
||||
} else {
|
||||
this.newSpDistributionVisible = false
|
||||
}
|
||||
},
|
||||
submitOrder(row) {
|
||||
this.loading = true;
|
||||
let tQuery = {
|
||||
editStatus: 2,
|
||||
purApplyEntity: row,
|
||||
}
|
||||
inserThrOrderWeb(tQuery)
|
||||
.then(response => {
|
||||
this.loading = false;
|
||||
if (response.code === 20000) {
|
||||
this.$message.success("提交成功!");
|
||||
this.getList();
|
||||
},
|
||||
hideSearch() {
|
||||
this.showSearch = !this.showSearch;
|
||||
},
|
||||
getList() {
|
||||
if (this.actDateRange != null) {
|
||||
this.filterQuery.startDate = this.actDateRange[0];
|
||||
this.filterQuery.endDate = this.actDateRange[1];
|
||||
} else {
|
||||
this.filterQuery.startDate = null;
|
||||
this.filterQuery.endDate = null;
|
||||
}
|
||||
this.loading = true;
|
||||
console.log(this.filterQuery)
|
||||
listApply(this.filterQuery)
|
||||
.then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
this.detailList=[]
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
handleDetail(row) {
|
||||
let query = {orderIdFk: row.id};
|
||||
this.detailLoading = true;
|
||||
listApplyDetail(query) //查找该单号下的所有条码
|
||||
.then((response) => {
|
||||
this.detailList = response.data.list || [];
|
||||
this.detailLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.detailLoading = false;
|
||||
this.detailList = [];
|
||||
});
|
||||
},
|
||||
handleClose(){
|
||||
if( this.formName=='add'){
|
||||
this.isChang=!this.isChang
|
||||
}else{
|
||||
this.newSpDistributionVisible=false
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
},
|
||||
submitOrder(row) {
|
||||
this.loading = true;
|
||||
let tQuery = {
|
||||
editStatus: 2,
|
||||
purApplyEntity: row,
|
||||
}
|
||||
inserThrOrderWeb(tQuery)
|
||||
.then(response => {
|
||||
this.loading = false;
|
||||
if (response.code === 20000) {
|
||||
this.$message.success("提交成功!");
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
deleteDialog(row) {
|
||||
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
deleteDialog(row) {
|
||||
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
delApply(row.id)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
delApply(row.id)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val.page;
|
||||
this.getList();
|
||||
},
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
closeDialog() {
|
||||
this.newSpDistributionVisible = false;
|
||||
this.getList();
|
||||
this.detailList = [];
|
||||
},
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val.page;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
closeDialog() {
|
||||
this.newSpDistributionVisible = false;
|
||||
this.getList();
|
||||
this.detailList = [];
|
||||
},
|
||||
|
||||
newDistributionForm(index, row) {
|
||||
this.idQuery.id = '';
|
||||
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
|
||||
this.idQuery.id = row.id;
|
||||
this.idQuery.formData = row;
|
||||
this.formName = "update";
|
||||
} else
|
||||
this.formName = "add";
|
||||
this.newSpDistributionVisible = true;
|
||||
},
|
||||
getInvList() {
|
||||
var query={
|
||||
parentId:this.filterQuery.targetDeptCode
|
||||
}
|
||||
this.filterQuery.targetInvCode = null
|
||||
this.$forceUpdate()
|
||||
filterSubAll(query).then((res) => {
|
||||
this.invList = res.data || [];
|
||||
})
|
||||
},
|
||||
getDeptList() {
|
||||
getDeptListByUser().then((res) => {
|
||||
this.deptList = res.data || [];
|
||||
if(this.deptList.length>0){
|
||||
this.filterQuery.targetDeptCode=this.deptList[0].code
|
||||
this.invCodebe=this.filterQuery.targetDeptCode
|
||||
}
|
||||
this.getList();
|
||||
this. getInvList();
|
||||
});
|
||||
},
|
||||
initActDateRange(){
|
||||
|
||||
let end = new Date();
|
||||
let start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
this.actDateRange = [start, end];
|
||||
newDistributionForm(index, row) {
|
||||
this.idQuery.id = '';
|
||||
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
|
||||
this.idQuery.id = row.id;
|
||||
this.idQuery.formData = row;
|
||||
this.formName = "update";
|
||||
} else
|
||||
this.formName = "add";
|
||||
this.newSpDistributionVisible = true;
|
||||
},
|
||||
getInvList() {
|
||||
var query = {
|
||||
parentId: this.filterQuery.targetDeptCode,
|
||||
spUse: true,
|
||||
}
|
||||
this.filterQuery.targetInvCode = null
|
||||
this.$forceUpdate()
|
||||
filterGroupBySpuse(query).then((res) => {
|
||||
this.invList = res.data || [];
|
||||
})
|
||||
},
|
||||
getDeptList() {
|
||||
let query = {
|
||||
spUse: true,
|
||||
};
|
||||
filterDepts(query).then((res) => {
|
||||
this.deptList = res.data || [];
|
||||
if (this.deptList.length > 0) {
|
||||
this.filterQuery.targetDeptCode = this.deptList[0].code
|
||||
this.invCodebe = this.filterQuery.targetDeptCode
|
||||
}
|
||||
this.getList();
|
||||
this.getInvList();
|
||||
});
|
||||
},
|
||||
initActDateRange() {
|
||||
|
||||
let end = new Date();
|
||||
let start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
this.actDateRange = [start, end];
|
||||
}
|
||||
,
|
||||
components: {
|
||||
pureApplyEdit,
|
||||
}
|
||||
,
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
1: "warning",
|
||||
2: "success",
|
||||
};
|
||||
return statusMap[status];
|
||||
}
|
||||
,
|
||||
}
|
||||
,
|
||||
mounted() {
|
||||
}
|
||||
,
|
||||
created() {
|
||||
this.initActDateRange()
|
||||
this.getDeptList();
|
||||
|
||||
}
|
||||
,
|
||||
components: {
|
||||
pureApplyEdit,
|
||||
}
|
||||
,
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
1: "warning",
|
||||
2: "success",
|
||||
};
|
||||
return statusMap[status];
|
||||
}
|
||||
,
|
||||
}
|
||||
,
|
||||
mounted() {
|
||||
}
|
||||
,
|
||||
created() {
|
||||
this.initActDateRange()
|
||||
this.getDeptList();
|
||||
}
|
||||
,
|
||||
}
|
||||
;
|
||||
</script>
|
||||
<style scoped>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 25%;
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
.query-form-item {
|
||||
display: block !important;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
display: block !important;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
flex-wrap: wrap;
|
||||
border-radius: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
||||
|
||||
|