|
@@ -1,87 +1,96 @@
|
|
<template>
|
|
<template>
|
|
- <basic-container>
|
|
|
|
- <avue-crud :option="option"
|
|
|
|
- :data="dataList"
|
|
|
|
- ref="crud"
|
|
|
|
- v-model="form"
|
|
|
|
- :page.sync="page"
|
|
|
|
- @row-del="rowDel"
|
|
|
|
- @row-update="rowUpdate"
|
|
|
|
- :before-open="beforeOpen"
|
|
|
|
- :before-close="beforeClose"
|
|
|
|
- @row-save="rowSave"
|
|
|
|
- @search-change="searchChange"
|
|
|
|
- @search-reset="searchReset"
|
|
|
|
- @selection-change="selectionChange"
|
|
|
|
- @current-change="currentChange"
|
|
|
|
- @size-change="sizeChange"
|
|
|
|
- @refresh-change="refreshChange"
|
|
|
|
- @on-load="onLoad"
|
|
|
|
- @expand-change="expandChange">
|
|
|
|
- <template slot-scope="scope" slot="expand">
|
|
|
|
- <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
|
|
|
|
- <el-table-column align="center" width="60"></el-table-column>
|
|
|
|
- <el-table-column type="selection" align="center" width="50"></el-table-column>
|
|
|
|
- <el-table-column label="序号" type="index" align="center" width="50"></el-table-column>
|
|
|
|
- <el-table-column label="提单号" prop="billNo" align="center" show-overflow-tooltip width="200"></el-table-column>
|
|
|
|
- <el-table-column label="货物品种" prop="priceCategoryNames" align="center" show-overflow-tooltip width="180"></el-table-column>
|
|
|
|
- <el-table-column label="件数" prop="purchaseQuantity" align="center" show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
- <el-table-column label="毛重(KG)" prop="grossWeight" align="center" show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
- <el-table-column label="净重(KG)" prop="netWeight" align="center" show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
- <el-table-column label="单价" prop="price" align="center" show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
- <el-table-column label="合同金额" prop="amount" align="center" show-overflow-tooltip width="180"></el-table-column>
|
|
|
|
- <el-table-column label="是否到货" prop="isArrival" align="center" show-overflow-tooltip width="200"></el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </template>
|
|
|
|
- <template slot="menuLeft">
|
|
|
|
- <el-button size="small"
|
|
|
|
- type="success"
|
|
|
|
- :disabled="true"
|
|
|
|
- @click.stop=""
|
|
|
|
- >复制新单
|
|
|
|
- </el-button>
|
|
|
|
- <el-button size="small"
|
|
|
|
- type="info"
|
|
|
|
- @click.stop="openReport()"
|
|
|
|
- >报表
|
|
|
|
- </el-button>
|
|
|
|
- </template>
|
|
|
|
- <template slot-scope="scope" slot="menu">
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-view"
|
|
|
|
- size="small"
|
|
|
|
- @click.stop="beforeOpenPage(scope.row,scope.index)"
|
|
|
|
- >查看
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- size="small"
|
|
|
|
- @click.stop="editOpen(scope.row,scope.index)"
|
|
|
|
- >编辑
|
|
|
|
- </el-button>
|
|
|
|
- <el-button
|
|
|
|
- type="text"
|
|
|
|
- icon="el-icon-delete"
|
|
|
|
- size="small"
|
|
|
|
- @click.stop="rowDel(scope.row,scope.index)"
|
|
|
|
- >删除
|
|
|
|
- </el-button>
|
|
|
|
- </template>
|
|
|
|
- </avue-crud>
|
|
|
|
- </basic-container>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <basic-container v-if="show">
|
|
|
|
+ <avue-crud :option="option"
|
|
|
|
+ :data="dataList"
|
|
|
|
+ ref="crud"
|
|
|
|
+ v-model="form"
|
|
|
|
+ :page.sync="page"
|
|
|
|
+ @row-del="rowDel"
|
|
|
|
+ @row-update="rowUpdate"
|
|
|
|
+ :before-open="beforeOpen"
|
|
|
|
+ :before-close="beforeClose"
|
|
|
|
+ @row-save="rowSave"
|
|
|
|
+ @search-change="searchChange"
|
|
|
|
+ @search-reset="searchReset"
|
|
|
|
+ @selection-change="selectionChange"
|
|
|
|
+ @current-change="currentChange"
|
|
|
|
+ @size-change="sizeChange"
|
|
|
|
+ @refresh-change="refreshChange"
|
|
|
|
+ @on-load="onLoad"
|
|
|
|
+ @expand-change="expandChange">
|
|
|
|
+ <template slot-scope="scope" slot="expand">
|
|
|
|
+ <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
|
|
|
|
+ <el-table-column align="center" width="60"></el-table-column>
|
|
|
|
+ <el-table-column type="selection" align="center" width="50"></el-table-column>
|
|
|
|
+ <el-table-column label="序号" type="index" align="center" width="50"></el-table-column>
|
|
|
|
+ <el-table-column label="提单号" prop="billNo" align="center" show-overflow-tooltip width="200"></el-table-column>
|
|
|
|
+ <el-table-column label="货物品种" prop="priceCategoryNames" align="center" show-overflow-tooltip width="180"></el-table-column>
|
|
|
|
+ <el-table-column label="件数" prop="purchaseQuantity" align="center" show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
+ <el-table-column label="毛重(KG)" prop="grossWeight" align="center" show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
+ <el-table-column label="净重(KG)" prop="netWeight" align="center" show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
+ <el-table-column label="单价" prop="price" align="center" show-overflow-tooltip width="120"></el-table-column>
|
|
|
|
+ <el-table-column label="合同金额" prop="amount" align="center" show-overflow-tooltip width="180"></el-table-column>
|
|
|
|
+ <el-table-column label="是否到货" prop="isArrival" align="center" show-overflow-tooltip width="200"></el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot="menuLeft">
|
|
|
|
+ <el-button size="small"
|
|
|
|
+ type="success"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ @click.stop=""
|
|
|
|
+ >复制新单
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button size="small"
|
|
|
|
+ type="info"
|
|
|
|
+ @click.stop="openReport()"
|
|
|
|
+ >报表
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-view"
|
|
|
|
+ size="small"
|
|
|
|
+ @click.stop="beforeOpenPage(scope.row,1)"
|
|
|
|
+ >查看
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ size="small"
|
|
|
|
+ @click.stop="editOpen(scope.row,2)"
|
|
|
|
+ >编辑
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ type="text"
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ size="small"
|
|
|
|
+ @click.stop="rowDel(scope.row,scope.index)"
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </avue-crud>
|
|
|
|
+ </basic-container>
|
|
|
|
+ <detail-page
|
|
|
|
+ ref="detail"
|
|
|
|
+ @goBack="goBack"
|
|
|
|
+ :detailData="detailData"
|
|
|
|
+ v-else
|
|
|
|
+ ></detail-page>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
-
|
|
|
|
<script>
|
|
<script>
|
|
import option from "./config/mainList.json";
|
|
import option from "./config/mainList.json";
|
|
import {selectPurchaseList,removeData,getItemByPid} from "@/api/importTrade/purchase";
|
|
import {selectPurchaseList,removeData,getItemByPid} from "@/api/importTrade/purchase";
|
|
|
|
+import detailPage from "./detailsPage.vue";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "index",
|
|
name: "index",
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
option: option,
|
|
option: option,
|
|
|
|
+ detailData:{},
|
|
dataList: [],
|
|
dataList: [],
|
|
page: {
|
|
page: {
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
@@ -89,9 +98,13 @@ export default {
|
|
total: 0,
|
|
total: 0,
|
|
},
|
|
},
|
|
form: {},
|
|
form: {},
|
|
|
|
+ show: true,
|
|
search: {},
|
|
search: {},
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ components:{
|
|
|
|
+ detailPage
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
//删除列表后面的删除按钮触发触发(row, index, done)
|
|
//删除列表后面的删除按钮触发触发(row, index, done)
|
|
rowDel(row, index, done) {
|
|
rowDel(row, index, done) {
|
|
@@ -149,24 +162,27 @@ export default {
|
|
this.$refs.crud.rowAdd();
|
|
this.$refs.crud.rowAdd();
|
|
},
|
|
},
|
|
//查看跳转页面
|
|
//查看跳转页面
|
|
- beforeOpenPage(row, index) {
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/purchase_detailsPage",
|
|
|
|
- query: {id: JSON.stringify(row.id)},
|
|
|
|
- });
|
|
|
|
|
|
+ beforeOpenPage(row, status) {
|
|
|
|
+ this.detailData = {
|
|
|
|
+ id: row.id,
|
|
|
|
+ status: status
|
|
|
|
+ };
|
|
|
|
+ this.show = false;
|
|
},
|
|
},
|
|
//新增跳转页面
|
|
//新增跳转页面
|
|
- beforeOpen(row, index) {
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/purchase_detailsPage",
|
|
|
|
- query: {id: JSON.stringify(row.id)},
|
|
|
|
- });
|
|
|
|
|
|
+ beforeOpen(row, status) {
|
|
|
|
+ this.detailData = {
|
|
|
|
+ id: row.id,
|
|
|
|
+ status: status
|
|
|
|
+ };
|
|
|
|
+ this.show = false;
|
|
},
|
|
},
|
|
- editOpen(row, index) {
|
|
|
|
- this.$router.push({
|
|
|
|
- path: "/purchase_detailsPage",
|
|
|
|
- query: {id: JSON.stringify(row.id)},
|
|
|
|
- });
|
|
|
|
|
|
+ editOpen(row, status) {
|
|
|
|
+ this.detailData = {
|
|
|
|
+ id: row.id,
|
|
|
|
+ status: status
|
|
|
|
+ };
|
|
|
|
+ this.show = false;
|
|
},
|
|
},
|
|
//点击新增时触发
|
|
//点击新增时触发
|
|
beforeClose(done) {
|
|
beforeClose(done) {
|
|
@@ -238,6 +254,10 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ goBack() {
|
|
|
|
+ this.detailData=this.$options.data().detailData
|
|
|
|
+ this.show = true;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|