|
|
@@ -34,20 +34,21 @@
|
|
|
</template>
|
|
|
<template slot="menuLeft">
|
|
|
<el-button
|
|
|
- type="primary"
|
|
|
- icon="el-icon-plus"
|
|
|
- size="small"
|
|
|
- @click.stop="newAdd('new')"
|
|
|
- >创建单据
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="small"
|
|
|
+ @click.stop="newAdd('new')"
|
|
|
+ >创建单据
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- type="success"
|
|
|
- size="small"
|
|
|
- @click.stop="copyDoc()"
|
|
|
- :disabled="selectionList.length != 1"
|
|
|
- >复制单据</el-button
|
|
|
- >
|
|
|
- <el-button type="info" size="small">报表打印</el-button>
|
|
|
+ type="success"
|
|
|
+ size="small"
|
|
|
+ @click.stop="copyDoc()"
|
|
|
+ :disabled="selectionList.length != 1"
|
|
|
+ >复制单据
|
|
|
+ </el-button>
|
|
|
+ <el-button type="info" size="small" disabled>报表打印</el-button>
|
|
|
+<!-- <el-button type="info" size="small" @click="dialogVisible = true">导入销售单</el-button>-->
|
|
|
</template>
|
|
|
<template slot="corpIdSearch">
|
|
|
<crop-select v-model="search.corpId" corpType="KH"></crop-select>
|
|
|
@@ -120,17 +121,62 @@
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
<detail-page
|
|
|
- @goBack="goBack"
|
|
|
- @copyOrder="copyOrder"
|
|
|
- :detailData="detailData"
|
|
|
- v-if="!show"
|
|
|
+ @goBack="goBack"
|
|
|
+ @copyOrder="copyOrder"
|
|
|
+ :detailData="detailData"
|
|
|
+ v-if="!show"
|
|
|
></detail-page>
|
|
|
+ <el-dialog
|
|
|
+ title="导入销售单"
|
|
|
+ v-if="dialogVisible"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ append-to-body
|
|
|
+ width="80%">
|
|
|
+ <span>
|
|
|
+ <avue-crud :data="dialogData" :option="dialogOption"
|
|
|
+ :page.sync="dialogPage"
|
|
|
+ :search.sync="params"
|
|
|
+ ref="dialogCrud"
|
|
|
+ @refresh-change="refreshChangeTwo"
|
|
|
+ @on-load="dialogOnLoad">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-tabs v-model="activeName" @tab-click="tabHandle">
|
|
|
+ <el-tab-pane label="查询结果" name="searchList"/>
|
|
|
+ <el-tab-pane label="已选定数据" name="importStaging"/>
|
|
|
+ </el-tabs>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="small"
|
|
|
+ @click.stop="importStagList(scope.row, scope.index)"
|
|
|
+ v-if="activeName == 'searchList'"
|
|
|
+ :disabled=" goodsListSave.findIndex(item => item.id == scope.row.id) !== -1 "
|
|
|
+ >选择
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="small"
|
|
|
+ @click.stop="removeStagList(scope.row, scope.index)"
|
|
|
+ v-else
|
|
|
+ >移除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import option from "./config/mainList.json";
|
|
|
-import { getList, remove, gainUser } from "@/api/exportTrade/purchaseContract";
|
|
|
+import {getList, remove, gainUser, listXS} from "@/api/exportTrade/purchaseContract";
|
|
|
import detailPage from "./detailsPage.vue";
|
|
|
import { defaultDate } from "@/util/date";
|
|
|
import { IntegerFormat } from "@/util/validate";
|
|
|
@@ -141,6 +187,79 @@ export default {
|
|
|
search: {
|
|
|
businesDate: defaultDate()
|
|
|
},
|
|
|
+ dialogData: [],
|
|
|
+ goodsListShow: [],
|
|
|
+ goodsListSave: [],
|
|
|
+ params:{},
|
|
|
+ dialogPage: {
|
|
|
+ pageSize: 20,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0,
|
|
|
+ pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
|
|
|
+ },
|
|
|
+ activeName: 'searchList',
|
|
|
+ dialogOption: {
|
|
|
+ searchShow: true,
|
|
|
+ searchMenuSpan: 16,
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ addBtn: false,
|
|
|
+ menuWidth: "100",
|
|
|
+ headerAlign: "center",
|
|
|
+ searchIcon: true,
|
|
|
+ searchIndex: 2,
|
|
|
+ tip: false,
|
|
|
+ column: [{
|
|
|
+ label: "销售单号",
|
|
|
+ prop: "orderNo",
|
|
|
+ search:false,
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "销售日期",
|
|
|
+ prop: "businesDate",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "供应商",
|
|
|
+ prop: "corpId",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "交货日期",
|
|
|
+ prop: "corpId",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "采购员",
|
|
|
+ prop: "corpId",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "产品名称",
|
|
|
+ prop: "corpId",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "产品编号",
|
|
|
+ prop: "corpId",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "产品类别",
|
|
|
+ prop: "corpId",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "产品型号",
|
|
|
+ prop: "corpId",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "数量",
|
|
|
+ prop: "corpId",
|
|
|
+ overHidden: true
|
|
|
+ }, {
|
|
|
+ label: "采购数",
|
|
|
+ prop: "corpId",
|
|
|
+ overHidden: true
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ dialogVisible: false,
|
|
|
form: {},
|
|
|
option: {},
|
|
|
parentId: 0,
|
|
|
@@ -151,6 +270,7 @@ export default {
|
|
|
total: 0,
|
|
|
pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
|
|
|
},
|
|
|
+ totalTwo:0,
|
|
|
show: true,
|
|
|
detailData: {},
|
|
|
loading: false,
|
|
|
@@ -175,6 +295,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ removeStagList(row, index) {
|
|
|
+ this.goodsListSave.splice(row.$index, 1);
|
|
|
+ },
|
|
|
searchCriteriaSwitch(type) {
|
|
|
if (type) {
|
|
|
this.option.height = this.option.height - 139;
|
|
|
@@ -256,6 +379,38 @@ export default {
|
|
|
this.page.currentPage = 1;
|
|
|
this.page.pageSize = val;
|
|
|
},
|
|
|
+ // 标签页切换
|
|
|
+ tabHandle(data) {
|
|
|
+ if (data.name == 'searchList') {
|
|
|
+ this.dialogData = this.goodsListShow;
|
|
|
+ this.dialogPage.total = this.totalTwo
|
|
|
+ } else if (data.name == 'importStaging') {
|
|
|
+ this.goodsListShow = this.dialogData;
|
|
|
+ this.dialogData = this.goodsListSave;
|
|
|
+ this.totalTwo = this.dialogPage.total
|
|
|
+ this.dialogPage.total = 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ importStagList(row, index) {
|
|
|
+ this.goodsListSave.push(row);
|
|
|
+ },
|
|
|
+ refreshChangeTwo(){
|
|
|
+ this.onLoad(this.page);
|
|
|
+ },
|
|
|
+ dialogOnLoad(page, params) {
|
|
|
+ this.dialogLoading = true;
|
|
|
+ params = {
|
|
|
+ ...params,
|
|
|
+ size: page.pageSize,
|
|
|
+ current: page.currentPage,
|
|
|
+ ...this.params
|
|
|
+ }
|
|
|
+ listXS(params).then(res => {
|
|
|
+ this.dialogLoading = false
|
|
|
+ this.dialogData = res.data.data.records
|
|
|
+ this.dialogPage.total = res.data.data.total
|
|
|
+ })
|
|
|
+ },
|
|
|
onLoad(page, params) {
|
|
|
if (this.search.businesDate && this.search.businesDate.length > 0) {
|
|
|
params = {
|
|
|
@@ -318,6 +473,11 @@ export default {
|
|
|
watch: {
|
|
|
option: function() {
|
|
|
this.search.businesDate = defaultDate();
|
|
|
+ },
|
|
|
+ dialogVisible:function (){
|
|
|
+ this.goodsListShow = []
|
|
|
+ this.goodsListSave = []
|
|
|
+ this.totalTwo = 0
|
|
|
}
|
|
|
}
|
|
|
};
|