|
@@ -25,38 +25,66 @@
|
|
|
<template #table-header="{}">
|
|
|
<div style="width: 100%">
|
|
|
<el-row style="padding: 0 0 0 80px">
|
|
|
- <el-col :span="4" style="width: 360px; padding: 0 10px 0 0px">
|
|
|
+ <el-col :span="4" style="width: 460px; padding: 0 5px 0 0px;display:flex">
|
|
|
+ <el-dropdown>
|
|
|
+ <el-button style="margin-right:10px" size="mini">{{currentTimer.label}}</el-button>
|
|
|
+ <template #dropdown>
|
|
|
+ <el-dropdown-menu>
|
|
|
+ <el-dropdown-item v-for="timer in timerMap" :key="timer.value">
|
|
|
+ <p @click="currentTimer = timer;searchList()">{{timer.label}}</p>
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </template>
|
|
|
+ </el-dropdown>
|
|
|
+
|
|
|
<period-date-picker
|
|
|
- :start="parmValue.create_start"
|
|
|
- :end="parmValue.create_end"
|
|
|
+ :start="start"
|
|
|
+ :end="end"
|
|
|
:width="'164px'"
|
|
|
:size="searchSize"
|
|
|
@timeReturned="handleTime"
|
|
|
- placeholder="创建"
|
|
|
/>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="3" style="margin-right:10px">
|
|
|
- <el-input
|
|
|
+ <el-col :span="4" style="width: 150px;margin-right:10px">
|
|
|
+ <el-select
|
|
|
+ :size="searchSize"
|
|
|
+ v-model="parmValue.status"
|
|
|
clearable
|
|
|
- v-model="parmValue.reqCode" size="mini" placeholder="需求订单编号" style="width:100%"
|
|
|
+ placeholder="状态"
|
|
|
@change="
|
|
|
pageInfo.curr = 1;
|
|
|
parmValue.page = 1;
|
|
|
- searchList();"
|
|
|
- />
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in statusList"
|
|
|
+ :key="item.ids"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="4">
|
|
|
- <el-input
|
|
|
- style="width:101%"
|
|
|
- size="mini"
|
|
|
- placeholder="发票申请编号"
|
|
|
+ <el-col :span="4" style="margin-right:10px">
|
|
|
+ <el-select
|
|
|
+ v-model="parmValue.invoice_type"
|
|
|
clearable
|
|
|
- v-model="parmValue.invNo"
|
|
|
+ size="mini"
|
|
|
+ placeholder="发票类型"
|
|
|
+ style="width:100%"
|
|
|
@change="pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();" />
|
|
|
+ parmValue.page = 1;
|
|
|
+ searchList();"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="type in invoiceTypeList"
|
|
|
+ :key="type.value"
|
|
|
+ :value="type.value"
|
|
|
+ :label="type.label"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="3" style="width: 66px; float: right">
|
|
@@ -65,56 +93,44 @@
|
|
|
type="primary"
|
|
|
style="float: right; margin-left: 5px"
|
|
|
@click="searchList"
|
|
|
- >
|
|
|
- 刷新
|
|
|
- </el-button>
|
|
|
+ >刷新</el-button>
|
|
|
</el-col>
|
|
|
-
|
|
|
<el-col :span="4" class="fr" style="width: 66px">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- class="fr"
|
|
|
- :size="searchSize"
|
|
|
- @click="restSearch"
|
|
|
- >
|
|
|
- 重置
|
|
|
- </el-button>
|
|
|
+ <el-button type="warning" class="fr" :size="searchSize" @click="restSearch">重置</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
<el-row style="margin-top:10px">
|
|
|
- <el-col :span="4" style="width: 360px; padding: 0 10px 0 0px">
|
|
|
- <period-date-picker
|
|
|
- :start="parmValue.open_start"
|
|
|
- :end="parmValue.open_end"
|
|
|
- :width="'164px'"
|
|
|
- :size="searchSize"
|
|
|
- @timeReturned="() => handleTime(true)"
|
|
|
- placeholder="开票"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="4">
|
|
|
- <el-input
|
|
|
- size="mini"
|
|
|
- placeholder="发票代码"
|
|
|
- v-model="parmValue.invoiceCode"
|
|
|
+ <el-col :span="8" style="margin-right:10px">
|
|
|
+ <el-input
|
|
|
+ size="mini"
|
|
|
+ v-model="queryValue"
|
|
|
+ clearable
|
|
|
@change="
|
|
|
pageInfo.curr = 1;
|
|
|
parmValue.page = 1;
|
|
|
- searchList();" />
|
|
|
- </el-col>
|
|
|
-
|
|
|
- <el-col :span="4" style="padding-left:10px">
|
|
|
- <el-input
|
|
|
- size="mini"
|
|
|
- placeholder="发票号码"
|
|
|
- v-model="parmValue.invoiceNum"
|
|
|
- @change="
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <template #prepend>
|
|
|
+ <el-select
|
|
|
+ style="width:130px"
|
|
|
+ v-model="qureyKey"
|
|
|
+ @change="
|
|
|
pageInfo.curr = 1;
|
|
|
parmValue.page = 1;
|
|
|
- searchList();"
|
|
|
- />
|
|
|
+ searchList();
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="queryKey in queryMap"
|
|
|
+ :key="queryKey.value"
|
|
|
+ :value="queryKey.value"
|
|
|
+ :label="queryKey.label"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="3" style="width:115px;float: right">
|
|
@@ -123,9 +139,7 @@
|
|
|
type="primary"
|
|
|
style="float: right; margin-left: 5px"
|
|
|
@click="download"
|
|
|
- >
|
|
|
- 下载发票数据
|
|
|
- </el-button>
|
|
|
+ >下载发票数据</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="4" class="fr" style="width: 66px">
|
|
|
<el-button
|
|
@@ -133,88 +147,48 @@
|
|
|
class="fr"
|
|
|
:size="searchSize"
|
|
|
@click="onBatchApprovalInvoice"
|
|
|
- >
|
|
|
- 批量审核发票
|
|
|
- </el-button>
|
|
|
+ >批量审核发票</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <el-row style="margin-top: 10px">
|
|
|
- <el-col :span="4">
|
|
|
- <el-select
|
|
|
- style="width:100%"
|
|
|
- :size="searchSize"
|
|
|
- v-model="parmValue.status"
|
|
|
- clearable
|
|
|
- placeholder="状态"
|
|
|
- @change="
|
|
|
- pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();
|
|
|
- "
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in statusList"
|
|
|
- :key="item.ids"
|
|
|
- :label="item.label"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
+ <!-- <el-row style="margin-top:10px">
|
|
|
|
|
|
- <el-col :span="4" style="margin-left:10px">
|
|
|
- <el-select
|
|
|
- v-model="parmValue.invoice_type"
|
|
|
- size="mini"
|
|
|
- placeholder="发票类型"
|
|
|
- style="width:100%"
|
|
|
- clearable
|
|
|
- @change="pageInfo.curr = 1;
|
|
|
- parmValue.page = 1;
|
|
|
- searchList();"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="type in invoiceTypeList"
|
|
|
- :value="type.value"
|
|
|
- :label="type.label"
|
|
|
- :key="type.value" />
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
- <template #invType="{
|
|
|
- scope
|
|
|
- }">
|
|
|
- <el-tag size="mini">
|
|
|
- {{(openInvoiceTypeList.find(({value}) => value === scope.row.inv_type) || {}).label || '--'}}
|
|
|
- </el-tag>
|
|
|
+ <template #invType="{ scope }">
|
|
|
+ <el-tag
|
|
|
+ size="mini"
|
|
|
+ >{{(openInvoiceTypeList.find(({value}) => value === scope.row.inv_type) || {}).label || '--'}}</el-tag>
|
|
|
</template>
|
|
|
|
|
|
- <template #invoiceType="{
|
|
|
- scope
|
|
|
- }">
|
|
|
- <el-tag size="mini">
|
|
|
- {{(invoiceTypeList.find(({value}) => value === scope.row.invoiceType) || {}).label || '--'}}
|
|
|
- </el-tag>
|
|
|
+ <template #invoiceType="{ scope }">
|
|
|
+ <el-tag
|
|
|
+ size="mini"
|
|
|
+ >{{(invoiceTypeList.find(({value}) => value === scope.row.invoiceType) || {}).label || '--'}}</el-tag>
|
|
|
</template>
|
|
|
|
|
|
- <template #demandOrder="{
|
|
|
- scope
|
|
|
- }">{{
|
|
|
- scope.row.platformsettle ? scope.row.platformsettle.reqCode : ""
|
|
|
- }}</template>
|
|
|
+ <template #demandOrder="{scope}">
|
|
|
+ {{
|
|
|
+ (scope.row.orderinvoice || {}).reqCode || '--'
|
|
|
+ }}
|
|
|
+ </template>
|
|
|
|
|
|
- <template #status="{
|
|
|
- scope
|
|
|
- }">
|
|
|
+ <template #status="{ scope }">
|
|
|
<el-tag
|
|
|
:size="tablebtnSize"
|
|
|
- :type="(statusList.find((item) => item.id == scope.row.status) || {}).type || ''"
|
|
|
- v-text="(statusList.find((item) => item.id == scope.row.status) || {}) .label || '--'"
|
|
|
- ></el-tag>
|
|
|
+ :type="
|
|
|
+ (statusList.find(
|
|
|
+ (item) => item.id == scope.row.status) || {}
|
|
|
+ ).type || ''
|
|
|
+ "
|
|
|
+ v-text="
|
|
|
+ (statusList.find(
|
|
|
+ (item) => item.id == scope.row.status) || {}
|
|
|
+ ).label || '--'
|
|
|
+ "
|
|
|
+ />
|
|
|
</template>
|
|
|
|
|
|
<template #operation="{ scope }">
|
|
@@ -226,9 +200,8 @@
|
|
|
>
|
|
|
<i
|
|
|
class="el-icon-view tb-icon"
|
|
|
-
|
|
|
- @click="getRouter('bargainListDetail', scope.row.bargainNo )"
|
|
|
- ></i>
|
|
|
+ @click="getRouter('bargainListDetail', scope.row.bargainNo )"
|
|
|
+ />
|
|
|
</el-tooltip>
|
|
|
</template>
|
|
|
</ex-table>
|
|
@@ -241,14 +214,13 @@
|
|
|
import mixinPage from "@/mixins/elPaginationHandle";
|
|
|
import resToken from "@/mixins/resToken";
|
|
|
import asyncRequest from "@/apis/service/platformService/invoice";
|
|
|
-import companyHelper from "@/mixins/companyHelper"
|
|
|
+import companyHelper from "@/mixins/companyHelper";
|
|
|
import { listCol, statusList } from "./columns";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-import { invoiceTypeList, openInvoiceTypeList } from '@/assets/js/statusList';
|
|
|
-import InvoiceModal from "./components/invoice-modal.vue"
|
|
|
+import { invoiceTypeList, openInvoiceTypeList } from "@/assets/js/statusList";
|
|
|
+import InvoiceModal from "./components/invoice-modal.vue";
|
|
|
import urlConfig from "@/apis/url-config";
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* @props
|
|
|
create_start 创建开始时间
|
|
@@ -264,29 +236,41 @@ import urlConfig from "@/apis/url-config";
|
|
|
invNo 发票申请编号
|
|
|
*/
|
|
|
|
|
|
-
|
|
|
export default {
|
|
|
name: "bargainList",
|
|
|
mixins: [mixinPage, resToken, companyHelper],
|
|
|
- components:{InvoiceModal},
|
|
|
+ components: { InvoiceModal },
|
|
|
computed: {
|
|
|
...mapGetters(["tablebtnSize", "searchSize", "size"]),
|
|
|
powers() {
|
|
|
const tran =
|
|
|
this.$store.getters.btnList.find(
|
|
|
- (item) => item.menu_route == "invoice"
|
|
|
+ item => item.menu_route == "invoice"
|
|
|
) || {};
|
|
|
const { action } = tran ?? {};
|
|
|
return action ?? [];
|
|
|
- },
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- selected:[],
|
|
|
+ qureyKey: "reqCode",
|
|
|
+ queryValue: "",
|
|
|
+ queryMap: [
|
|
|
+ { value: "reqCode", label: "需求订单编号" },
|
|
|
+ { value: "inv_code", label: "开票申请编号" },
|
|
|
+ { value: "invoiceNum", label: "发票号码" },
|
|
|
+ { value: "invoiceCode", label: "发票代码" }
|
|
|
+ ],
|
|
|
+ currentTimer: { value: "create", label: "创建日期" },
|
|
|
+ timerMap: [
|
|
|
+ { value: "create", label: "创建日期" },
|
|
|
+ { value: "open", label: "开票日期" }
|
|
|
+ ],
|
|
|
+ start: "",
|
|
|
+ end: "",
|
|
|
+ selected: [],
|
|
|
select: "1",
|
|
|
s_input: "",
|
|
|
- //全局url
|
|
|
- fileUrl: urlConfig.baseURL,
|
|
|
invoiceTypeList,
|
|
|
openInvoiceTypeList,
|
|
|
customerCode: [], //客户公司code
|
|
@@ -296,20 +280,22 @@ export default {
|
|
|
visible: false,
|
|
|
isDetail: false,
|
|
|
modelId: 0,
|
|
|
+ //全局url
|
|
|
+ fileUrl: urlConfig.baseURL,
|
|
|
parmValue: {
|
|
|
- create_start:"", // 创建开始时间
|
|
|
- create_end:"", // 创建结束时间
|
|
|
- open_start:"", // 开票开始时间
|
|
|
- open_end:"", // 开票结束时间
|
|
|
- supplier:"", // 供应商企业
|
|
|
- reqCode:"", // 需求订单编号
|
|
|
- status:"", // 发票状态
|
|
|
- invoiceCode:"", // 发票代码,
|
|
|
- invoiceNum:"", // 发票号码,
|
|
|
- invoice_type:"", // 发票类型
|
|
|
- invNo:"", // 发票申请编号
|
|
|
+ create_start: "", // 创建开始时间
|
|
|
+ create_end: "", // 创建结束时间
|
|
|
+ open_start: "", // 开票开始时间
|
|
|
+ open_end: "", // 开票结束时间
|
|
|
+ supplier: "", // 供应商企业
|
|
|
+ reqCode: "", // 需求订单编号
|
|
|
+ status: "", // 发票状态
|
|
|
+ invoiceCode: "", // 发票代码,
|
|
|
+ invoiceNum: "", // 发票号码,
|
|
|
+ invoice_type: "", // 发票类型
|
|
|
+ invNo: "", // 发票申请编号
|
|
|
page: 1, // 页码
|
|
|
- size: 15, // 每页显示条数
|
|
|
+ size: 15 // 每页显示条数
|
|
|
},
|
|
|
// 表格 - 数据
|
|
|
tableData: [],
|
|
@@ -317,56 +303,52 @@ export default {
|
|
|
table: {
|
|
|
stripe: true,
|
|
|
border: true,
|
|
|
- _defaultHeader_: ["setcol"],
|
|
|
+ _defaultHeader_: ["setcol"]
|
|
|
},
|
|
|
// 表格 - 分页
|
|
|
pageInfo: {
|
|
|
size: 15,
|
|
|
curr: 1,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
},
|
|
|
-
|
|
|
// 表格 - 列参数
|
|
|
columns: listCol,
|
|
|
-
|
|
|
- resultValue: "", // 处理结果
|
|
|
+ resultValue: "" //处理结果
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
const { back } = this.$route.query;
|
|
|
if (back) {
|
|
|
this.parmValue = JSON.parse(back);
|
|
|
- console.log(this.parmValue)
|
|
|
- const {page,size}=this.parmValue;
|
|
|
- this.pageInfo= {
|
|
|
+ console.log(this.parmValue);
|
|
|
+ const { page, size } = this.parmValue;
|
|
|
+ this.pageInfo = {
|
|
|
size: size,
|
|
|
curr: page,
|
|
|
- total: 0,
|
|
|
- }
|
|
|
+ total: 0
|
|
|
+ };
|
|
|
//多选条件
|
|
|
- this.select = this.parmValue.select;
|
|
|
- // this.sselect = this.parmValue.sselect;
|
|
|
- this.s_input = this.parmValue.s_input
|
|
|
-
|
|
|
- }else{
|
|
|
- this.select = "1";
|
|
|
+ this.select = this.parmValue.select;
|
|
|
+ // this.sselect = this.parmValue.sselect;
|
|
|
+ this.s_input = this.parmValue.s_input;
|
|
|
+ } else {
|
|
|
+ this.select = "1";
|
|
|
// this.sselect = "创建时间"
|
|
|
}
|
|
|
this.searchList();
|
|
|
},
|
|
|
methods: {
|
|
|
- async handleBatchApprovalInvoice(data){
|
|
|
-
|
|
|
+ async handleBatchApprovalInvoice(data) {
|
|
|
const { code } = await asyncRequest.batch({
|
|
|
- idArr:this.selected.map(({id}) => id),
|
|
|
+ idArr: this.selected.map(({ id }) => id),
|
|
|
...data
|
|
|
- })
|
|
|
+ });
|
|
|
|
|
|
- if(code !== 1) return
|
|
|
- this.visible = false
|
|
|
- this.searchList()
|
|
|
+ if (code !== 1) return;
|
|
|
+ this.visible = false;
|
|
|
+ this.searchList();
|
|
|
},
|
|
|
- async download() {
|
|
|
+ async download() {
|
|
|
let model = JSON.parse(JSON.stringify(this.parmValue));
|
|
|
if (!this.loading) {
|
|
|
this.loading = true;
|
|
@@ -379,14 +361,14 @@ export default {
|
|
|
headers: {
|
|
|
// 'Content-Type': 'multipart/form-data',
|
|
|
// Accept: "application/vnd.ms-excel"
|
|
|
- Accept: httpType,
|
|
|
- },
|
|
|
+ Accept: httpType
|
|
|
+ }
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res && res.status == 200 && res.data) {
|
|
|
let url = window.URL.createObjectURL(
|
|
|
new Blob([res.data], {
|
|
|
- type: httpType,
|
|
|
+ type: httpType
|
|
|
})
|
|
|
);
|
|
|
let link = document.createElement("a");
|
|
@@ -409,64 +391,51 @@ export default {
|
|
|
}, 500);
|
|
|
}
|
|
|
})
|
|
|
- .catch((error) => {
|
|
|
+ .catch(error => {
|
|
|
console.log(error);
|
|
|
this.loading = false;
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- onBatchApprovalInvoice(){
|
|
|
- if(this.selected.length === 0){
|
|
|
- this.$message.warning('至少选择一张状态为 "待确认" 的发票申请')
|
|
|
- return
|
|
|
+ onBatchApprovalInvoice() {
|
|
|
+ if (this.selected.length === 0) {
|
|
|
+ this.$message.warning('至少选择一个状态为 "待确认" 的发票申请');
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
- const isOK = this.selected.every(({status}) => String(status) === "1")
|
|
|
+ const isOK = this.selected.every(({ status }) => String(status) === "1");
|
|
|
|
|
|
- if(!isOK){
|
|
|
- this.$message.warning('请选择状态为 "待确认" 的发票申请')
|
|
|
- return
|
|
|
+ if (!isOK) {
|
|
|
+ this.$message.warning('请选择状态为 "待确认" 的发票申请');
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- this.visible = true
|
|
|
+ this.visible = true;
|
|
|
// console.log(this.selected)
|
|
|
},
|
|
|
- downloadInvoice(){
|
|
|
- if(this.selected.length === 0){
|
|
|
- this.$message.warning('至少选择一个发票申请')
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- const ids = this.selected.map(
|
|
|
- ({id}) => id
|
|
|
- )
|
|
|
- },
|
|
|
handleSelectionChange(list) {
|
|
|
- this.selected = list
|
|
|
+ console.log(list);
|
|
|
+ this.selected = list;
|
|
|
},
|
|
|
- getRouter(toRouter, queryId){
|
|
|
+ getRouter(toRouter, queryId) {
|
|
|
if (toRouter && queryId) {
|
|
|
let model = {
|
|
|
id: queryId,
|
|
|
- type: 'view',
|
|
|
+ type: "view"
|
|
|
};
|
|
|
|
|
|
//有多选框的条件
|
|
|
- this.parmValue.select = this.select ;
|
|
|
+ this.parmValue.select = this.select;
|
|
|
// this.parmValue.sselect = this.sselect ;
|
|
|
- this.parmValue.s_input= this.s_input;
|
|
|
+ this.parmValue.s_input = this.s_input;
|
|
|
//
|
|
|
- let routerModel = {
|
|
|
+ let routerModel = {
|
|
|
options: JSON.parse(JSON.stringify(this.parmValue)),
|
|
|
- router: this.$route.path,
|
|
|
+ router: this.$route.path
|
|
|
};
|
|
|
model.preModel = JSON.stringify(routerModel);
|
|
|
|
|
|
- this.routeGoto(
|
|
|
- toRouter,
|
|
|
- model
|
|
|
- );
|
|
|
+ this.routeGoto(toRouter, model);
|
|
|
} else {
|
|
|
this.$message.warning("暂未找到相关流程!");
|
|
|
}
|
|
@@ -475,12 +444,16 @@ export default {
|
|
|
this.customerCode = [];
|
|
|
this.select = "1";
|
|
|
this.s_input = "";
|
|
|
+ this.queryValue = "";
|
|
|
+ this.start = "";
|
|
|
+ this.end = "";
|
|
|
+
|
|
|
this.parmValue = {
|
|
|
- create_start:"", // 创建开始时间
|
|
|
- create_end:"", // 创建结束时间
|
|
|
- open_start:"", // 开票开始时间
|
|
|
- open_end:"", // 开票结束时间
|
|
|
- supplier:"", // 供应商企业
|
|
|
+ create_start: "", // 创建开始时间
|
|
|
+ create_end: "", // 创建结束时间
|
|
|
+ open_start: "", // 开票开始时间
|
|
|
+ open_end: "", // 开票结束时间
|
|
|
+ supplier: "", // 供应商企业
|
|
|
reqCode: "", // 需求订单编号
|
|
|
status: "", // 发票状态
|
|
|
invoiceCode: "", // 发票代码,
|
|
@@ -488,13 +461,13 @@ export default {
|
|
|
invoice_type: "", // 发票类型
|
|
|
invNo: "", // 发票申请编号
|
|
|
page: 1, // 页码
|
|
|
- size: 15, // 每页显示条数
|
|
|
- }
|
|
|
+ size: 15 // 每页显示条数
|
|
|
+ };
|
|
|
// 表格 - 分页
|
|
|
this.pageInfo = {
|
|
|
size: 15,
|
|
|
curr: 1,
|
|
|
- total: 0,
|
|
|
+ total: 0
|
|
|
};
|
|
|
this.searchList();
|
|
|
},
|
|
@@ -505,34 +478,26 @@ export default {
|
|
|
this.isDetail = isDetail;
|
|
|
this.sitem = sitem;
|
|
|
},
|
|
|
- async deleteById(id, status) {
|
|
|
- await this.$confirm("确定要删除?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- }).then(async () => {
|
|
|
- const model = {
|
|
|
- id: id,
|
|
|
- status: status + '' === "1" ? "0" : "1",
|
|
|
- };
|
|
|
- const res = await asyncRequest.status(model);
|
|
|
- if (res && res.code === 1) {
|
|
|
- this.$notify.success({
|
|
|
- title: "删除成功",
|
|
|
- message: "",
|
|
|
- });
|
|
|
- this.searchList();
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- console.log("取消");
|
|
|
- });
|
|
|
- },
|
|
|
// 列表搜索
|
|
|
async searchList() {
|
|
|
+ const startProp = this.currentTimer.value + "_start";
|
|
|
+ const endProp = this.currentTimer.value + "_end";
|
|
|
+
|
|
|
+ if (
|
|
|
+ (this.start !== "" && this.end === "") ||
|
|
|
+ (this.start === "" && this.end !== "")
|
|
|
+ ) {
|
|
|
+ this.$message.warning("时间区间不完整!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
this.loading = true;
|
|
|
+
|
|
|
const res = await asyncRequest.list({
|
|
|
...this.parmValue,
|
|
|
+ [this.qureyKey]: this.queryValue,
|
|
|
+ [startProp]: this.start,
|
|
|
+ [endProp]: this.end,
|
|
|
inv_type: "2"
|
|
|
});
|
|
|
|
|
@@ -547,48 +512,50 @@ export default {
|
|
|
},
|
|
|
|
|
|
async statusConfirm(id, status) {
|
|
|
- let str = status + '' === "1" ? "禁用" : "启用";
|
|
|
+ let str = status + "" === "1" ? "禁用" : "启用";
|
|
|
await this.$confirm("确定要改为" + str + "?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ type: "warning"
|
|
|
})
|
|
|
.then(async () => {
|
|
|
this.loading = true;
|
|
|
const model = {
|
|
|
id: id,
|
|
|
- status: status + '' === "1" ? "0" : "1",
|
|
|
+ status: status + "" === "1" ? "0" : "1"
|
|
|
};
|
|
|
const res = await asyncRequest.status(model);
|
|
|
if (res && res.code === 0) {
|
|
|
this.loading = false;
|
|
|
this.$notify.success({
|
|
|
title: "状态修改成功!",
|
|
|
- message: "",
|
|
|
+ message: ""
|
|
|
});
|
|
|
await this.searchList();
|
|
|
- }
|
|
|
+ } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ await this.logout();
|
|
|
+ } else {
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
})
|
|
|
.catch(() => {
|
|
|
console.log("取消");
|
|
|
});
|
|
|
},
|
|
|
// 时间选择事件
|
|
|
- async handleTime(e,isOpen = false) {
|
|
|
- const startProp = isOpen ? "open_start" :"create_start"
|
|
|
- const endProp = isOpen ? "open_end" : "create_end"
|
|
|
-
|
|
|
+ async handleTime(e) {
|
|
|
if (e.startTime !== "") {
|
|
|
- this.parmValue[startProp] = e.startTime;
|
|
|
+ this.start = e.startTime;
|
|
|
} else {
|
|
|
- this.parmValue[startProp] = "";
|
|
|
+ this.start = "";
|
|
|
}
|
|
|
if (e.endTime !== "") {
|
|
|
- this.parmValue[endProp] = e.endTime;
|
|
|
+ this.end = e.endTime;
|
|
|
} else {
|
|
|
- this.parmValue[endProp] = "";
|
|
|
+ this.end = "";
|
|
|
}
|
|
|
- if (this.parmValue[startProp] !== "" && this.parmValue[endProp] !== "") {
|
|
|
+
|
|
|
+ if (this.start !== "" && this.end !== "") {
|
|
|
this.pageInfo.curr = 1;
|
|
|
this.parmValue.page = 1;
|
|
|
await this.searchList();
|
|
@@ -601,8 +568,8 @@ export default {
|
|
|
this.pageInfo.curr = 1;
|
|
|
this.parmValue.page = 1;
|
|
|
await this.searchList();
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|