|
@@ -7,117 +7,83 @@
|
|
|
<div slot="extra">
|
|
|
<Button v-if="form.spzt != '1'" @click="toSpjl">查看审批记录</Button>
|
|
|
<Button @click="addJs" v-if="form.spzt == '1' || form.spzt == '4'">保存</Button>
|
|
|
- <Button
|
|
|
- @click="submitJs"
|
|
|
- :disabled="submitLoading"
|
|
|
- v-if="balanceType == 'edit' && (form.spzt == '1' || form.spzt == '4')"
|
|
|
- >提交</Button>
|
|
|
+ <Button @click="submitJs" :disabled="submitLoading"
|
|
|
+ v-if="balanceType == 'edit' && (form.spzt == '1' || form.spzt == '4')">提交</Button>
|
|
|
<Button @click="cancel">返回</Button>
|
|
|
</div>
|
|
|
<Row class="mainCont">
|
|
|
<Col span="4" class-name="tables">结算申请编号</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <span style="color: gray" v-if="form.jssqbh == ''">系统自动生成,不可编辑</span>
|
|
|
- <span v-else>{{ form.jssqbh }}</span>
|
|
|
+ <span style="color: gray" v-if="form.jssqbh == ''">系统自动生成,不可编辑</span>
|
|
|
+ <span v-else>{{ form.jssqbh }}</span>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">标题</Col>
|
|
|
<Col span="12" class-name="tables">
|
|
|
- <span style="color: gray" v-if="form.bt == ''">系统自动生成,不可编辑</span>
|
|
|
- <span v-else>{{ form.bt }}</span>
|
|
|
+ <span style="color: gray" v-if="form.bt == ''">系统自动生成,不可编辑</span>
|
|
|
+ <span v-else>{{ form.bt }}</span>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- 关联区域
|
|
|
- <span class="mustSpan">*</span>
|
|
|
+ 关联区域
|
|
|
+ <span class="mustSpan">*</span>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <Select
|
|
|
- clearable
|
|
|
- v-model="form.glqy"
|
|
|
- :disabled="balanceType == 'edit'"
|
|
|
- @on-change="glqyChange"
|
|
|
- style="width: 95%"
|
|
|
- >
|
|
|
- <Option
|
|
|
- v-for="item in glqyList"
|
|
|
- :value="item.areaId"
|
|
|
- :key="item.areaId"
|
|
|
- >{{ item.areaName }}</Option>
|
|
|
- </Select>
|
|
|
+ <Select clearable v-model="form.glqy" :disabled="balanceType == 'edit'" @on-change="glqyChange"
|
|
|
+ style="width: 95%">
|
|
|
+ <Option v-for="item in glqyList" :value="item.areaId" :key="item.areaId">{{ item.areaName }}</Option>
|
|
|
+ </Select>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- 关联项目
|
|
|
- <span class="mustSpan">*</span>
|
|
|
+ 关联项目
|
|
|
+ <span class="mustSpan">*</span>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <Select
|
|
|
- clearable
|
|
|
- v-model="form.glxm"
|
|
|
- :disabled="balanceType == 'edit'"
|
|
|
- style="width: 95%"
|
|
|
- >
|
|
|
- <Option
|
|
|
- v-for="item in glxmList"
|
|
|
- :value="item.projectId"
|
|
|
- :key="item.projectId"
|
|
|
- >{{ item.projectName }}</Option>
|
|
|
- </Select>
|
|
|
+ <Select clearable v-model="form.glxm" :disabled="balanceType == 'edit'" style="width: 95%">
|
|
|
+ <Option v-for="item in glxmList" :value="item.projectId" :key="item.projectId">{{ item.projectName }}
|
|
|
+ </Option>
|
|
|
+ </Select>
|
|
|
</Col>
|
|
|
- <Col span="4" class-name="tables"></Col>
|
|
|
- <Col span="4" class-name="tables"></Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- 供应商
|
|
|
- <span class="mustSpan">*</span>
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
+ 供应商
|
|
|
+ <span class="mustSpan">*</span>
|
|
|
</Col>
|
|
|
<Col span="12" class-name="tables">
|
|
|
- <Select
|
|
|
- :disabled="form.spzt != '1'"
|
|
|
- clearable
|
|
|
- v-model="form.gys"
|
|
|
- placeholder="请选择供应商(如供应商银行信息不完整,则无法选择)"
|
|
|
- filterable
|
|
|
- style="width: 98%"
|
|
|
- @on-change="gysChange"
|
|
|
- >
|
|
|
- <Option v-for="item in gysList" :value="item.gpId" :key="item.gpId">{{ item.gpName }}</Option>
|
|
|
- </Select>
|
|
|
+ <Select :disabled="form.spzt != '1'" clearable v-model="form.gys" placeholder="请选择供应商(如供应商银行信息不完整,则无法选择)"
|
|
|
+ filterable style="width: 98%" @on-change="gysChange">
|
|
|
+ <Option v-for="item in gysList" :value="item.gpId" :key="item.gpId">{{ item.gpName }}</Option>
|
|
|
+ </Select>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">供方负责人</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <span style="color: gray" v-if="form.gffzr == ''">系统自动生成,不可编辑</span>
|
|
|
- <span v-else>{{ form.gffzr }}</span>
|
|
|
+ <span style="color: gray" v-if="form.gffzr == ''">系统自动生成,不可编辑</span>
|
|
|
+ <span v-else>{{ form.gffzr }}</span>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">供应商联系电话</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <span style="color: gray" v-if="form.gyslxdh == ''">系统自动生成,不可编辑</span>
|
|
|
- <span v-else>{{ form.gyslxdh }}</span>
|
|
|
+ <span style="color: gray" v-if="form.gyslxdh == ''">系统自动生成,不可编辑</span>
|
|
|
+ <span v-else>{{ form.gyslxdh }}</span>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- 账号
|
|
|
- <span class="mustSpan">*</span>
|
|
|
+ 账号
|
|
|
+ <span class="mustSpan">*</span>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <Select
|
|
|
- :disabled="form.spzt != '1' && form.spzt != '4'"
|
|
|
- v-model="form.gyszh"
|
|
|
- placeholder="请选择供应商账号"
|
|
|
- filterable
|
|
|
- style="width: 95%"
|
|
|
- @on-change="zhChange"
|
|
|
- >
|
|
|
- <Option
|
|
|
- v-for="item in zhList"
|
|
|
- :value="item.extensionId"
|
|
|
- :key="item.extensionId"
|
|
|
- >{{ item.unionpay }}</Option>
|
|
|
- </Select>
|
|
|
+ <Select :disabled="form.spzt != '1' && form.spzt != '4'" v-model="form.gyszh" placeholder="请选择供应商账号"
|
|
|
+ filterable style="width: 95%" @on-change="zhChange">
|
|
|
+ <Option v-for="item in zhList" :value="item.extensionId" :key="item.extensionId">{{ item.unionpay }}
|
|
|
+ </Option>
|
|
|
+ </Select>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- 开户行
|
|
|
- <span class="mustSpan">*</span>
|
|
|
+ 开户行
|
|
|
+ <span class="mustSpan">*</span>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <span style="color: gray" v-if="form.khh == ''">系统自动生成,不可编辑</span>
|
|
|
- <span v-else>{{ form.khh }}</span>
|
|
|
+ <span style="color: gray" v-if="form.khh == ''">系统自动生成,不可编辑</span>
|
|
|
+ <span v-else>{{ form.khh }}</span>
|
|
|
</Col>
|
|
|
<!-- <Col span="4" class-name="tables">
|
|
|
单据类型
|
|
@@ -134,17 +100,13 @@
|
|
|
</Col>-->
|
|
|
<Col span="4" class-name="tables">下单时间</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <span style="color: gray" v-if="form.xdsj == ''">系统自动生成,不可编辑</span>
|
|
|
- <span v-else>{{ form.xdsj }}</span>
|
|
|
+ <span style="color: gray" v-if="form.xdsj == ''">系统自动生成,不可编辑</span>
|
|
|
+ <span v-else>{{ form.xdsj }}</span>
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">收货人</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <Input
|
|
|
- v-model="form.shr"
|
|
|
- :disabled="form.spzt != '1' && form.spzt != '4'"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 95%"
|
|
|
- />
|
|
|
+ <Input v-model="form.shr" :disabled="form.spzt != '1' && form.spzt != '4'" placeholder="请输入"
|
|
|
+ style="width: 95%" />
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">入库时间(首次)</Col>
|
|
|
<Col span="4" class-name="tables">{{ form.rksj }}</Col>
|
|
@@ -152,81 +114,56 @@
|
|
|
<Col span="4" class-name="tables">{{ form.total }}</Col>
|
|
|
<Col span="4" class-name="tables">调整金额(元)</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <InputNumber
|
|
|
- :min="1"
|
|
|
- :disabled="form.spzt != '1' && form.spzt != '4'"
|
|
|
- v-model="form.tzje"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 95%"
|
|
|
- />
|
|
|
+ <InputNumber :min="1" :disabled="form.spzt != '1' && form.spzt != '4'" v-model="form.tzje" placeholder="请输入"
|
|
|
+ style="width: 95%" />
|
|
|
</Col>
|
|
|
<Col span="4" class-name="tables">实际支付金额(元)</Col>
|
|
|
- <Col
|
|
|
- span="4"
|
|
|
- class-name="tables"
|
|
|
- >{{ (Number(form.total) + Number(form.tzje)).toFixed(2) }}</Col>
|
|
|
+ <Col span="4" class-name="tables">{{ (Number(form.total) + Number(form.tzje)).toFixed(2) }}</Col>
|
|
|
<Col span="4" class-name="tables">申请人</Col>
|
|
|
<Col span="4" class-name="tables">{{ form.sqr }}</Col>
|
|
|
<Col span="4" class-name="tables">审批状态</Col>
|
|
|
<Col span="4" class-name="tables">
|
|
|
- <div>
|
|
|
- <span v-if="form.spzt == '1'">未提交</span>
|
|
|
- <span v-if="form.spzt == '2'">审核中</span>
|
|
|
- <span v-if="form.spzt == '3'">审核通过</span>
|
|
|
- <span v-if="form.spzt == '4'">审核拒绝</span>
|
|
|
- <span v-if="form.spzt == '5'">已付款</span>
|
|
|
- </div>
|
|
|
+ <div>
|
|
|
+ <span v-if="form.spzt == '1'">未提交</span>
|
|
|
+ <span v-if="form.spzt == '2'">审核中</span>
|
|
|
+ <span v-if="form.spzt == '3'">审核通过</span>
|
|
|
+ <span v-if="form.spzt == '4'">审核拒绝</span>
|
|
|
+ <span v-if="form.spzt == '5'">已付款</span>
|
|
|
+ </div>
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
+ </Col>
|
|
|
+ <Col span="4" class-name="tables">
|
|
|
</Col>
|
|
|
- <Col span="4" class-name="tables"></Col>
|
|
|
- <Col span="4" class-name="tables"></Col>
|
|
|
</Row>
|
|
|
<Row class="uplCont" type="flex" justify="center" style="align-items: stretch">
|
|
|
<Col span="4" class-name="upl">附件</Col>
|
|
|
<Col span="10" class-name="uplf">
|
|
|
- <Upload
|
|
|
- :disabled="form.spzt != '1' && form.spzt != '4'"
|
|
|
- :headers="uploadHeaders"
|
|
|
- style="width: 80%"
|
|
|
- multiple
|
|
|
- type="drag"
|
|
|
- action="/purchase/common/uploadFile"
|
|
|
- :before-upload="beforeUpload"
|
|
|
- :on-success="uploadFilesSuccess"
|
|
|
- :show-upload-list="false"
|
|
|
- :on-progress="upFilesLoading"
|
|
|
- >
|
|
|
- <!-- :default-file-list="xzwgForm.filesList" -->
|
|
|
- <div style="padding: 5px 0">
|
|
|
- <Icon type="md-cloud-upload" size="36" style="color: #3399ff"></Icon>
|
|
|
- <span>点击或将文件拖拽到这里上传</span>
|
|
|
- </div>
|
|
|
- </Upload>
|
|
|
+ <Upload :disabled="form.spzt != '1' && form.spzt != '4'" :headers="uploadHeaders" style="width: 80%" multiple
|
|
|
+ type="drag" action="/purchase/common/uploadFile" :before-upload="beforeUpload"
|
|
|
+ :on-success="uploadFilesSuccess" :show-upload-list="false" :on-progress="upFilesLoading">
|
|
|
+ <!-- :default-file-list="xzwgForm.filesList" -->
|
|
|
+ <div style="padding: 5px 0">
|
|
|
+ <Icon type="md-cloud-upload" size="36" style="color: #3399ff"></Icon>
|
|
|
+ <span>点击或将文件拖拽到这里上传</span>
|
|
|
+ </div>
|
|
|
+ </Upload>
|
|
|
</Col>
|
|
|
<Col span="10" class="upl" style="padding: 5px">
|
|
|
- <div v-for="(item, index) in form.filesList" :key="index">
|
|
|
- <a
|
|
|
- :href="item.docUrl ? item.docUrl : 'javascript:void(0);'"
|
|
|
- :download="item.fileName"
|
|
|
- :target="item.docUrl ? '_blank' : '_self'"
|
|
|
- >{{ item.fileName }}</a>
|
|
|
- <span
|
|
|
- v-if="form.spzt == '1' || form.spzt == '4'"
|
|
|
- style="float: right; cursor:pointer"
|
|
|
- @click="form.filesList.splice(index, 1)"
|
|
|
- >x</span>
|
|
|
- </div>
|
|
|
- <p v-if="uploading" style="text-align: center">上传中...</p>
|
|
|
+ <div v-for="(item, index) in form.filesList" :key="index">
|
|
|
+ <a :href="item.docUrl ? item.docUrl : 'javascript:void(0);'" :download="item.fileName"
|
|
|
+ :target="item.docUrl ? '_blank' : '_self'">{{ item.fileName }}</a>
|
|
|
+ <span v-if="form.spzt == '1' || form.spzt == '4'" style="float: right; cursor:pointer"
|
|
|
+ @click="form.filesList.splice(index, 1)">x</span>
|
|
|
+ </div>
|
|
|
+ <p v-if="uploading" style="text-align: center">上传中...</p>
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Row class="mainCont">
|
|
|
<Col span="4" class-name="tables">说明</Col>
|
|
|
<Col span="20" class-name="tables">
|
|
|
- <Input
|
|
|
- v-model="form.sm"
|
|
|
- :disabled="form.spzt != '1' && form.spzt != '4'"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 99%"
|
|
|
- />
|
|
|
+ <Input v-model="form.sm" :disabled="form.spzt != '1' && form.spzt != '4'" placeholder="请输入"
|
|
|
+ style="width: 99%" />
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Spin size="large" fix v-if="spinShow"></Spin>
|
|
@@ -234,11 +171,8 @@
|
|
|
<Card style="width:100%" :bordered="false" :dis-hover="true">
|
|
|
<p slot="title">结算明细</p>
|
|
|
<div slot="extra">
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- :disabled="balanceType == 'add' || (form.spzt != '1' && form.spzt != '4')"
|
|
|
- @click="addMxShow"
|
|
|
- >新增明细</Button>
|
|
|
+ <Button type="primary" :disabled="balanceType == 'add' || (form.spzt != '1' && form.spzt != '4')"
|
|
|
+ @click="addMxShow">新增明细</Button>
|
|
|
</div>
|
|
|
<Table :columns="tableColumn" style="width: 100%" :data="tableData" :loading="tableLoading">
|
|
|
<template slot-scope="{ row, index }" slot="cz">
|
|
@@ -250,586 +184,601 @@
|
|
|
</Card>
|
|
|
</div>
|
|
|
<!-- 采购明细新增 -->
|
|
|
- <balanceMxAdd
|
|
|
- ref="mxAdd"
|
|
|
- :ssxmList="glxmList"
|
|
|
- @addMx="addMx"
|
|
|
- @return="contentShow = true"
|
|
|
- v-show="!contentShow"
|
|
|
- />
|
|
|
+ <balanceMxAdd ref="mxAdd" :ssxmList="glxmList" @addMx="addMx" @return="contentShow = true" v-show="!contentShow" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- addPurchaseSettlement,
|
|
|
- queryPurchaseSettlementInfo,
|
|
|
- editPurchaseSettlement,
|
|
|
- selectGoodProviderSelectionList,
|
|
|
- getProjectList,
|
|
|
- submitPurchaseSettlement,
|
|
|
- goodProviderBankCardPageList,
|
|
|
-} from "@/service/getData";
|
|
|
-import balanceMxAdd from "./balanceMxAdd";
|
|
|
-export default {
|
|
|
- name: "balanceAdd",
|
|
|
- props: ["glqyList", "djlxList"],
|
|
|
- components: {
|
|
|
- balanceMxAdd,
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- submitLoading: false,
|
|
|
- balanceType: "add",
|
|
|
- requestId: "",
|
|
|
- settlementId: "",
|
|
|
- spinShow: true,
|
|
|
- contentShow: true,
|
|
|
- gysGo: true,
|
|
|
- uploadHeaders: {
|
|
|
- token: localStorage.token,
|
|
|
- userId: localStorage.user_id,
|
|
|
- },
|
|
|
- form: {
|
|
|
- jssqbh: "", //结算申请编号
|
|
|
- bt: "", //标题
|
|
|
- glqy: "", //关联区域
|
|
|
- glxm: "", //关联项目
|
|
|
- gys: "", //供应商
|
|
|
- gffzr: "", //供方负责人
|
|
|
- gyszh: "", //供应商账号 工具值
|
|
|
- gyslxdh: "", //供应商联系电话
|
|
|
- khh: "", //开户行
|
|
|
- zh: "", //账号
|
|
|
- djlx: "", //单据类型
|
|
|
- shr: "", //收货人
|
|
|
- tzje: 0, //调整金额
|
|
|
- rksj: "", //入库时间
|
|
|
- xdsj: "", //下单时间
|
|
|
- sqr: localStorage.user_name, //申请人
|
|
|
- spzt: 1, //审批状态
|
|
|
- sm: "", //说明
|
|
|
- total: 0, //总价
|
|
|
- filesList: [],
|
|
|
- },
|
|
|
- // glqyList: [{ value: 1, label: "test" }],
|
|
|
- glxmList: [],
|
|
|
- gysList: [],
|
|
|
- zhList: [],
|
|
|
- gyslxdhList: [{ value: 1, label: "test" }],
|
|
|
- // djlxList: [{ value: 1, label: "test" }],
|
|
|
- sqrList: [{ value: 1, label: "test" }],
|
|
|
- uploading: false,
|
|
|
- // 批量设置
|
|
|
- plszShow: false,
|
|
|
- plrkck: "",
|
|
|
- pldhsj: "",
|
|
|
- // table
|
|
|
- tableColumn: [
|
|
|
- {
|
|
|
- title: "操作",
|
|
|
- slot: "cz",
|
|
|
- tooltip: true,
|
|
|
- width: 60,
|
|
|
- },
|
|
|
- {
|
|
|
- title: "入库单",
|
|
|
- key: "warehouseEntry",
|
|
|
- width: 200,
|
|
|
- tooltip: true,
|
|
|
- },
|
|
|
- {
|
|
|
- title: "总价(元)",
|
|
|
- key: "totalPrice",
|
|
|
- tooltip: true,
|
|
|
- },
|
|
|
- {
|
|
|
- title: "采购人",
|
|
|
- key: "purchaserName",
|
|
|
- tooltip: true,
|
|
|
- },
|
|
|
- {
|
|
|
- title: "采购人联系方式",
|
|
|
- key: "purchaserTel",
|
|
|
- tooltip: true,
|
|
|
- },
|
|
|
- {
|
|
|
- title: "下单时间",
|
|
|
- key: "orderTime",
|
|
|
- tooltip: true,
|
|
|
- },
|
|
|
- {
|
|
|
- title: "入库时间",
|
|
|
- key: "storehouseTime",
|
|
|
- tooltip: true,
|
|
|
- },
|
|
|
- {
|
|
|
- title: "入库仓库",
|
|
|
- key: "storehouseName",
|
|
|
- tooltip: true,
|
|
|
+ import {
|
|
|
+ addPurchaseSettlement,
|
|
|
+ queryPurchaseSettlementInfo,
|
|
|
+ editPurchaseSettlement,
|
|
|
+ selectGoodProviderSelectionList,
|
|
|
+ getProjectList,
|
|
|
+ submitPurchaseSettlement,
|
|
|
+ goodProviderBankCardPageList,
|
|
|
+ } from "@/service/getData";
|
|
|
+ import balanceMxAdd from "./balanceMxAdd";
|
|
|
+ export default {
|
|
|
+ name: "balanceAdd",
|
|
|
+ props: ["glqyList", "djlxList"],
|
|
|
+ components: {
|
|
|
+ balanceMxAdd,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ submitLoading: false,
|
|
|
+ balanceType: "add",
|
|
|
+ requestId: "",
|
|
|
+ settlementId: "",
|
|
|
+ spinShow: true,
|
|
|
+ contentShow: true,
|
|
|
+ gysGo: true,
|
|
|
+ uploadHeaders: {
|
|
|
+ token: localStorage.token,
|
|
|
+ userId: localStorage.user_id,
|
|
|
},
|
|
|
- {
|
|
|
- title: "仓管员",
|
|
|
- key: "warehouseKeeper",
|
|
|
- tooltip: true,
|
|
|
+ form: {
|
|
|
+ jssqbh: "", //结算申请编号
|
|
|
+ bt: "", //标题
|
|
|
+ glqy: "", //关联区域
|
|
|
+ glxm: "", //关联项目
|
|
|
+ gys: "", //供应商
|
|
|
+ gffzr: "", //供方负责人
|
|
|
+ gyszh: "", //供应商账号 工具值
|
|
|
+ gyslxdh: "", //供应商联系电话
|
|
|
+ khh: "", //开户行
|
|
|
+ zh: "", //账号
|
|
|
+ djlx: "", //单据类型
|
|
|
+ shr: "", //收货人
|
|
|
+ tzje: 0, //调整金额
|
|
|
+ rksj: "", //入库时间
|
|
|
+ xdsj: "", //下单时间
|
|
|
+ sqr: localStorage.user_name, //申请人
|
|
|
+ spzt: 1, //审批状态
|
|
|
+ sm: "", //说明
|
|
|
+ total: 0, //总价
|
|
|
+ filesList: [],
|
|
|
},
|
|
|
- ],
|
|
|
- tableData: [],
|
|
|
- tableSelect: [],
|
|
|
- tableLoading: false,
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.getTableData();
|
|
|
- selectGoodProviderSelectionList({ isCheck: true }).then((res) => {
|
|
|
- this.gysList = res.data;
|
|
|
- });
|
|
|
- },
|
|
|
- methods: {
|
|
|
- //批量设置弹窗
|
|
|
- plszOpen() {
|
|
|
- this.plszShow = true;
|
|
|
- },
|
|
|
- plszOk() {},
|
|
|
- plszCancel() {},
|
|
|
- //表单上传
|
|
|
- beforeUpload() {},
|
|
|
- upFilesLoading() {
|
|
|
- this.uploading = true;
|
|
|
- },
|
|
|
- uploadFilesSuccess(response, file, fileList) {
|
|
|
- this.uploading = false;
|
|
|
- this.form.filesList.push({
|
|
|
- fileName: response.data.fileName,
|
|
|
- // fullName: response.fileInfo.fName,
|
|
|
- filePath: response.data.filePath,
|
|
|
- // fileDetailType: ""
|
|
|
- });
|
|
|
- },
|
|
|
- //关联区域切换
|
|
|
- glqyChange(val) {
|
|
|
- let postData = {
|
|
|
- areaId: this.form.glqy,
|
|
|
- userId: localStorage.user_id,
|
|
|
+ // glqyList: [{ value: 1, label: "test" }],
|
|
|
+ glxmList: [],
|
|
|
+ gysList: [],
|
|
|
+ zhList: [],
|
|
|
+ gyslxdhList: [{
|
|
|
+ value: 1,
|
|
|
+ label: "test"
|
|
|
+ }],
|
|
|
+ // djlxList: [{ value: 1, label: "test" }],
|
|
|
+ sqrList: [{
|
|
|
+ value: 1,
|
|
|
+ label: "test"
|
|
|
+ }],
|
|
|
+ uploading: false,
|
|
|
+ // 批量设置
|
|
|
+ plszShow: false,
|
|
|
+ plrkck: "",
|
|
|
+ pldhsj: "",
|
|
|
+ // table
|
|
|
+ tableColumn: [{
|
|
|
+ title: "操作",
|
|
|
+ slot: "cz",
|
|
|
+ tooltip: true,
|
|
|
+ width: 60,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "入库单",
|
|
|
+ key: "warehouseEntry",
|
|
|
+ width: 200,
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "总价(元)",
|
|
|
+ key: "totalPrice",
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "采购人",
|
|
|
+ key: "purchaserName",
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "采购人联系方式",
|
|
|
+ key: "purchaserTel",
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "下单时间",
|
|
|
+ key: "orderTime",
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "入库时间",
|
|
|
+ key: "storehouseTime",
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "入库仓库",
|
|
|
+ key: "storehouseName",
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "仓管员",
|
|
|
+ key: "warehouseKeeper",
|
|
|
+ tooltip: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ tableData: [],
|
|
|
+ tableSelect: [],
|
|
|
+ tableLoading: false,
|
|
|
};
|
|
|
- getProjectList(postData).then((res) => {
|
|
|
- this.form.glxm = "";
|
|
|
- this.glxmList = res.items;
|
|
|
- });
|
|
|
},
|
|
|
- //供应商切换
|
|
|
- gysChange(val) {
|
|
|
- this.gysGo = true;
|
|
|
- if (!val) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- let pageStr = `10000/1?gpId=${val}`;
|
|
|
- let postData = {
|
|
|
- gpId: val,
|
|
|
- };
|
|
|
- goodProviderBankCardPageList(postData, pageStr).then((res) => {
|
|
|
- if (res.status == 200) {
|
|
|
- let arr = res.data.records;
|
|
|
- arr = arr.sort(
|
|
|
- (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
|
|
|
- );
|
|
|
- this.zhList = arr;
|
|
|
- if (arr.filter((a) => a.gpbcDefault == "1").length > 0) {
|
|
|
- this.form.gyszh = arr.filter(
|
|
|
- (a) => a.gpbcDefault == "1"
|
|
|
- )[0].extensionId;
|
|
|
- this.form.zh = arr.filter((a) => a.gpbcDefault == "1")[0].unionpay;
|
|
|
- this.form.khh = arr.filter((a) => a.gpbcDefault == "1")[0].bank;
|
|
|
- } else {
|
|
|
- this.form.gyszh = arr[0].extensionId;
|
|
|
- this.zhChange(arr[0].extensionId);
|
|
|
- }
|
|
|
- }
|
|
|
+ created() {
|
|
|
+ this.getTableData();
|
|
|
+ selectGoodProviderSelectionList({
|
|
|
+ isCheck: true
|
|
|
+ }).then((res) => {
|
|
|
+ this.gysList = res.data;
|
|
|
});
|
|
|
- let gys = this.gysList.filter((a) => a.gpId == val);
|
|
|
- if (gys.length > 0) {
|
|
|
- let sup = gys[0];
|
|
|
- if (!sup.gpcName || !sup.gpcPhone) {
|
|
|
- this.$Message.error(
|
|
|
- "该供应商用户信息不完整,请完善该供应商信息再选择此供应商!"
|
|
|
- );
|
|
|
- this.gysGo = false;
|
|
|
- this.form.gffzr = "";
|
|
|
- this.form.gyslxdh = "";
|
|
|
- this.form.khh = "";
|
|
|
- this.form.zh = "";
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //批量设置弹窗
|
|
|
+ plszOpen() {
|
|
|
+ this.plszShow = true;
|
|
|
+ },
|
|
|
+ plszOk() {},
|
|
|
+ plszCancel() {},
|
|
|
+ //表单上传
|
|
|
+ beforeUpload() {},
|
|
|
+ upFilesLoading() {
|
|
|
+ this.uploading = true;
|
|
|
+ },
|
|
|
+ uploadFilesSuccess(response, file, fileList) {
|
|
|
+ this.uploading = false;
|
|
|
+ this.form.filesList.push({
|
|
|
+ fileName: response.data.fileName,
|
|
|
+ // fullName: response.fileInfo.fName,
|
|
|
+ filePath: response.data.filePath,
|
|
|
+ // fileDetailType: ""
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //关联区域切换
|
|
|
+ glqyChange(val) {
|
|
|
+ let postData = {
|
|
|
+ areaId: this.form.glqy,
|
|
|
+ userId: localStorage.user_id,
|
|
|
+ };
|
|
|
+ getProjectList(postData).then((res) => {
|
|
|
+ this.form.glxm = "";
|
|
|
+ this.glxmList = res.items;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //供应商切换
|
|
|
+ gysChange(val) {
|
|
|
+ this.gysGo = true;
|
|
|
+ if (!val) {
|
|
|
return false;
|
|
|
}
|
|
|
- this.form.gffzr = sup.gpcName;
|
|
|
- this.form.gyslxdh = sup.gpcPhone;
|
|
|
- // bank开户行 unionpay银行账号
|
|
|
- }
|
|
|
- },
|
|
|
- //供应商账号切换
|
|
|
- zhChange(val) {
|
|
|
- if (val != "" && val) {
|
|
|
- this.form.khh = this.zhList.filter((a) => a.extensionId == val)[0].bank;
|
|
|
- this.form.zh = this.zhList.filter(
|
|
|
- (a) => a.extensionId == val
|
|
|
- )[0].unionpay;
|
|
|
- }
|
|
|
- },
|
|
|
- //查询结算详情
|
|
|
- getJs(settlementId) {
|
|
|
- this.spinShow = true;
|
|
|
- queryPurchaseSettlementInfo(settlementId).then((res) => {
|
|
|
- this.spinShow = false;
|
|
|
- if (res.status == 200) {
|
|
|
- let data = res.data;
|
|
|
- this.form.bt = data.title;
|
|
|
- this.form.glqy = Number(data.areaId);
|
|
|
- this.form.glxm = data.projectId;
|
|
|
- this.form.gys = data.supplierId;
|
|
|
- this.form.gffzr = data.supplierPrincipal;
|
|
|
- this.form.gyslxdh = Number(data.supplierTel);
|
|
|
- this.form.khh = data.depositBank;
|
|
|
- this.form.zh = data.accountNumber;
|
|
|
- this.form.gyszh = data.extensionId;
|
|
|
- // this.form.djlx = data.type;
|
|
|
- this.form.shr = data.receivedName;
|
|
|
- this.form.spzt = data.approvalState;
|
|
|
- this.form.sqr = data.applicantName;
|
|
|
- this.form.xdsj = data.orderTime;
|
|
|
- this.form.tzje = data.adjustmentPrice;
|
|
|
- this.form.jssqbh = data.settlementCode;
|
|
|
- this.form.sm = data.instruction;
|
|
|
- this.form.rksj = data.warehouseTime;
|
|
|
- this.balanceType = "edit";
|
|
|
- this.form.filesList = data.attachmentList;
|
|
|
- for (let i in data.detailList) {
|
|
|
- data.detailList[i].totalPrice = data.detailList[
|
|
|
- i
|
|
|
- ].totalPrice.toFixed(2);
|
|
|
- }
|
|
|
- this.tableData = data.detailList;
|
|
|
- this.requestId = data.requestId;
|
|
|
-
|
|
|
- let pStr = `10000/1?gpId=${data.supplierId}`;
|
|
|
- let pData = {
|
|
|
- gpId: data.supplierId,
|
|
|
- };
|
|
|
- goodProviderBankCardPageList(pData, pStr).then((res) => {
|
|
|
- if (res.status == 200) {
|
|
|
- let arr = res.data.records;
|
|
|
- arr = arr.sort(
|
|
|
- (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
|
|
|
- );
|
|
|
- this.zhList = arr;
|
|
|
+ let pageStr = `10000/1?gpId=${val}`;
|
|
|
+ let postData = {
|
|
|
+ gpId: val,
|
|
|
+ };
|
|
|
+ goodProviderBankCardPageList(postData, pageStr).then((res) => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ let arr = res.data.records;
|
|
|
+ arr = arr.sort(
|
|
|
+ (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
|
|
|
+ );
|
|
|
+ this.zhList = arr;
|
|
|
+ if (arr.filter((a) => a.gpbcDefault == "1").length > 0) {
|
|
|
+ this.form.gyszh = arr.filter(
|
|
|
+ (a) => a.gpbcDefault == "1"
|
|
|
+ )[0].extensionId;
|
|
|
+ this.form.zh = arr.filter((a) => a.gpbcDefault == "1")[0].unionpay;
|
|
|
+ this.form.khh = arr.filter((a) => a.gpbcDefault == "1")[0].bank;
|
|
|
+ } else {
|
|
|
+ this.form.gyszh = arr[0].extensionId;
|
|
|
+ this.zhChange(arr[0].extensionId);
|
|
|
}
|
|
|
- });
|
|
|
-
|
|
|
- let postData = {
|
|
|
- areaId: this.form.glqy,
|
|
|
- userId: localStorage.user_id,
|
|
|
- };
|
|
|
- getProjectList(postData).then((res) => {
|
|
|
- this.glxmList = res.items;
|
|
|
- });
|
|
|
- let gys = this.gysList.filter((a) => a.gpId == data.supplierId);
|
|
|
- if (gys.length) {
|
|
|
- this.form.gffzr = gys[0].gpcName;
|
|
|
- this.form.gyslxdh = gys[0].gpcPhone;
|
|
|
}
|
|
|
- } else {
|
|
|
- this.$Message.error(res.message);
|
|
|
+ });
|
|
|
+ let gys = this.gysList.filter((a) => a.gpId == val);
|
|
|
+ if (gys.length > 0) {
|
|
|
+ let sup = gys[0];
|
|
|
+ if (!sup.gpcName || !sup.gpcPhone) {
|
|
|
+ this.$Message.error(
|
|
|
+ "该供应商用户信息不完整,请完善该供应商信息再选择此供应商!"
|
|
|
+ );
|
|
|
+ this.gysGo = false;
|
|
|
+ this.form.gffzr = "";
|
|
|
+ this.form.gyslxdh = "";
|
|
|
+ this.form.khh = "";
|
|
|
+ this.form.zh = "";
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ this.form.gffzr = sup.gpcName;
|
|
|
+ this.form.gyslxdh = sup.gpcPhone;
|
|
|
+ // bank开户行 unionpay银行账号
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- //编辑结算详情
|
|
|
- editJs() {
|
|
|
- let arr = [];
|
|
|
- for (let i in this.tableData) {
|
|
|
- this.tableData[i].totalPrice = Number(
|
|
|
- this.tableData[i].totalPrice
|
|
|
- ).toFixed(2);
|
|
|
- }
|
|
|
- let postData = {
|
|
|
- settlementId: this.settlementId,
|
|
|
- projectId: this.form.glxm,
|
|
|
- projectName: this.glxmList.filter(
|
|
|
- (a) => a.projectId == this.form.glxm
|
|
|
- )[0].projectName,
|
|
|
- areaId: this.form.glqy,
|
|
|
- areaName: this.glqyList.filter((a) => a.areaId == this.form.glqy)[0]
|
|
|
- .areaName,
|
|
|
- supplierId: this.form.gys,
|
|
|
- supplierCode: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
|
|
|
- .gpNumber,
|
|
|
- supplierName: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
|
|
|
- .gpName,
|
|
|
- supplierPrincipal: this.form.gffzr,
|
|
|
- supplierTel: this.form.gyslxdh,
|
|
|
- depositBank: this.form.khh,
|
|
|
- accountNumber: this.form.zh,
|
|
|
- extensionId: this.form.gyszh,
|
|
|
- // type: this.form.djlx,
|
|
|
- receivedName: this.form.shr,
|
|
|
- warehouseTime: this.tableData.length
|
|
|
- ? this.tableData[0].storehouseTime
|
|
|
- : "",
|
|
|
- adjustmentPrice: this.form.tzje.toFixed(2),
|
|
|
- instruction: this.form.sm,
|
|
|
- attachmentList: this.form.filesList,
|
|
|
- applicantId: localStorage.user_id,
|
|
|
- applicantName: localStorage.user_name,
|
|
|
- attachmentList: this.form.filesList,
|
|
|
- detailList: this.tableData,
|
|
|
- };
|
|
|
- // console.log(postData);
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- editPurchaseSettlement(postData).then((res) => {
|
|
|
+ },
|
|
|
+ //供应商账号切换
|
|
|
+ zhChange(val) {
|
|
|
+ if (val != "" && val) {
|
|
|
+ this.form.khh = this.zhList.filter((a) => a.extensionId == val)[0].bank;
|
|
|
+ this.form.zh = this.zhList.filter(
|
|
|
+ (a) => a.extensionId == val
|
|
|
+ )[0].unionpay;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //查询结算详情
|
|
|
+ getJs(settlementId) {
|
|
|
+ this.spinShow = true;
|
|
|
+ queryPurchaseSettlementInfo(settlementId).then((res) => {
|
|
|
+ this.spinShow = false;
|
|
|
if (res.status == 200) {
|
|
|
- this.$Message.success("编辑结算详情成功!");
|
|
|
- this.getJs(this.settlementId);
|
|
|
- resolve();
|
|
|
+ let data = res.data;
|
|
|
+ this.form.bt = data.title;
|
|
|
+ this.form.glqy = Number(data.areaId);
|
|
|
+ this.form.glxm = data.projectId;
|
|
|
+ this.form.gys = data.supplierId;
|
|
|
+ this.form.gffzr = data.supplierPrincipal;
|
|
|
+ this.form.gyslxdh = Number(data.supplierTel);
|
|
|
+ this.form.khh = data.depositBank;
|
|
|
+ this.form.zh = data.accountNumber;
|
|
|
+ this.form.gyszh = data.extensionId;
|
|
|
+ // this.form.djlx = data.type;
|
|
|
+ this.form.shr = data.receivedName;
|
|
|
+ this.form.spzt = data.approvalState;
|
|
|
+ this.form.sqr = data.applicantName;
|
|
|
+ this.form.xdsj = data.orderTime;
|
|
|
+ this.form.tzje = data.adjustmentPrice;
|
|
|
+ this.form.jssqbh = data.settlementCode;
|
|
|
+ this.form.sm = data.instruction;
|
|
|
+ this.form.rksj = data.warehouseTime;
|
|
|
+ this.balanceType = "edit";
|
|
|
+ this.form.filesList = data.attachmentList;
|
|
|
+ for (let i in data.detailList) {
|
|
|
+ data.detailList[i].totalPrice = data.detailList[
|
|
|
+ i
|
|
|
+ ].totalPrice.toFixed(2);
|
|
|
+ }
|
|
|
+ this.tableData = data.detailList;
|
|
|
+ this.requestId = data.requestId;
|
|
|
+
|
|
|
+ let pStr = `10000/1?gpId=${data.supplierId}`;
|
|
|
+ let pData = {
|
|
|
+ gpId: data.supplierId,
|
|
|
+ };
|
|
|
+ goodProviderBankCardPageList(pData, pStr).then((res) => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ let arr = res.data.records;
|
|
|
+ arr = arr.sort(
|
|
|
+ (a, b) => +new Date(a.operateDate) - new Date(b.operateDate)
|
|
|
+ );
|
|
|
+ this.zhList = arr;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ let postData = {
|
|
|
+ areaId: this.form.glqy,
|
|
|
+ userId: localStorage.user_id,
|
|
|
+ };
|
|
|
+ getProjectList(postData).then((res) => {
|
|
|
+ this.glxmList = res.items;
|
|
|
+ });
|
|
|
+ let gys = this.gysList.filter((a) => a.gpId == data.supplierId);
|
|
|
+ if (gys.length) {
|
|
|
+ this.form.gffzr = gys[0].gpcName;
|
|
|
+ this.form.gyslxdh = gys[0].gpcPhone;
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$Message.error(res.message);
|
|
|
- reject();
|
|
|
}
|
|
|
});
|
|
|
- });
|
|
|
- },
|
|
|
- submitJs() {
|
|
|
- if (this.submitLoading) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- this.submitLoading = true;
|
|
|
- this.editJs()
|
|
|
- .then(() => {
|
|
|
- let postData = {
|
|
|
- settlementId: this.settlementId,
|
|
|
- };
|
|
|
- submitPurchaseSettlement(postData).then((res) => {
|
|
|
- this.submitLoading = false;
|
|
|
+ },
|
|
|
+ //编辑结算详情
|
|
|
+ editJs() {
|
|
|
+ let arr = [];
|
|
|
+ for (let i in this.tableData) {
|
|
|
+ this.tableData[i].totalPrice = Number(
|
|
|
+ this.tableData[i].totalPrice
|
|
|
+ ).toFixed(2);
|
|
|
+ }
|
|
|
+ let postData = {
|
|
|
+ settlementId: this.settlementId,
|
|
|
+ projectId: this.form.glxm,
|
|
|
+ projectName: this.glxmList.filter(
|
|
|
+ (a) => a.projectId == this.form.glxm
|
|
|
+ )[0].projectName,
|
|
|
+ areaId: this.form.glqy,
|
|
|
+ areaName: this.glqyList.filter((a) => a.areaId == this.form.glqy)[0]
|
|
|
+ .areaName,
|
|
|
+ supplierId: this.form.gys,
|
|
|
+ supplierCode: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
|
|
|
+ .gpNumber,
|
|
|
+ supplierName: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
|
|
|
+ .gpName,
|
|
|
+ supplierPrincipal: this.form.gffzr,
|
|
|
+ supplierTel: this.form.gyslxdh,
|
|
|
+ depositBank: this.form.khh,
|
|
|
+ accountNumber: this.form.zh,
|
|
|
+ extensionId: this.form.gyszh,
|
|
|
+ // type: this.form.djlx,
|
|
|
+ receivedName: this.form.shr,
|
|
|
+ warehouseTime: this.tableData.length ?
|
|
|
+ this.tableData[0].storehouseTime : "",
|
|
|
+ adjustmentPrice: this.form.tzje.toFixed(2),
|
|
|
+ instruction: this.form.sm,
|
|
|
+ attachmentList: this.form.filesList,
|
|
|
+ applicantId: localStorage.user_id,
|
|
|
+ applicantName: localStorage.user_name,
|
|
|
+ attachmentList: this.form.filesList,
|
|
|
+ detailList: this.tableData,
|
|
|
+ };
|
|
|
+ // console.log(postData);
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ editPurchaseSettlement(postData).then((res) => {
|
|
|
if (res.status == 200) {
|
|
|
- this.$Message.success("提交结算详情成功!");
|
|
|
+ this.$Message.success("编辑结算详情成功!");
|
|
|
this.getJs(this.settlementId);
|
|
|
+ resolve();
|
|
|
} else {
|
|
|
this.$Message.error(res.message);
|
|
|
+ reject();
|
|
|
}
|
|
|
});
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.submitLoading = false;
|
|
|
});
|
|
|
- },
|
|
|
- //审批记录跳转
|
|
|
- toSpjl() {
|
|
|
- let link = `http://gdoa1.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
|
|
|
- window.open(link);
|
|
|
- },
|
|
|
- //新增结算
|
|
|
- addJs() {
|
|
|
- let mArr = ["glqy", "glxm", "gys", "khh", "zh", "sqr"];
|
|
|
- for (let item in mArr) {
|
|
|
- let it = mArr[item];
|
|
|
- if (!this.form[it]) {
|
|
|
- this.$Message.error("请将信息填写完整!");
|
|
|
- console.log(it);
|
|
|
+ },
|
|
|
+ submitJs() {
|
|
|
+ if (this.submitLoading) {
|
|
|
return false;
|
|
|
}
|
|
|
- if (this.form[it] == "" || this.form[it].length == 0) {
|
|
|
- this.$Message.error("请将信息填写完整!");
|
|
|
- console.log(it);
|
|
|
+ this.submitLoading = true;
|
|
|
+ this.editJs()
|
|
|
+ .then(() => {
|
|
|
+ let postData = {
|
|
|
+ settlementId: this.settlementId,
|
|
|
+ };
|
|
|
+ submitPurchaseSettlement(postData).then((res) => {
|
|
|
+ this.submitLoading = false;
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.$Message.success("提交结算详情成功!");
|
|
|
+ this.getJs(this.settlementId);
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.submitLoading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //审批记录跳转
|
|
|
+ toSpjl() {
|
|
|
+ let link =
|
|
|
+ `http://oa.kingser.com:88/westvalley/PSWorkflow/PSWorkflowDecode.jsp?loginmsg=bG9naW5pZD1wbXMmdXNlcnBhc3N3b3JkPVBBYjEyMzQ1Nio=&requestid=${this.requestId}`;
|
|
|
+ window.open(link);
|
|
|
+ },
|
|
|
+ //新增结算
|
|
|
+ addJs() {
|
|
|
+ let mArr = ["glqy", "glxm", "gys", "khh", "zh", "sqr"];
|
|
|
+ for (let item in mArr) {
|
|
|
+ let it = mArr[item];
|
|
|
+ if (!this.form[it]) {
|
|
|
+ this.$Message.error("请将信息填写完整!");
|
|
|
+ console.log(it);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (this.form[it] == "" || this.form[it].length == 0) {
|
|
|
+ this.$Message.error("请将信息填写完整!");
|
|
|
+ console.log(it);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!this.gysGo) {
|
|
|
+ this.$Message.error(
|
|
|
+ "供应商信息不完整,请完善供应商信息或选择其他供应商!"
|
|
|
+ );
|
|
|
return false;
|
|
|
}
|
|
|
- }
|
|
|
- if (!this.gysGo) {
|
|
|
- this.$Message.error(
|
|
|
- "供应商信息不完整,请完善供应商信息或选择其他供应商!"
|
|
|
- );
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (this.balanceType == "edit") {
|
|
|
- this.editJs();
|
|
|
- return false;
|
|
|
- }
|
|
|
- let postData = {
|
|
|
- areaId: this.form.glqy,
|
|
|
- projectId: this.form.glxm,
|
|
|
- areaName: this.glqyList.filter((a) => a.areaId == this.form.glqy)[0]
|
|
|
- .areaName,
|
|
|
- projectName: this.glxmList.filter(
|
|
|
- (a) => a.projectId == this.form.glxm
|
|
|
- )[0].projectName,
|
|
|
- supplierId: this.form.gys,
|
|
|
- supplierCode: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
|
|
|
- .gpNumber,
|
|
|
- supplierName: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
|
|
|
- .gpName,
|
|
|
- supplierPrincipal: this.form.gffzr,
|
|
|
- supplierTel: this.form.gyslxdh,
|
|
|
- depositBank: this.form.khh,
|
|
|
- accountNumber: this.form.zh,
|
|
|
- extensionId: this.form.gyszh,
|
|
|
- // type: this.form.djlx,
|
|
|
- receivedName: this.form.shr,
|
|
|
- // recivedTel: this,
|
|
|
- adjustmentPrice: Number(this.form.tzje).toFixed(2),
|
|
|
- instruction: this.form.sm,
|
|
|
- attachmentList: this.form.filesList,
|
|
|
- applicantId: localStorage.user_id,
|
|
|
- applicantName: localStorage.user_name,
|
|
|
- };
|
|
|
- this.spinShow = true;
|
|
|
- addPurchaseSettlement(postData).then((res) => {
|
|
|
+ if (this.balanceType == "edit") {
|
|
|
+ this.editJs();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ let postData = {
|
|
|
+ areaId: this.form.glqy,
|
|
|
+ projectId: this.form.glxm,
|
|
|
+ areaName: this.glqyList.filter((a) => a.areaId == this.form.glqy)[0]
|
|
|
+ .areaName,
|
|
|
+ projectName: this.glxmList.filter(
|
|
|
+ (a) => a.projectId == this.form.glxm
|
|
|
+ )[0].projectName,
|
|
|
+ supplierId: this.form.gys,
|
|
|
+ supplierCode: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
|
|
|
+ .gpNumber,
|
|
|
+ supplierName: this.gysList.filter((a) => a.gpId == this.form.gys)[0]
|
|
|
+ .gpName,
|
|
|
+ supplierPrincipal: this.form.gffzr,
|
|
|
+ supplierTel: this.form.gyslxdh,
|
|
|
+ depositBank: this.form.khh,
|
|
|
+ accountNumber: this.form.zh,
|
|
|
+ extensionId: this.form.gyszh,
|
|
|
+ // type: this.form.djlx,
|
|
|
+ receivedName: this.form.shr,
|
|
|
+ // recivedTel: this,
|
|
|
+ adjustmentPrice: Number(this.form.tzje).toFixed(2),
|
|
|
+ instruction: this.form.sm,
|
|
|
+ attachmentList: this.form.filesList,
|
|
|
+ applicantId: localStorage.user_id,
|
|
|
+ applicantName: localStorage.user_name,
|
|
|
+ };
|
|
|
+ this.spinShow = true;
|
|
|
+ addPurchaseSettlement(postData).then((res) => {
|
|
|
+ this.spinShow = false;
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.$Message.success("新增采购结算成功");
|
|
|
+ this.form.jssqbh = res.data.settlementCode;
|
|
|
+ this.form.xdsj = res.data.orderTime;
|
|
|
+ this.settlementId = res.data.settlementId;
|
|
|
+ this.form.filesList = res.data.attachmentList;
|
|
|
+ this.balanceType = "edit";
|
|
|
+ } else {
|
|
|
+ this.$Message.error(res.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 新增明细弹窗
|
|
|
+ addMxShow() {
|
|
|
+ this.contentShow = false;
|
|
|
+ let arr = [];
|
|
|
+ for (let item in this.tableData) {
|
|
|
+ arr.push(this.tableData[item].orderId);
|
|
|
+ }
|
|
|
+ this.$refs.mxAdd.orderIds = arr;
|
|
|
+ this.$refs.mxAdd.gysId = this.form.gys;
|
|
|
+ this.$refs.mxAdd.addForm.ssxm = this.form.glxm;
|
|
|
+ this.$refs.mxAdd.getTableData();
|
|
|
+ },
|
|
|
+ //列表方法
|
|
|
+ getTableData() {
|
|
|
this.spinShow = false;
|
|
|
- if (res.status == 200) {
|
|
|
- this.$Message.success("新增采购结算成功");
|
|
|
- this.form.jssqbh = res.data.settlementCode;
|
|
|
- this.form.xdsj = res.data.orderTime;
|
|
|
- this.settlementId = res.data.settlementId;
|
|
|
- this.form.filesList = res.data.attachmentList;
|
|
|
- this.balanceType = "edit";
|
|
|
- } else {
|
|
|
- this.$Message.error(res.message);
|
|
|
+ },
|
|
|
+ tableOnSelect(selection, row) {},
|
|
|
+ //添加明细
|
|
|
+ addMx(list) {
|
|
|
+ for (let item in list) {
|
|
|
+ list[item].totalPrice = list[item].totalPrice.toFixed(2);
|
|
|
+ if (this.tableData.filter(a => a.warehouseEntryId == list[item].warehouseEntryId).length == 0) {
|
|
|
+ this.tableData.push(list[item])
|
|
|
+ }
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- // 新增明细弹窗
|
|
|
- addMxShow() {
|
|
|
- this.contentShow = false;
|
|
|
- let arr = [];
|
|
|
- for (let item in this.tableData) {
|
|
|
- arr.push(this.tableData[item].orderId);
|
|
|
- }
|
|
|
- this.$refs.mxAdd.orderIds = arr;
|
|
|
- this.$refs.mxAdd.gysId = this.form.gys;
|
|
|
- this.$refs.mxAdd.addForm.ssxm = this.form.glxm;
|
|
|
- this.$refs.mxAdd.getTableData();
|
|
|
- },
|
|
|
- //列表方法
|
|
|
- getTableData() {
|
|
|
- this.spinShow = false;
|
|
|
- },
|
|
|
- tableOnSelect(selection, row) {},
|
|
|
- //添加明细
|
|
|
- addMx(list) {
|
|
|
- for (let item in list) {
|
|
|
- list[item].totalPrice = list[item].totalPrice.toFixed(2);
|
|
|
- }
|
|
|
- this.tableData = list;
|
|
|
- // this.form.rksj = this.tableData[0].storehouseTime;
|
|
|
- // if (this.form.shr == "" && this.tableData.length) {
|
|
|
- // this.form.shr = this.tableData[0].warehouseKeeper;
|
|
|
- // }
|
|
|
- },
|
|
|
- //删除明细
|
|
|
- deleteMx(row, index) {
|
|
|
- this.tableData.splice(index, 1);
|
|
|
- },
|
|
|
- //取消、返回
|
|
|
- cancel() {
|
|
|
- this.spinShow = false;
|
|
|
- this.submitLoading = false;
|
|
|
- this.balanceType = "add";
|
|
|
- this.gysGo = true;
|
|
|
- this.form = {
|
|
|
- jssqbh: "", //结算申请编号
|
|
|
- bt: "", //标题
|
|
|
- glqy: "", //关联区域
|
|
|
- glxm: "", //关联项目
|
|
|
- gys: "", //供应商
|
|
|
- gffzr: "", //供方负责人
|
|
|
- gyslxdh: "", //供应商联系电话
|
|
|
- khh: "", //开户行
|
|
|
- gyszh: "", //供应商账号 工具值
|
|
|
- zh: "", //账号
|
|
|
- djlx: "", //单据类型
|
|
|
- rksj: "", //入库时间
|
|
|
- shr: "", //收货人
|
|
|
- tzje: 0, //调整金额
|
|
|
- xdsj: "", //下单时间
|
|
|
- sqr: localStorage.user_name, //申请人
|
|
|
- spzt: 1, //审批状态
|
|
|
- sm: "", //说明
|
|
|
- total: 0, //总价
|
|
|
- filesList: [],
|
|
|
- };
|
|
|
- this.tableData = [];
|
|
|
- this.$emit("return");
|
|
|
+ // this.tableData = list;
|
|
|
+ // this.form.rksj = this.tableData[0].storehouseTime;
|
|
|
+ // if (this.form.shr == "" && this.tableData.length) {
|
|
|
+ // this.form.shr = this.tableData[0].warehouseKeeper;
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ //删除明细
|
|
|
+ deleteMx(row, index) {
|
|
|
+ this.tableData.splice(index, 1);
|
|
|
+ },
|
|
|
+ //取消、返回
|
|
|
+ cancel() {
|
|
|
+ this.spinShow = false;
|
|
|
+ this.submitLoading = false;
|
|
|
+ this.balanceType = "add";
|
|
|
+ this.gysGo = true;
|
|
|
+ this.form = {
|
|
|
+ jssqbh: "", //结算申请编号
|
|
|
+ bt: "", //标题
|
|
|
+ glqy: "", //关联区域
|
|
|
+ glxm: "", //关联项目
|
|
|
+ gys: "", //供应商
|
|
|
+ gffzr: "", //供方负责人
|
|
|
+ gyslxdh: "", //供应商联系电话
|
|
|
+ khh: "", //开户行
|
|
|
+ gyszh: "", //供应商账号 工具值
|
|
|
+ zh: "", //账号
|
|
|
+ djlx: "", //单据类型
|
|
|
+ rksj: "", //入库时间
|
|
|
+ shr: "", //收货人
|
|
|
+ tzje: 0, //调整金额
|
|
|
+ xdsj: "", //下单时间
|
|
|
+ sqr: localStorage.user_name, //申请人
|
|
|
+ spzt: 1, //审批状态
|
|
|
+ sm: "", //说明
|
|
|
+ total: 0, //总价
|
|
|
+ filesList: [],
|
|
|
+ };
|
|
|
+ this.tableData = [];
|
|
|
+ this.$emit("return");
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
- watch: {
|
|
|
- tableData(val) {
|
|
|
- let num = 0;
|
|
|
- for (let item in val) {
|
|
|
- num += Number(val[item].totalPrice);
|
|
|
- }
|
|
|
- if (val.length) {
|
|
|
- console.log(val[0]);
|
|
|
- this.form.rksj = val[0].storehouseTime;
|
|
|
- } else {
|
|
|
- this.form.rksj = "";
|
|
|
- }
|
|
|
- if (this.form.shr == "" && val.length) {
|
|
|
- this.form.shr = val[0].warehouseKeeper;
|
|
|
- }
|
|
|
- this.form.total = Number(num).toFixed(2);
|
|
|
+ watch: {
|
|
|
+ tableData(val) {
|
|
|
+ let num = 0;
|
|
|
+ for (let item in val) {
|
|
|
+ num += Number(val[item].totalPrice);
|
|
|
+ }
|
|
|
+ if (val.length) {
|
|
|
+ console.log(val[0]);
|
|
|
+ this.form.rksj = val[0].storehouseTime;
|
|
|
+ } else {
|
|
|
+ this.form.rksj = "";
|
|
|
+ }
|
|
|
+ if (this.form.shr == "" && val.length) {
|
|
|
+ this.form.shr = val[0].warehouseKeeper;
|
|
|
+ }
|
|
|
+ this.form.total = Number(num).toFixed(2);
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
-};
|
|
|
+ };
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-.mustSpan {
|
|
|
- color: red;
|
|
|
- margin-left: 2px;
|
|
|
-}
|
|
|
-button {
|
|
|
- min-width: 80px;
|
|
|
-}
|
|
|
-.uplCont {
|
|
|
- border-left: 1px solid #e4e4e4;
|
|
|
- .upl {
|
|
|
- flex: auto;
|
|
|
- border-right: 1px solid #e4e4e4;
|
|
|
- &:nth-child(1) {
|
|
|
- background: #f8f9fb;
|
|
|
+ .mustSpan {
|
|
|
+ color: red;
|
|
|
+ margin-left: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ button {
|
|
|
+ min-width: 80px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .uplCont {
|
|
|
+ border-left: 1px solid #e4e4e4;
|
|
|
+
|
|
|
+ .upl {
|
|
|
+ flex: auto;
|
|
|
+ border-right: 1px solid #e4e4e4;
|
|
|
+
|
|
|
+ &:nth-child(1) {
|
|
|
+ background: #f8f9fb;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .uplf {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
+ min-height: 80px;
|
|
|
}
|
|
|
}
|
|
|
- .uplf {
|
|
|
+
|
|
|
+ .mainCont .tables {
|
|
|
+ height: 50px;
|
|
|
+ border-right: 1px solid #e4e4e4;
|
|
|
+ border-bottom: 1px solid #e4e4e4;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- min-height: 80px;
|
|
|
+
|
|
|
+ &:nth-child(2n + 1) {
|
|
|
+ background: #f8f9fb;
|
|
|
+ }
|
|
|
}
|
|
|
-}
|
|
|
-.mainCont .tables {
|
|
|
- height: 50px;
|
|
|
- border-right: 1px solid #e4e4e4;
|
|
|
- border-bottom: 1px solid #e4e4e4;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- &:nth-child(2n + 1) {
|
|
|
- background: #f8f9fb;
|
|
|
+
|
|
|
+ .mainCont {
|
|
|
+ border-left: 1px solid #e4e4e4;
|
|
|
+ border-top: 1px solid #e4e4e4;
|
|
|
+ }
|
|
|
+
|
|
|
+ ivu-card-head-inner,
|
|
|
+ .ivu-card-head p {
|
|
|
+ display: inline-block;
|
|
|
+ width: 100%;
|
|
|
+ height: 20px;
|
|
|
+ line-height: 20px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #17233d;
|
|
|
+ font-weight: 700;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ font-weight: normal;
|
|
|
}
|
|
|
-}
|
|
|
-.mainCont {
|
|
|
- border-left: 1px solid #e4e4e4;
|
|
|
- border-top: 1px solid #e4e4e4;
|
|
|
-}
|
|
|
-ivu-card-head-inner,
|
|
|
-.ivu-card-head p {
|
|
|
- display: inline-block;
|
|
|
- width: 100%;
|
|
|
- height: 20px;
|
|
|
- line-height: 20px;
|
|
|
- font-size: 14px;
|
|
|
- color: #17233d;
|
|
|
- font-weight: 700;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- font-weight: normal;
|
|
|
-}
|
|
|
-</style>
|
|
|
+
|
|
|
+</style>
|