|
|
@@ -19,9 +19,13 @@
|
|
|
</select>
|
|
|
</div>
|
|
|
|
|
|
- <div class="form-group m-2">
|
|
|
- <select class="form-control selectpicker" title="货主" v-model="tableData.secondData.search.ownerId">
|
|
|
- <option v-for="item of selectData.owners" :value="item.id">@{{ item.name }}</option>
|
|
|
+ <div class="form-group m-2" style="max-width: 200px !important;">
|
|
|
+ <select v-model="tableData.secondData.search.ownerId" class="selectpicker form-control" title="选择货主"
|
|
|
+ data-actions-box="true"
|
|
|
+ data-live-search="true"
|
|
|
+ data-live-search-placeholder="搜索"
|
|
|
+ >
|
|
|
+ <option v-for="(v,k) of selectData.owners" :value="v.id" :key="v.id">@{{ v.name }}</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
|
|
|
@@ -51,6 +55,12 @@
|
|
|
<div class="form-group m-2">
|
|
|
<button class="form-control btn btn-sm btn-info" @click="searchData()">查询</button>
|
|
|
</div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="form-group m-3">
|
|
|
+ <button class="btn btn-success btn-sm" @click="assignOwner()">
|
|
|
+ 货主开启攒单
|
|
|
+ </button>
|
|
|
</div>
|
|
|
<!--表格-->
|
|
|
<!--创建-->
|
|
|
@@ -291,6 +301,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ @include('rejected.rejectedPushTask._assignOwner')
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@@ -325,6 +336,9 @@
|
|
|
},
|
|
|
checkAll: false,
|
|
|
selectTr: 0,
|
|
|
+ assign:{
|
|
|
+ ownerId:null
|
|
|
+ },
|
|
|
tableData: {
|
|
|
firstData: {
|
|
|
data: [],
|
|
|
@@ -335,6 +349,7 @@
|
|
|
search: {
|
|
|
ownerId: null,
|
|
|
type: null,
|
|
|
+ taskNum: null,
|
|
|
status: '创建',
|
|
|
ownerIdList: {!! $ownerIds !!}
|
|
|
}
|
|
|
@@ -475,14 +490,39 @@
|
|
|
}).init();
|
|
|
},
|
|
|
methods: {
|
|
|
+ submitAssignOwner(){
|
|
|
+ let url = this.getBaseUrl() + `/api/wms/rejectedPushTask/init?ownerId=${this.assign.ownerId}`
|
|
|
+ axios.get(url).then(res => {
|
|
|
+ if (res.data.code !== 200) {
|
|
|
+ tempTip.show('接口异常!');
|
|
|
+ tempTip.setDuration(2000)
|
|
|
+ } else {
|
|
|
+ this.searchData();
|
|
|
+ tempTip.setDuration(2000)
|
|
|
+ tempTip.showSuccess('提交成功');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ assignOwner() {
|
|
|
+ $('#assignOwner').modal('show');
|
|
|
+ },
|
|
|
+ setFirstDataSearach(){
|
|
|
+ this.tableData.firstData.search.ownerId=this.tableData.secondData.search.ownerId;
|
|
|
+ this.tableData.firstData.search.type= this.tableData.secondData.search.type;
|
|
|
+ this.tableData.firstData.search.taskNum=this.tableData.secondData.search.taskNum;
|
|
|
+ if (this.tableData.secondData.search.status!=null){
|
|
|
+ this.tableData.firstData.search.status=this.tableData.secondData.search.status;
|
|
|
+ }
|
|
|
+ },
|
|
|
//初始化页面数据
|
|
|
initData() {
|
|
|
- //加载firstTable
|
|
|
- let firstDataUrl = this.getBaseUrl() + `/api/wms/rejectedPushTask/list?size=${this.tableData.firstData.size}¤t=${this.tableData.firstData.current}`;
|
|
|
- this.fetch(firstDataUrl, this.tableData.firstData, this.tableData.firstData.search);
|
|
|
//加载secondTable
|
|
|
let secondDataUrl = this.getBaseUrl() + `/api/wms/rejectedPushTask/list?size=${this.tableData.secondData.size}¤t=${this.tableData.secondData.current}`;
|
|
|
this.fetch(secondDataUrl, this.tableData.secondData, this.tableData.secondData.search);
|
|
|
+ //加载firstTable
|
|
|
+ this.setFirstDataSearach();
|
|
|
+ let firstDataUrl = this.getBaseUrl() + `/api/wms/rejectedPushTask/list?size=${this.tableData.firstData.size}¤t=${this.tableData.firstData.current}`;
|
|
|
+ this.fetch(firstDataUrl, this.tableData.firstData, this.tableData.firstData.search);
|
|
|
},
|
|
|
//发送请求并给对应数据赋值
|
|
|
fetch(url, data, search) {
|
|
|
@@ -495,7 +535,6 @@
|
|
|
data.current = 1
|
|
|
data.pages = 0
|
|
|
} else {
|
|
|
- tempTip.showSuccess('查询成功!');
|
|
|
data.data = res.data.data.list;
|
|
|
data.total = res.data.data.page.total;
|
|
|
data.current = res.data.data.page.pageNum;
|
|
|
@@ -506,7 +545,6 @@
|
|
|
},
|
|
|
//包裹明细分页
|
|
|
packagePagination(flag) {
|
|
|
- console.log(flag);
|
|
|
if (flag === 'pre' && this.showDetailData.packageDetail.current > 1) {
|
|
|
this.showDetailData.packageDetail.current--;
|
|
|
} else if (flag === 'next' && this.showDetailData.packageDetail.current < this.showDetailData.packageDetail.pages) {
|
|
|
@@ -531,7 +569,6 @@
|
|
|
let url = this.getBaseUrl() + `/api/wms/rejectedPushTask/commodity/list?size=${this.showDetailData.commodityDetail.size}¤t=${this.showDetailData.commodityDetail.current}&rejectedPushTaskId=${id}`;
|
|
|
tempTip.showSuccess('开始查询,请稍后!');
|
|
|
axios.get(url).then(res => {
|
|
|
- tempTip.showSuccess('查询成功!');
|
|
|
if (res.data.code !== 200) {
|
|
|
tempTip.show('接口异常!');
|
|
|
this.showDetailData.commodityDetail.data = [];
|
|
|
@@ -556,7 +593,6 @@
|
|
|
let url = this.getBaseUrl() + `/api/wms/rejectedPushTask/package/list?size=${this.showDetailData.packageDetail.size}¤t=${this.showDetailData.packageDetail.current}&rejectedPushTaskId=${id}`
|
|
|
tempTip.showSuccess('开始查询,请稍后!');
|
|
|
axios.get(url).then(res => {
|
|
|
- tempTip.showSuccess('查询成功!');
|
|
|
if (res.data.code !== 200) {
|
|
|
tempTip.show('接口异常!');
|
|
|
this.showDetailData.packageDetail.data = [];
|
|
|
@@ -612,7 +648,7 @@
|
|
|
let url = null;
|
|
|
let env = "{{ config('app.env') }}";
|
|
|
if (env === 'local') {
|
|
|
- url = 'http://127.0.0.1:8118'
|
|
|
+ url = 'http://127.0.0.1:8112'
|
|
|
} else if (env === 'production') {
|
|
|
url = 'https://swms.baoshi56.com'
|
|
|
}
|
|
|
@@ -625,8 +661,13 @@
|
|
|
} else if (flag === 'next' && this.tableData.secondData.current < this.tableData.secondData.pages) {
|
|
|
this.tableData.secondData.current++;
|
|
|
}
|
|
|
- let url = this.getBaseUrl() + `/api/wms/rejectedPushTask/list?size=${this.tableData.secondData.size}¤t=${this.tableData.secondData.current}`;
|
|
|
- this.fetch(url, this.tableData.secondData, this.tableData.secondData.search);
|
|
|
+ //加载secondTable
|
|
|
+ let secondDataUrl = this.getBaseUrl() + `/api/wms/rejectedPushTask/list?size=${this.tableData.secondData.size}¤t=${this.tableData.secondData.current}`;
|
|
|
+ this.fetch(secondDataUrl, this.tableData.secondData, this.tableData.secondData.search);
|
|
|
+ //加载firstTable
|
|
|
+ this.setFirstDataSearach();
|
|
|
+ let firstDataUrl = this.getBaseUrl() + `/api/wms/rejectedPushTask/list?size=${this.tableData.firstData.size}¤t=${this.tableData.firstData.current}`;
|
|
|
+ this.fetch(firstDataUrl, this.tableData.firstData, this.tableData.firstData.search);
|
|
|
},
|
|
|
//下载excel
|
|
|
downExcel(item) {
|