|
@@ -103,12 +103,19 @@
|
|
<el-dialog title="添加引用" :visible.sync="isShowDialog" width="80%">
|
|
<el-dialog title="添加引用" :visible.sync="isShowDialog" width="80%">
|
|
<el-form ref="screenForm" :model="screenForm" size="small" label-position="left" label-width="70px">
|
|
<el-form ref="screenForm" :model="screenForm" size="small" label-position="left" label-width="70px">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
- <el-col :xs="12" :sm="12" :lg="12">
|
|
|
|
|
|
+ <el-col :xs="12" :sm="6" :lg="6">
|
|
<el-form-item prop="orderNum" label="发货单号">
|
|
<el-form-item prop="orderNum" label="发货单号">
|
|
<el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
|
|
<el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
<el-col :xs="12" :sm="6" :lg="6">
|
|
|
|
+ <el-form-item prop="dealer" label="经销商">
|
|
|
|
+ <el-select v-model="screenForm.dealer" placeholder="请选择经销商" style="width: 100%;" filterable>
|
|
|
|
+ <el-option :label="item.name" :value="item.id" v-for="(item, index) in dealerList" :key="index"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :xs="12" :sm="6" :lg="6">
|
|
<el-form-item label="">
|
|
<el-form-item label="">
|
|
<el-button size="small" @click="resetScreenForm">清空</el-button>
|
|
<el-button size="small" @click="resetScreenForm">清空</el-button>
|
|
<el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
|
|
<el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
|
|
@@ -166,6 +173,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { getDetail, getGoodsList, addData } from "@/api/supply/return";
|
|
import { getDetail, getGoodsList, addData } from "@/api/supply/return";
|
|
|
|
+import { getDealerList } from '@/api/common'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'ReturnForm',
|
|
name: 'ReturnForm',
|
|
@@ -207,9 +215,11 @@ export default {
|
|
isShowDialog: false,
|
|
isShowDialog: false,
|
|
screenForm: {
|
|
screenForm: {
|
|
orderNum: '',
|
|
orderNum: '',
|
|
|
|
+ dealer: '',
|
|
},
|
|
},
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
listTotal: 0,
|
|
listTotal: 0,
|
|
|
|
+ dealerList: [],
|
|
|
|
|
|
tableGoodsList: [],
|
|
tableGoodsList: [],
|
|
tableSelection: [],
|
|
tableSelection: [],
|
|
@@ -244,6 +254,16 @@ export default {
|
|
this.$emit('backListFormDetail');
|
|
this.$emit('backListFormDetail');
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 获取经销商列表
|
|
|
|
+ getDealerList() {
|
|
|
|
+ getDealerList({
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: -1,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ this.dealerList = res.data.records;
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
// 获取详情
|
|
// 获取详情
|
|
getDetail() {
|
|
getDetail() {
|
|
getDetail({id: this.listItem.id}).then(res => {
|
|
getDetail({id: this.listItem.id}).then(res => {
|
|
@@ -256,7 +276,7 @@ export default {
|
|
getGoodsList({
|
|
getGoodsList({
|
|
pageNum: this.currentPage,
|
|
pageNum: this.currentPage,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
- customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
|
|
|
|
|
|
+ customerId: this.screenForm.dealer,
|
|
id: this.screenForm.orderNum,
|
|
id: this.screenForm.orderNum,
|
|
}).then(res => {
|
|
}).then(res => {
|
|
res.data.records.forEach(item => {
|
|
res.data.records.forEach(item => {
|
|
@@ -294,6 +314,7 @@ export default {
|
|
// 点击 选择商品
|
|
// 点击 选择商品
|
|
openDialog() {
|
|
openDialog() {
|
|
this.isShowDialog = true;
|
|
this.isShowDialog = true;
|
|
|
|
+ this.getDealerList();
|
|
if(this.screenForm.orderNum) {
|
|
if(this.screenForm.orderNum) {
|
|
this.getGoodsList();
|
|
this.getGoodsList();
|
|
}
|
|
}
|
|
@@ -304,6 +325,9 @@ export default {
|
|
if(!this.screenForm.orderNum) {
|
|
if(!this.screenForm.orderNum) {
|
|
return this.$errorMsg('请填写发货申请单号');
|
|
return this.$errorMsg('请填写发货申请单号');
|
|
}
|
|
}
|
|
|
|
+ if(!this.screenForm.dealer) {
|
|
|
|
+ return this.$errorMsg('请选择经销商');
|
|
|
|
+ }
|
|
this.currentPage = 1;
|
|
this.currentPage = 1;
|
|
this.getGoodsList();
|
|
this.getGoodsList();
|
|
},
|
|
},
|