|
@@ -1,25 +1,31 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <Card style="width:100%" :bordered="false" :dis-hover="true">
|
|
|
+ <Card style="width: 100%" :bordered="false" :dis-hover="true">
|
|
|
<p slot="title">新增结算明细</p>
|
|
|
<div slot="extra">
|
|
|
<Button @click="returnq">返回</Button>
|
|
|
</div>
|
|
|
<Row :gutter="10" style="margin-bottom: 10px">
|
|
|
<Col span="4">
|
|
|
- <Select v-model="addForm.ssxm" disabled placeholder="项目名称" style="width: 95%">
|
|
|
+ <Select
|
|
|
+ v-model="addForm.ssxm"
|
|
|
+ disabled
|
|
|
+ placeholder="项目名称"
|
|
|
+ style="width: 95%"
|
|
|
+ >
|
|
|
<Option
|
|
|
v-for="item in ssxmList"
|
|
|
:value="item.projectId"
|
|
|
:key="item.projectId"
|
|
|
- >{{ item.projectName }}</Option>
|
|
|
+ >{{ item.projectName }}</Option
|
|
|
+ >
|
|
|
</Select>
|
|
|
</Col>
|
|
|
<Col span="4">
|
|
|
<DatePicker
|
|
|
format="yyyy-MM-dd"
|
|
|
:value="addForm.xdsj"
|
|
|
- @on-change="addForm.xdsj=$event"
|
|
|
+ @on-change="addForm.xdsj = $event"
|
|
|
type="daterange"
|
|
|
placeholder="下单时间"
|
|
|
></DatePicker>
|
|
@@ -28,17 +34,25 @@
|
|
|
<DatePicker
|
|
|
format="yyyy-MM-dd"
|
|
|
:value="addForm.rksj"
|
|
|
- @on-change="addForm.rksj=$event"
|
|
|
+ @on-change="addForm.rksj = $event"
|
|
|
type="daterange"
|
|
|
placeholder="入库时间"
|
|
|
></DatePicker>
|
|
|
</Col>
|
|
|
<Col span="4">
|
|
|
- <Input v-model="addForm.rkd" placeholder="入库单" style="width: 95%" />
|
|
|
+ <Input
|
|
|
+ v-model="addForm.rkd"
|
|
|
+ placeholder="入库单"
|
|
|
+ style="width: 95%"
|
|
|
+ />
|
|
|
</Col>
|
|
|
<Col span="8">
|
|
|
- <Button type="primary" style="width: 80px" @click="getTableData">查询</Button>
|
|
|
- <Button type="primary" style="width: 80px" @click="addMx">添加</Button>
|
|
|
+ <Button type="primary" style="width: 80px" @click="getTableData"
|
|
|
+ >查询</Button
|
|
|
+ >
|
|
|
+ <Button type="primary" style="width: 80px" @click="addMx"
|
|
|
+ >添加</Button
|
|
|
+ >
|
|
|
</Col>
|
|
|
</Row>
|
|
|
<Table
|
|
@@ -69,7 +83,7 @@
|
|
|
<script>
|
|
|
import {
|
|
|
hajwySettlementList,
|
|
|
- checkSettlementInvoiceTitle
|
|
|
+ checkSettlementInvoiceTitle,
|
|
|
} from "@/service/getData";
|
|
|
export default {
|
|
|
name: "balanceMxAdd",
|
|
@@ -84,23 +98,23 @@ export default {
|
|
|
ssxm: "", //项目名称
|
|
|
xdsj: ["", ""], //下单时间
|
|
|
rksj: ["", ""], //入库时间
|
|
|
- rkd: "" //入库单
|
|
|
+ rkd: "", //入库单
|
|
|
},
|
|
|
//表格查询内容
|
|
|
searchForm: {
|
|
|
yjfl: "", //一级分类
|
|
|
ejfl: "", // 二级分类
|
|
|
- wlmc: "" //物料编码或名称
|
|
|
+ wlmc: "", //物料编码或名称
|
|
|
},
|
|
|
yjflList: [
|
|
|
{ label: "1", value: "1" },
|
|
|
{ label: "2", value: "2" },
|
|
|
- { label: "3", value: "3" }
|
|
|
+ { label: "3", value: "3" },
|
|
|
],
|
|
|
ejflList: [
|
|
|
{ label: "1", value: "1" },
|
|
|
{ label: "2", value: "2" },
|
|
|
- { label: "3", value: "3" }
|
|
|
+ { label: "3", value: "3" },
|
|
|
],
|
|
|
jldwList: [],
|
|
|
wllxList: [],
|
|
@@ -175,10 +189,10 @@ export default {
|
|
|
tooltip: true,
|
|
|
width: 120,
|
|
|
resizable: true,
|
|
|
- }
|
|
|
+ },
|
|
|
],
|
|
|
tableData: [],
|
|
|
- tableSelect: []
|
|
|
+ tableSelect: [],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -192,7 +206,7 @@ export default {
|
|
|
storehouseTimeStart: this.addForm.rksj[0],
|
|
|
storehouseTimeEnd: this.addForm.rksj[1],
|
|
|
warehouseEntry: this.addForm.rkd,
|
|
|
- supplierId: this.gysId
|
|
|
+ supplierId: this.gysId,
|
|
|
// supplierId: 1000595
|
|
|
};
|
|
|
let postStr = "";
|
|
@@ -204,7 +218,7 @@ export default {
|
|
|
}
|
|
|
postStr = postStr.replace(/\&$/, "");
|
|
|
this.tableLoading = true;
|
|
|
- hajwySettlementList(postStr).then(res => {
|
|
|
+ hajwySettlementList(postStr).then((res) => {
|
|
|
this.tableLoading = false;
|
|
|
if (res.status == 200) {
|
|
|
this.tableData = res.data;
|
|
@@ -212,29 +226,33 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
tableOnSelect(selection, row) {
|
|
|
- this.tableSelect = selection;
|
|
|
+ console.log(selection);
|
|
|
+ this.$set(this, "tableSelect", selection);
|
|
|
},
|
|
|
tableOnCancel(selection, row) {
|
|
|
- this.tableSelect = selection;
|
|
|
+ console.log(selection);
|
|
|
+ this.$set(this, "tableSelect", selection);
|
|
|
},
|
|
|
returnq() {
|
|
|
this.addForm = {
|
|
|
ssxm: "", //项目名称
|
|
|
xdsj: ["", ""], //下单时间
|
|
|
rksj: ["", ""], //入库时间
|
|
|
- rkd: "" //入库单
|
|
|
+ rkd: "", //入库单
|
|
|
};
|
|
|
- this.orderIds = [];
|
|
|
+ this.$set(this, "orderIds", []);
|
|
|
this.$emit("return");
|
|
|
},
|
|
|
//添加明细
|
|
|
addMx() {
|
|
|
+ console.log(this.tableSelect);
|
|
|
+ console.log(this.orderIds);
|
|
|
for (let item in this.tableSelect) {
|
|
|
this.orderIds.push(this.tableSelect[item].orderId);
|
|
|
}
|
|
|
let arr = new Set(this.orderIds);
|
|
|
let tArr = [...arr];
|
|
|
- checkSettlementInvoiceTitle(tArr).then(res => {
|
|
|
+ checkSettlementInvoiceTitle(tArr).then((res) => {
|
|
|
if (res.status == 200) {
|
|
|
if (res.data == 1) {
|
|
|
this.$Message.error("请选择同一公司下的物料");
|
|
@@ -243,16 +261,17 @@ export default {
|
|
|
ssxm: "", //项目名称
|
|
|
xdsj: ["", ""], //下单时间
|
|
|
rksj: ["", ""], //入库时间
|
|
|
- rkd: "" //入库单
|
|
|
+ rkd: "", //入库单
|
|
|
};
|
|
|
- this.orderIds = [];
|
|
|
+ this.$set(this, "orderIds", []);
|
|
|
this.$emit("addMx", this.tableSelect);
|
|
|
this.$emit("return");
|
|
|
+ this.$set(this, "tableSelect", []);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|