发票结算申请
This commit is contained in:
@@ -1,5 +1,16 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询供应商
|
||||||
|
export function searchSupplier() {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '采购管理_供应商_查询数据_根据条件'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 根据条件查发票结算申请单
|
// 根据条件查发票结算申请单
|
||||||
export function searchTable1(...group) {
|
export function searchTable1(...group) {
|
||||||
return request({
|
return request({
|
||||||
@@ -61,51 +72,75 @@ export function searchTable2(num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 入库单查询
|
// 根据供应商查询采购合同
|
||||||
export function searchInboundCard(data1, data2) {
|
export function searchPurchase(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '库存管理_采购入库单_入库单查询',
|
name: '采购管理_采购合同_查询数据',
|
||||||
param: '入库单号_check=' + data1 + '&入库单号=' + data2
|
param: '供应商流水号_check=1&供应商流水号=' + data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 入库单明细查询
|
// 根据供应商查询离线合同
|
||||||
export function searchInboundCardDetail(data1) {
|
export function searchOffline(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '库存管理_采购入库单_入库单明细_查询数据',
|
name: '采购管理_离线合同_查询数据',
|
||||||
param: '采购入库单流水号=' + data1
|
param: '供应商流水号_check=1&供应商流水号=' + data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 发票结算申请单明细增加
|
// 查询采购合同明细
|
||||||
export function addTable2(data, group) {
|
export function searchPurchaseDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '采购管理_采购合同明细_查询数据',
|
||||||
|
param: '采购合同流水号=' + data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询离线合同明细
|
||||||
|
export function searchOfflineDetail(data) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '采购管理_离线合同明细_查询数据',
|
||||||
|
param: '离线合同流水号=' + data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 发票结算申请单明细增加-1采购/2离线
|
||||||
|
export function addTable2(data, group1, group2, type) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '采购管理_发票结算申请单明细_增加数据',
|
name: '采购管理_发票结算申请单明细_增加数据',
|
||||||
param: '发票结算申请单流水号=' + data + '&采购入库单流水号组=' + group
|
param: '发票结算申请单流水号=' + data + '&合同明细流水号组=' + group1 + '&到票数量组=' + group2 + '&合同类型=' + type
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 发票结算申请单明细删除
|
// 发票结算申请单明细删除
|
||||||
export function deleteTable2(group) {
|
export function deleteTable2(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '采购管理_发票结算申请单明细_删除数据',
|
name: '采购管理_发票结算申请单明细_删除数据',
|
||||||
param: '发票结算申请单明细流水号组=' + group
|
param: '发票结算申请单明细流水号=' + data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const service = axios.create({
|
|||||||
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||||
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
|
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
|
||||||
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
|
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
|
||||||
timeout: 1500000 // 请求超时时间git
|
timeout: 1500000 // 请求超时时间
|
||||||
})
|
})
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<el-card>
|
<el-card>
|
||||||
<span>发票号:</span>
|
<span>发票号:</span>
|
||||||
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
|
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
|
||||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">创建</el-button>
|
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">创建</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<h4 style="margin-top: 5px">发票结算申请单</h4>
|
<h4 style="margin-top: 5px">发票结算申请单</h4>
|
||||||
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 400px;overflow:auto" size="mini" @row-click="searchTable2">
|
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 300px;overflow:auto" size="mini" @row-click="searchTable2">
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-form label-position="left" inline class="demo-table-expand">
|
<el-form label-position="left" inline class="demo-table-expand">
|
||||||
@@ -42,6 +42,11 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="供应商" align="center" min-width="200">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.供应商名称 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="发票号" align="center" min-width="90">
|
<el-table-column label="发票号" align="center" min-width="90">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.发票号 }}
|
{{ scope.row.发票号 }}
|
||||||
@@ -72,7 +77,7 @@
|
|||||||
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="生产审批" align="center" min-width="60">
|
<el-table-column label="财务审批" align="center" min-width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
||||||
</template>
|
</template>
|
||||||
@@ -82,7 +87,7 @@
|
|||||||
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
|
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="财务审批" align="center" min-width="60">
|
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||||
</template>
|
</template>
|
||||||
@@ -92,16 +97,6 @@
|
|||||||
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总经理审批" align="center" min-width="70">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="审批时间" align="center" min-width="110">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.审批4时间 ? scope.row.审批4时间 : '—' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" width="300">
|
<el-table-column label="操作" align="center" width="300">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||||
@@ -124,114 +119,49 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">采购入库单</h4>
|
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">发票结算申请单明细</h4>
|
||||||
<span>发票号:</span>
|
<span>发票号:</span>
|
||||||
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
||||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreOrder()">追加入库单</el-button>
|
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
|
||||||
<el-button :disabled="group2.length === 0" type="danger" size="small" icon="el-icon-delete" style="margin-left:10px" @click="deleteTable2()">移除入库单</el-button>
|
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||||
<el-table ref="multipleTable" :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable3" @selection-change="handleSelectionChange2">
|
<el-table-column label="名称" align="center" min-width="100">
|
||||||
<el-table-column type="selection" align="center" width="35"/>
|
|
||||||
<el-table-column label="入库单号" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.入库单号 }}
|
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="入库日期" align="center" min-width="100">
|
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
|
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="仓库" align="center" min-width="100">
|
<el-table-column label="规格" align="center" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.仓库 }}
|
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="供应商" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.供应商名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合同编号" align="center" min-width="100">
|
<el-table-column label="合同编号" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.合同编号 }}
|
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合同名称" align="center" min-width="100">
|
<el-table-column label="合同名称" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.合同名称 }}
|
{{ scope.row.采购合同名称 || scope.row.离线合同名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="到货日期" align="center" min-width="100">
|
<el-table-column label="到票数量" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
|
{{ scope.row.到票数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="业务号" align="center" min-width="100">
|
<el-table-column label="操作" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.业务号 }}
|
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteTable2(scope.row)">删除</el-button>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="供应商" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.供应商 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="业务员" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.业务员 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="业务类型" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.业务类型 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="采购类型" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.采购类型 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="入库类型" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.入库类型 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="备注" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.备注 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<h4>采购入库单明细</h4>
|
|
||||||
<el-table :data="tableData3" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
|
||||||
<el-table-column label="名称" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.名称 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="物料型号" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.型号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="物料规格" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.规格 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="零件图号" align="center" min-width="130">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.图号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="数量" align="center" min-width="100" prop="数量">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.数量 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="本币单价" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.本币单价 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="本币金额" align="center" min-width="100" prop="sum">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -253,8 +183,14 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="已付款项">
|
<el-form-item label="供应商" prop="supplierValue">
|
||||||
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
|
<el-select v-model="form1.supplierValue" placeholder="供应商" filterable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in supplier"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -270,15 +206,22 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否费用类">
|
<el-form-item label="已付款项">
|
||||||
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
|
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item label="备注">
|
<el-col :span="12">
|
||||||
<el-input v-model="form1.remark" size="small" placeholder="备注" style="width: 500px"/>
|
<el-form-item label="是否费用类">
|
||||||
|
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
|
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
|
||||||
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
|
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
|
||||||
<el-upload
|
<el-upload
|
||||||
@@ -289,7 +232,7 @@
|
|||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
:on-exceed="warningExceed"
|
:on-exceed="warningExceed"
|
||||||
:limit="limit"
|
:limit="limit"
|
||||||
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
|
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
|
||||||
list-type="picture-card">
|
list-type="picture-card">
|
||||||
<i class="el-icon-plus"/>
|
<i class="el-icon-plus"/>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@@ -304,119 +247,77 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
|
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
|
||||||
<span>入库单号:</span>
|
<span>供应商:</span>
|
||||||
<el-input v-model="inboundCardNumber" clearable size="small" style="width:200px" />
|
<el-input v-model="supplierName" size="small" placeholder="请选择供应商发票" style="margin: 0 5px 10px 0;" readonly/>
|
||||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 10px 10px" @click="searchInboundCard()">查询</el-button>
|
<el-radio-group v-model="contractType" size="small" @change="searchTable01()">
|
||||||
<el-table ref="multipleTable" :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02" @selection-change="handleSelectionChange">
|
<el-radio label="采购合同" border/>
|
||||||
<el-table-column type="selection" align="center" width="35"/>
|
<el-radio label="离线合同" border/>
|
||||||
<el-table-column label="入库单号" align="center" min-width="100">
|
</el-radio-group>
|
||||||
<template slot-scope="scope">
|
<el-table :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02">
|
||||||
{{ scope.row.入库单号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="入库日期" align="center" width="100" >
|
|
||||||
<template slot-scope="scope" value-format="yyyy-MM-dd">
|
|
||||||
{{ scope.row.入库日期 ? scope.row.入库日期.split(' ')[0] : '—' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="仓库" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.仓库名称 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="合同编号" align="center" min-width="150">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.采购合同编号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="到货单号" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.到货单号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="到货日期" align="center" width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.到货日期 ? scope.row.到货日期.split(' ')[0] : '—' }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="供应商" align="center" min-width="200">
|
<el-table-column label="供应商" align="center" min-width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.供应商名称 }}
|
{{ scope.row.供应商名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="业务员" align="center" min-width="70">
|
<el-table-column label="合同编号" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.姓名 }}
|
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="业务类型" align="center" min-width="100">
|
<el-table-column label="合同名称" align="center" min-width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.业务类型 }}
|
{{ scope.row.采购合同名称 ? scope.row.采购合同名称 : scope.row.离线合同名称 }}
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="采购类型" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.采购类型 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="入库类别" align="center" min-width="80">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.入库类别 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="备注" align="center" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.备注 }}
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
<el-table ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||||
<el-table-column label="名称" align="center" min-width="100">
|
<el-table-column type="selection" align="center" width="35"/>
|
||||||
|
<el-table-column label="名称" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.名称 }}
|
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料型号" align="center" min-width="150">
|
<el-table-column label="图号或型号" align="center" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.型号 }}
|
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="物料规格" align="center" min-width="100">
|
<el-table-column label="规格" align="center" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.规格 }}
|
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="零件图号" align="center" min-width="130">
|
<el-table-column label="采购数量" align="center" width="80">
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.图号 }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="数量" align="center" width="100" prop="数量">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.数量 }}
|
{{ scope.row.数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="本币单价" align="center" width="100">
|
<el-table-column label="已到货数量" align="center" width="90">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.本币单价 }}
|
{{ scope.row.已到货数量 ? scope.row.已到货数量 : scope.row.到货数量 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="本币金额" align="center" width="100">
|
<el-table-column label="已到票数量" align="center" width="90">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.sum = scope.row.本币单价 * scope.row.数量 }}
|
{{ scope.row.到票数量 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="本次到票数量" align="center" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="scope.row.已到货数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
|
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
|
||||||
<el-button :disabled="group1.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
|
<el-button :disabled="group.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchInboundCard, searchInboundCardDetail,
|
import { searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
|
||||||
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
|
addTable2, deleteTable2 } from '@/api/PurchasingCenter/InvoiceSettlementApplication'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { uploadInvoiceScan, readFile } from '@/utils/request'
|
import { uploadInvoiceScan, readFile } from '@/utils/request'
|
||||||
@@ -425,6 +326,7 @@ export default {
|
|||||||
name: '', // 发票结算申请
|
name: '', // 发票结算申请
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
contractType: '采购合同',
|
||||||
invoiceNum: '',
|
invoiceNum: '',
|
||||||
total1: 0,
|
total1: 0,
|
||||||
pageCurrent1: 1,
|
pageCurrent1: 1,
|
||||||
@@ -435,12 +337,15 @@ export default {
|
|||||||
title2: '',
|
title2: '',
|
||||||
dialogVisible2: false,
|
dialogVisible2: false,
|
||||||
tableData2: [],
|
tableData2: [],
|
||||||
tableData3: [],
|
|
||||||
dialogVisible1: false,
|
dialogVisible1: false,
|
||||||
title1: '',
|
title1: '',
|
||||||
|
supplier: [],
|
||||||
|
supplierName: '',
|
||||||
|
supplierValue: '',
|
||||||
form1: {
|
form1: {
|
||||||
invoiceNum: '',
|
invoiceNum: '',
|
||||||
money: '',
|
money: '',
|
||||||
|
supplierValue: '',
|
||||||
paid: '',
|
paid: '',
|
||||||
unpaid: '',
|
unpaid: '',
|
||||||
tax: '',
|
tax: '',
|
||||||
@@ -454,6 +359,9 @@ export default {
|
|||||||
],
|
],
|
||||||
money: [
|
money: [
|
||||||
{ required: true, message: '请输入开票金额' }
|
{ required: true, message: '请输入开票金额' }
|
||||||
|
],
|
||||||
|
supplierValue: [
|
||||||
|
{ required: true, message: '请选择供应商' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
upload: uploadInvoiceScan,
|
upload: uploadInvoiceScan,
|
||||||
@@ -461,8 +369,7 @@ export default {
|
|||||||
tableData01: [],
|
tableData01: [],
|
||||||
tableData02: [],
|
tableData02: [],
|
||||||
inboundCardNumber: '', // 入库单号
|
inboundCardNumber: '', // 入库单号
|
||||||
group1: [], // 入库单流水号组
|
group: [] // 发票结算申请单明细流水号组
|
||||||
group2: [] // 发票结算申请单明细流水号组
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -477,13 +384,24 @@ export default {
|
|||||||
this.searchTable1()
|
this.searchTable1()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchData() {},
|
fetchData() {
|
||||||
|
this.supplier = []
|
||||||
|
searchSupplier().then(response => {
|
||||||
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
|
this.supplier.push({
|
||||||
|
label: response.data[i].供应商名称,
|
||||||
|
value: response.data[i].供应商流水号
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
createOrder() {
|
createOrder() {
|
||||||
if (this.$refs['form1'] !== undefined) {
|
if (this.$refs['form1'] !== undefined) {
|
||||||
this.$refs['form1'].resetFields()
|
this.$refs['form1'].resetFields()
|
||||||
}
|
}
|
||||||
this.form1.invoiceNum = ''
|
this.form1.invoiceNum = ''
|
||||||
this.form1.money = ''
|
this.form1.money = ''
|
||||||
|
this.form1.supplierValue = ''
|
||||||
this.form1.paid = ''
|
this.form1.paid = ''
|
||||||
this.form1.unpaid = ''
|
this.form1.unpaid = ''
|
||||||
this.form1.tax = ''
|
this.form1.tax = ''
|
||||||
@@ -493,8 +411,9 @@ export default {
|
|||||||
this.dialogVisible1 = true
|
this.dialogVisible1 = true
|
||||||
},
|
},
|
||||||
searchTable1() {
|
searchTable1() {
|
||||||
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
|
let check1
|
||||||
searchTable1(this.check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
|
this.invoiceNum ? check1 = 1 : check1 = 0
|
||||||
|
searchTable1(check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
|
||||||
this.tableData1 = response.data.rows
|
this.tableData1 = response.data.rows
|
||||||
this.tableData1.map(v => {
|
this.tableData1.map(v => {
|
||||||
this.$set(v, 'scanSrc', '')
|
this.$set(v, 'scanSrc', '')
|
||||||
@@ -506,12 +425,41 @@ export default {
|
|||||||
this.total1 = response.data.total
|
this.total1 = response.data.total
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
submitAdd1() { // 提交新增
|
||||||
|
this.$refs['form1'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.upload.submit() // 上传图片
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitEdit() { // 提交编辑
|
||||||
|
this.$refs['form1'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
|
||||||
|
if (response.data[0].result === '修改成功') {
|
||||||
|
this.$message.success('编辑成功')
|
||||||
|
this.dialogVisible1 = false
|
||||||
|
this.searchTable1()
|
||||||
|
} else if (response.data[0].result === '修改失败') {
|
||||||
|
this.$message.error('已提交申请,编辑失败')
|
||||||
|
} else { this.$message.error('编辑失败') }
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('error submit!!')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
if (this.$refs['form1'] !== undefined) {
|
if (this.$refs['form1'] !== undefined) {
|
||||||
this.$refs['form1'].resetFields()
|
this.$refs['form1'].resetFields()
|
||||||
}
|
}
|
||||||
this.form1.invoiceNum = row.发票号
|
this.form1.invoiceNum = row.发票号
|
||||||
this.form1.money = row.发票金额
|
this.form1.money = row.发票金额
|
||||||
|
this.form1.supplierValue = Number(row.供应商流水号)
|
||||||
this.form1.paid = row.已付款项
|
this.form1.paid = row.已付款项
|
||||||
this.form1.unpaid = row.尚欠金额
|
this.form1.unpaid = row.尚欠金额
|
||||||
this.form1.tax = row.税额
|
this.form1.tax = row.税额
|
||||||
@@ -553,60 +501,10 @@ export default {
|
|||||||
})
|
})
|
||||||
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||||
},
|
},
|
||||||
handleSizeChange1(val) {
|
warningExceed() {
|
||||||
this.pageCurrent1 = 1
|
this.$message.error('仅可上传一张发票')
|
||||||
this.pageSize1 = val
|
|
||||||
this.searchTable1()
|
|
||||||
},
|
},
|
||||||
handleCurrentChange1(val) {
|
beforeUpload(file) { // 上传前检测
|
||||||
this.pageCurrent1 = val
|
|
||||||
this.searchTable1()
|
|
||||||
},
|
|
||||||
submitApply(row) {
|
|
||||||
this.$confirm('确认提交申请吗?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
if (this.tableData2.length === 0) {
|
|
||||||
this.$message.warning('入库单为空')
|
|
||||||
} else {
|
|
||||||
submitApply(row.发票结算申请单流水号, this.id).then(response => {
|
|
||||||
if (response.data[0].result === '1') {
|
|
||||||
this.$message.success('提交成功')
|
|
||||||
this.searchTable1()
|
|
||||||
} else { this.$message.error('提交失败') }
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message({
|
|
||||||
type: 'info',
|
|
||||||
message: '已取消操作'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
searchInboundCard() {
|
|
||||||
let check
|
|
||||||
this.inboundCardNumber ? check = 1 : check = 0
|
|
||||||
this.tableData01 = []
|
|
||||||
searchInboundCard(check, this.inboundCardNumber).then(response => {
|
|
||||||
console.log(response.data)
|
|
||||||
this.tableData01 = response.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
searchTable2(row) {
|
|
||||||
this.applyOrderNum = row.发票结算申请单流水号
|
|
||||||
this.invoiceNumber = row.发票号
|
|
||||||
searchTable2(row.发票结算申请单流水号).then(response => {
|
|
||||||
this.tableData2 = response.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
searchTable3(row) {
|
|
||||||
searchInboundCardDetail(row.采购入库单流水号).then(response => {
|
|
||||||
this.tableData3 = response.data
|
|
||||||
})
|
|
||||||
},
|
|
||||||
beforeUpload(file) { // 上船前检测
|
|
||||||
const isJPG = /^image\/.*/.test(file.type)
|
const isJPG = /^image\/.*/.test(file.type)
|
||||||
const isLt4M = file.size / 1024 / 1024 < 4
|
const isLt4M = file.size / 1024 / 1024 < 4
|
||||||
if (!isJPG) {
|
if (!isJPG) {
|
||||||
@@ -627,62 +525,122 @@ export default {
|
|||||||
this.$message.error('增加失败')
|
this.$message.error('增加失败')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
warningExceed() {
|
handleSizeChange1(val) {
|
||||||
this.$message.error('仅可上传一张发票')
|
this.pageCurrent1 = 1
|
||||||
|
this.pageSize1 = val
|
||||||
|
this.searchTable1()
|
||||||
},
|
},
|
||||||
addInStoreOrder() {
|
handleCurrentChange1(val) {
|
||||||
|
this.pageCurrent1 = val
|
||||||
|
this.searchTable1()
|
||||||
|
},
|
||||||
|
submitApply(row) {
|
||||||
|
this.$confirm('确认提交申请吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
if (this.tableData2.length === 0) {
|
||||||
|
this.$message.warning('发票结算申请明细为空!')
|
||||||
|
} else {
|
||||||
|
submitApply(row.发票结算申请单流水号, this.id).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('提交成功')
|
||||||
|
this.searchTable1()
|
||||||
|
} else { this.$message.error('提交失败') }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消操作'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchTable2(row) {
|
||||||
|
this.applyOrderNum = row.发票结算申请单流水号
|
||||||
|
this.invoiceNumber = row.发票号
|
||||||
|
this.supplierName = row.供应商名称
|
||||||
|
this.supplierValue = row.供应商流水号
|
||||||
|
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||||
|
this.tableData2 = response.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addInStoreRecord() {
|
||||||
if (this.applyOrderNum) {
|
if (this.applyOrderNum) {
|
||||||
|
this.searchTable01()
|
||||||
this.title2 = '追加入库单'
|
this.title2 = '追加入库单'
|
||||||
this.dialogVisible2 = true
|
this.dialogVisible2 = true
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请选择发票!')
|
this.$message.error('请选择发票!')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitAdd1() { // 提交新增
|
searchTable01() {
|
||||||
this.$refs['form1'].validate((valid) => {
|
this.tableData01 = []
|
||||||
if (valid) {
|
this.tableData02 = []
|
||||||
this.$refs.upload.submit() // 上传图片
|
if (this.contractType === '采购合同') {
|
||||||
} else {
|
searchPurchase(this.supplierValue).then(response => {
|
||||||
console.log('error submit!!')
|
this.tableData01 = response.data
|
||||||
return false
|
})
|
||||||
|
} else if (this.contractType === '离线合同') {
|
||||||
|
searchOffline(this.supplierValue).then(response => {
|
||||||
|
response.data.map(data => {
|
||||||
|
if (Number(data.离线合同状态) === 2) {
|
||||||
|
this.tableData01.push(data)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
submitEdit() { // 提交编辑
|
|
||||||
this.$refs['form1'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
|
|
||||||
if (response.data[0].result === '修改成功') {
|
|
||||||
this.$message.success('编辑成功')
|
|
||||||
this.dialogVisible1 = false
|
|
||||||
this.searchTable1()
|
|
||||||
} else if (response.data[0].result === '修改失败') {
|
|
||||||
this.$message.error('已提交申请,编辑失败')
|
|
||||||
} else { this.$message.error('编辑失败') }
|
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
console.log('error submit!!')
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
},
|
||||||
searchTable02(row) {
|
searchTable02(row) {
|
||||||
searchInboundCardDetail(row.采购入库单流水号).then(response => {
|
this.tableData02 = []
|
||||||
this.tableData02 = response.data
|
if (this.contractType === '采购合同') {
|
||||||
|
searchPurchaseDetail(row.采购合同流水号).then(response => {
|
||||||
|
response.data.map(data => {
|
||||||
|
this.$set(data, '本次到票数量', 0)
|
||||||
|
data.本次到票数量 = data.已到货数量 - data.到票数量
|
||||||
|
this.tableData02.push(data)
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
} else if (this.contractType === '离线合同') {
|
||||||
|
searchOfflineDetail(row.离线合同流水号).then(response => {
|
||||||
|
response.data.map(data => {
|
||||||
|
this.$set(data, '本次到票数量', 0)
|
||||||
|
data.本次到票数量 = data.到货数量 - data.到票数量
|
||||||
|
this.tableData02.push(data)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.group1 = val
|
this.group = val
|
||||||
},
|
},
|
||||||
submitAdd2() { // 追加入库单
|
submitAdd2() { // 追加入库单
|
||||||
if (this.group1.length === 0) {
|
if (this.group.length === 0) {
|
||||||
this.$message.warning('请选择入库单')
|
this.$message.warning('请选择零件或物料')
|
||||||
} else {
|
} else {
|
||||||
const group = []
|
const group1 = []
|
||||||
for (let i = 0; i < this.group1.length; i++) {
|
const group2 = []
|
||||||
group.push(this.group1[i].采购入库单流水号)
|
if (this.contractType === '采购合同') {
|
||||||
|
for (let i = 0; i < this.group.length; i++) {
|
||||||
|
group1.push(this.group[i].采购合同明细流水号)
|
||||||
|
group2.push(this.group[i].本次到票数量)
|
||||||
}
|
}
|
||||||
addTable2(this.applyOrderNum, group).then(response => {
|
addTable2(this.applyOrderNum, group1, group2, 1).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('追加成功')
|
||||||
|
this.dialogVisible2 = false
|
||||||
|
searchTable2(this.applyOrderNum).then(response => {
|
||||||
|
this.tableData2 = response.data
|
||||||
|
})
|
||||||
|
} else { this.$message.error('追加失败') }
|
||||||
|
})
|
||||||
|
} else if (this.contractType === '离线合同') {
|
||||||
|
for (let i = 0; i < this.group.length; i++) {
|
||||||
|
group1.push(this.group[i].离线合同明细流水号)
|
||||||
|
group2.push(this.group[i].本次到票数量)
|
||||||
|
}
|
||||||
|
addTable2(this.applyOrderNum, group1, group2, 2).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('追加成功')
|
this.$message.success('追加成功')
|
||||||
this.dialogVisible2 = false
|
this.dialogVisible2 = false
|
||||||
@@ -692,31 +650,21 @@ export default {
|
|||||||
} else { this.$message.error('追加失败') }
|
} else { this.$message.error('追加失败') }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleSelectionChange2(val) {
|
deleteTable2(row) {
|
||||||
this.group2 = val
|
this.$confirm('确认删除吗?', '提示', {
|
||||||
},
|
|
||||||
deleteTable2() { // 移除入库单
|
|
||||||
if (this.group2.length === 0) {
|
|
||||||
this.$message.warning('请选择入库单')
|
|
||||||
} else {
|
|
||||||
this.$confirm('此操作将移除入库单, 是否继续?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
const group = []
|
deleteTable2(row.发票结算申请单明细流水号).then(response => {
|
||||||
for (let i = 0; i < this.group2.length; i++) {
|
|
||||||
group.push(this.group2[i].发票结算申请单明细流水号)
|
|
||||||
}
|
|
||||||
deleteTable2(group).then(response => {
|
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('移除成功')
|
this.$message.success('删除成功')
|
||||||
this.dialogVisible2 = false
|
|
||||||
searchTable2(this.applyOrderNum).then(response => {
|
searchTable2(this.applyOrderNum).then(response => {
|
||||||
this.tableData2 = response.data
|
this.tableData2 = response.data
|
||||||
})
|
})
|
||||||
} else { this.$message.error('移除失败') }
|
} else { this.$message.error('删除失败') }
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message({
|
this.$message({
|
||||||
@@ -727,7 +675,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user