|
@@ -117,7 +117,7 @@
|
|
|
type="info"
|
|
|
icon="el-icon-printer"
|
|
|
size="small"
|
|
|
- >报 表</el-button>
|
|
|
+ >报表打印</el-button>
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button
|
|
@@ -241,6 +241,7 @@
|
|
|
v-model="row.storageId"
|
|
|
filterable
|
|
|
clearable
|
|
|
+ @change="storageChange(row)"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="(item, index) in storageOptions"
|
|
@@ -278,36 +279,21 @@
|
|
|
v-dialog-drag
|
|
|
>
|
|
|
<span>
|
|
|
- <el-row>
|
|
|
- <el-col :span="4">
|
|
|
- <div>
|
|
|
- <el-scrollbar>
|
|
|
- <basic-container>
|
|
|
- <avue-tree
|
|
|
- :option="treeOption"
|
|
|
- @node-click="nodeClick"
|
|
|
- :style="treeStyle"
|
|
|
- />
|
|
|
- </basic-container>
|
|
|
- </el-scrollbar>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="20">
|
|
|
- <avue-crud
|
|
|
- :option="goodsOption"
|
|
|
- :table-loading="loading"
|
|
|
- :data="goodsListShow"
|
|
|
- ref="goodsCrud"
|
|
|
- :search.sync="search"
|
|
|
- @search-change="searchChange"
|
|
|
- @selection-change="selectionChange"
|
|
|
- @row-click="rowClick"
|
|
|
- :page.sync="page"
|
|
|
- @on-load="onLoad"
|
|
|
- @saveColumn="saveGoodsColumn"
|
|
|
- @resetColumn="resetGoodsColumn"
|
|
|
- :cell-style="cellStyle"
|
|
|
- >
|
|
|
+ <avue-crud
|
|
|
+ :option="goodsOption"
|
|
|
+ :table-loading="loading"
|
|
|
+ :data="goodsListShow"
|
|
|
+ ref="goodsCrud"
|
|
|
+ :search.sync="search"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ @row-click="rowClick"
|
|
|
+ :page.sync="page"
|
|
|
+ @on-load="onLoad"
|
|
|
+ @saveColumn="saveGoodsColumn"
|
|
|
+ @resetColumn="resetGoodsColumn"
|
|
|
+ :cell-style="cellStyle"
|
|
|
+ >
|
|
|
<template slot="menuLeft">
|
|
|
<el-tabs v-model="activeName" @tab-click="tabHandle">
|
|
|
<el-tab-pane label="查询结果" name="searchList"></el-tab-pane>
|
|
@@ -334,8 +320,6 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
</span>
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -408,6 +392,7 @@ import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
import check from "@/components/check/check";
|
|
|
import checkSchedule from "@/components/check/checkSchedule";
|
|
|
import {customerList as storageList} from "@/api/basicData/basicStorageDesc";
|
|
|
+import {getStockList} from "@/api/officeSupplies/stock";
|
|
|
|
|
|
export default {
|
|
|
name: "detail",
|
|
@@ -802,9 +787,21 @@ export default {
|
|
|
},
|
|
|
//商品查询
|
|
|
onLoad(page, params = {}) {
|
|
|
- let obj = this.deepClone(Object.assign(params, this.search));
|
|
|
+ let queryParams = Object.assign({}, params, {
|
|
|
+ size: page.pageSize,
|
|
|
+ current: page.currentPage,
|
|
|
+ tradeType: 'BGYP',
|
|
|
+ })
|
|
|
+ if (queryParams.inDate && queryParams.inDate.length > 0) {
|
|
|
+ queryParams = {
|
|
|
+ ...queryParams,
|
|
|
+ beginInDate: queryParams.inDate[0],
|
|
|
+ endInDate: queryParams.inDate[1],
|
|
|
+ }
|
|
|
+ }
|
|
|
+ delete queryParams.inDate;
|
|
|
this.loading = true;
|
|
|
- getGoods(page.currentPage, page.pageSize, this.treeDeptId, obj)
|
|
|
+ getStockList(queryParams)
|
|
|
.then(res => {
|
|
|
const data = res.data.data;
|
|
|
this.page.total = data.total;
|
|
@@ -885,14 +882,14 @@ export default {
|
|
|
this.selectionList.forEach(e => {
|
|
|
this.dataList.forEach(async (item, index) => {
|
|
|
if (index == this.reData.index) {
|
|
|
- item.itemId = e.id;
|
|
|
+ item.itemId = e.goodsId;
|
|
|
item.code = e.code;
|
|
|
item.cname = e.cname;
|
|
|
item.corpId = e.corpId;
|
|
|
item.corpName = e.corpName;
|
|
|
item.unit = e.unit;
|
|
|
item.priceCategory = e.goodsTypeName;
|
|
|
- item.price = e.price;
|
|
|
+ item.price = e.unitPrice;
|
|
|
item.$cellEdit = true;
|
|
|
}
|
|
|
});
|
|
@@ -902,23 +899,24 @@ export default {
|
|
|
if (this.goodsListSave.length > 0) { // 暂存的有数据
|
|
|
this.goodsListSave.forEach(async e => {
|
|
|
this.dataList.push({
|
|
|
- itemId: e.id,
|
|
|
+ itemId: e.goodsId,
|
|
|
code: e.code,
|
|
|
cname: e.cname,
|
|
|
corpId: e.corpId,
|
|
|
corpName: e.corpName,
|
|
|
unit: e.unit,
|
|
|
- price: e.price,
|
|
|
+ price: e.unitPrice,
|
|
|
amount: 0,
|
|
|
orderQuantity: 0,
|
|
|
storageId: this.storageOptions.length > 0? this.storageOptions[0].id: null,
|
|
|
+ storageName: this.storageOptions.length > 0? this.storageOptions[0].cname: null,
|
|
|
$cellEdit: true
|
|
|
});
|
|
|
});
|
|
|
} else {
|
|
|
this.selectionList.forEach(async e => {
|
|
|
this.dataList.push({
|
|
|
- itemId: e.id,
|
|
|
+ itemId: e.goodsId,
|
|
|
code: e.code,
|
|
|
cname: e.cname,
|
|
|
corpId: e.corpId,
|
|
@@ -926,8 +924,9 @@ export default {
|
|
|
unit: e.unit,
|
|
|
amount: 0,
|
|
|
orderQuantity: 0,
|
|
|
- price: e.price,
|
|
|
+ price: e.unitPrice,
|
|
|
storageId: this.storageOptions.length > 0? this.storageOptions[0].id: null,
|
|
|
+ storageName: this.storageOptions.length > 0? this.storageOptions[0].cname: null,
|
|
|
$cellEdit: true
|
|
|
});
|
|
|
});
|
|
@@ -986,6 +985,9 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ storageChange(row) {
|
|
|
+ this.$set(row, 'storageName', this.storageOptions.find(item => item.id == row.storageId).cname);
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|